From b152522c1c51fcf7641cc6d2ac5208d2dd370638 Mon Sep 17 00:00:00 2001 From: Microsoft Graph DevX Tooling Date: Tue, 26 Sep 2023 10:38:15 +0000 Subject: [PATCH] Update generated files with build 125718 --- ...esource_connection_item_request_builder.go | 6 +- ...ts_updatable_asset_item_request_builder.go | 8 +- ..._compliance_change_item_request_builder.go | 6 +- ...tings_item_registration_request_builder.go | 6 +- applications/item_add_key_request_builder.go | 4 +- chats/item_messages_request_builder.go | 6 +- ...tings_item_registration_request_builder.go | 6 +- ...roup_sources_item_group_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 83 ++++ ...ice_provisioning_errors_request_builder.go | 100 +++++ ...roup_sources_item_group_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 83 ++++ ...ice_provisioning_errors_request_builder.go | 100 +++++ ...y_case_export_operation_request_builder.go | 4 + ...rt_operation_review_set_request_builder.go | 84 ++++ ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ contacts/org_contact_item_request_builder.go | 4 + ...k_app_assignments_count_request_builder.go | 80 ++++ ...ile_app_assignment_item_request_builder.go | 159 ++++++++ ...or_work_app_assignments_request_builder.go | 151 ++++++++ ...rk_app_categories_count_request_builder.go | 80 ++++ ...obile_app_category_item_request_builder.go | 81 ++++ ...for_work_app_categories_request_builder.go | 108 ++++++ ...app_relationships_count_request_builder.go | 80 ++++ ...e_app_relationship_item_request_builder.go | 159 ++++++++ ..._work_app_relationships_request_builder.go | 151 ++++++++ ...ph_android_for_work_app_request_builder.go | 12 + ...b_app_assignments_count_request_builder.go | 80 ++++ ...ile_app_assignment_item_request_builder.go | 159 ++++++++ ...oid_lob_app_assignments_request_builder.go | 151 ++++++++ ...ob_app_categories_count_request_builder.go | 80 ++++ ...obile_app_category_item_request_builder.go | 81 ++++ ...roid_lob_app_categories_request_builder.go | 108 ++++++ ..._content_versions_count_request_builder.go | 80 ++++ ...em_contained_apps_count_request_builder.go | 80 ++++ ...bile_contained_app_item_request_builder.go | 159 ++++++++ ...ons_item_contained_apps_request_builder.go | 151 ++++++++ ...rsions_item_files_count_request_builder.go | 80 ++++ ...tem_files_item_commit_post_request_body.go | 111 ++++++ ..._item_files_item_commit_request_builder.go | 68 ++++ ...files_item_renew_upload_request_builder.go | 64 ++++ ...e_app_content_file_item_request_builder.go | 167 ++++++++ ...ent_versions_item_files_request_builder.go | 151 ++++++++ ...mobile_app_content_item_request_builder.go | 167 ++++++++ ...ob_app_content_versions_request_builder.go | 151 ++++++++ ...app_relationships_count_request_builder.go | 80 ++++ ...e_app_relationship_item_request_builder.go | 159 ++++++++ ...d_lob_app_relationships_request_builder.go | 151 ++++++++ ...m_graph_android_lob_app_request_builder.go | 16 + ...e_app_assignments_count_request_builder.go | 80 ++++ ...ile_app_assignment_item_request_builder.go | 159 ++++++++ ...d_store_app_assignments_request_builder.go | 151 ++++++++ ...re_app_categories_count_request_builder.go | 80 ++++ ...obile_app_category_item_request_builder.go | 81 ++++ ...ed_store_app_categories_request_builder.go | 108 ++++++ ...app_relationships_count_request_builder.go | 80 ++++ ...e_app_relationship_item_request_builder.go | 159 ++++++++ ...store_app_relationships_request_builder.go | 151 ++++++++ ...droid_managed_store_app_request_builder.go | 12 + ...e_app_assignments_count_request_builder.go | 80 ++++ ...ile_app_assignment_item_request_builder.go | 159 ++++++++ ...d_store_app_assignments_request_builder.go | 151 ++++++++ ...re_app_categories_count_request_builder.go | 80 ++++ ...obile_app_category_item_request_builder.go | 81 ++++ ...id_store_app_categories_request_builder.go | 108 ++++++ ...app_relationships_count_request_builder.go | 80 ++++ ...e_app_relationship_item_request_builder.go | 159 ++++++++ ...store_app_relationships_request_builder.go | 151 ++++++++ ...graph_android_store_app_request_builder.go | 12 + ...b_app_assignments_count_request_builder.go | 80 ++++ ...ile_app_assignment_item_request_builder.go | 159 ++++++++ ...ios_lob_app_assignments_request_builder.go | 151 ++++++++ ...ob_app_categories_count_request_builder.go | 80 ++++ ...obile_app_category_item_request_builder.go | 81 ++++ ..._ios_lob_app_categories_request_builder.go | 108 ++++++ ..._content_versions_count_request_builder.go | 80 ++++ ...em_contained_apps_count_request_builder.go | 80 ++++ ...bile_contained_app_item_request_builder.go | 159 ++++++++ ...ons_item_contained_apps_request_builder.go | 151 ++++++++ ...rsions_item_files_count_request_builder.go | 80 ++++ ...tem_files_item_commit_post_request_body.go | 111 ++++++ ..._item_files_item_commit_request_builder.go | 68 ++++ ...files_item_renew_upload_request_builder.go | 64 ++++ ...e_app_content_file_item_request_builder.go | 167 ++++++++ ...ent_versions_item_files_request_builder.go | 151 ++++++++ ...mobile_app_content_item_request_builder.go | 167 ++++++++ ...ob_app_content_versions_request_builder.go | 151 ++++++++ ...app_relationships_count_request_builder.go | 80 ++++ ...e_app_relationship_item_request_builder.go | 159 ++++++++ ...s_lob_app_relationships_request_builder.go | 151 ++++++++ ..._item_graph_ios_lob_app_request_builder.go | 16 + ...e_app_assignments_count_request_builder.go | 80 ++++ ...ile_app_assignment_item_request_builder.go | 159 ++++++++ ...s_store_app_assignments_request_builder.go | 151 ++++++++ ...re_app_categories_count_request_builder.go | 80 ++++ ...obile_app_category_item_request_builder.go | 81 ++++ ...os_store_app_categories_request_builder.go | 108 ++++++ ...app_relationships_count_request_builder.go | 80 ++++ ...e_app_relationship_item_request_builder.go | 159 ++++++++ ...store_app_relationships_request_builder.go | 151 ++++++++ ...tem_graph_ios_store_app_request_builder.go | 12 + ...assigned_licenses_count_request_builder.go | 80 ++++ ...p_assigned_license_item_request_builder.go | 159 ++++++++ ...p_app_assigned_licenses_request_builder.go | 151 ++++++++ ...p_app_assignments_count_request_builder.go | 80 ++++ ...ile_app_assignment_item_request_builder.go | 159 ++++++++ ...ios_vpp_app_assignments_request_builder.go | 151 ++++++++ ...pp_app_categories_count_request_builder.go | 80 ++++ ...obile_app_category_item_request_builder.go | 81 ++++ ..._ios_vpp_app_categories_request_builder.go | 108 ++++++ ...app_relationships_count_request_builder.go | 80 ++++ ...e_app_relationship_item_request_builder.go | 159 ++++++++ ...s_vpp_app_relationships_request_builder.go | 151 ++++++++ ..._item_graph_ios_vpp_app_request_builder.go | 16 + ...g_app_assignments_count_request_builder.go | 80 ++++ ...ile_app_assignment_item_request_builder.go | 159 ++++++++ ...o_s_dmg_app_assignments_request_builder.go | 151 ++++++++ ...mg_app_categories_count_request_builder.go | 80 ++++ ...obile_app_category_item_request_builder.go | 81 ++++ ..._o_s_dmg_app_categories_request_builder.go | 108 ++++++ ..._content_versions_count_request_builder.go | 80 ++++ ...em_contained_apps_count_request_builder.go | 80 ++++ ...bile_contained_app_item_request_builder.go | 159 ++++++++ ...ons_item_contained_apps_request_builder.go | 151 ++++++++ ...rsions_item_files_count_request_builder.go | 80 ++++ ...tem_files_item_commit_post_request_body.go | 111 ++++++ ..._item_files_item_commit_request_builder.go | 68 ++++ ...files_item_renew_upload_request_builder.go | 64 ++++ ...e_app_content_file_item_request_builder.go | 167 ++++++++ ...ent_versions_item_files_request_builder.go | 151 ++++++++ ...mobile_app_content_item_request_builder.go | 167 ++++++++ ...mg_app_content_versions_request_builder.go | 151 ++++++++ ...app_relationships_count_request_builder.go | 80 ++++ ...e_app_relationship_item_request_builder.go | 159 ++++++++ ...s_dmg_app_relationships_request_builder.go | 151 ++++++++ ...m_graph_mac_o_s_dmg_app_request_builder.go | 16 + ...b_app_assignments_count_request_builder.go | 80 ++++ ...ile_app_assignment_item_request_builder.go | 159 ++++++++ ...o_s_lob_app_assignments_request_builder.go | 151 ++++++++ ...ob_app_categories_count_request_builder.go | 80 ++++ ...obile_app_category_item_request_builder.go | 81 ++++ ..._o_s_lob_app_categories_request_builder.go | 108 ++++++ ..._content_versions_count_request_builder.go | 80 ++++ ...em_contained_apps_count_request_builder.go | 80 ++++ ...bile_contained_app_item_request_builder.go | 159 ++++++++ ...ons_item_contained_apps_request_builder.go | 151 ++++++++ ...rsions_item_files_count_request_builder.go | 80 ++++ ...tem_files_item_commit_post_request_body.go | 111 ++++++ ..._item_files_item_commit_request_builder.go | 68 ++++ ...files_item_renew_upload_request_builder.go | 64 ++++ ...e_app_content_file_item_request_builder.go | 167 ++++++++ ...ent_versions_item_files_request_builder.go | 151 ++++++++ ...mobile_app_content_item_request_builder.go | 167 ++++++++ ...ob_app_content_versions_request_builder.go | 151 ++++++++ ...app_relationships_count_request_builder.go | 80 ++++ ...e_app_relationship_item_request_builder.go | 159 ++++++++ ...s_lob_app_relationships_request_builder.go | 151 ++++++++ ...m_graph_mac_o_s_lob_app_request_builder.go | 16 + ...g_app_assignments_count_request_builder.go | 80 ++++ ...ile_app_assignment_item_request_builder.go | 159 ++++++++ ...o_s_pkg_app_assignments_request_builder.go | 151 ++++++++ ...kg_app_categories_count_request_builder.go | 80 ++++ ...obile_app_category_item_request_builder.go | 81 ++++ ..._o_s_pkg_app_categories_request_builder.go | 108 ++++++ ..._content_versions_count_request_builder.go | 80 ++++ ...em_contained_apps_count_request_builder.go | 80 ++++ ...bile_contained_app_item_request_builder.go | 159 ++++++++ ...ons_item_contained_apps_request_builder.go | 151 ++++++++ ...rsions_item_files_count_request_builder.go | 80 ++++ ...tem_files_item_commit_post_request_body.go | 111 ++++++ ..._item_files_item_commit_request_builder.go | 68 ++++ ...files_item_renew_upload_request_builder.go | 64 ++++ ...e_app_content_file_item_request_builder.go | 167 ++++++++ ...ent_versions_item_files_request_builder.go | 151 ++++++++ ...mobile_app_content_item_request_builder.go | 167 ++++++++ ...kg_app_content_versions_request_builder.go | 151 ++++++++ ...app_relationships_count_request_builder.go | 80 ++++ ...e_app_relationship_item_request_builder.go | 159 ++++++++ ...s_pkg_app_relationships_request_builder.go | 151 ++++++++ ...m_graph_mac_o_s_pkg_app_request_builder.go | 16 + ...b_app_assignments_count_request_builder.go | 80 ++++ ...ile_app_assignment_item_request_builder.go | 159 ++++++++ ...oid_lob_app_assignments_request_builder.go | 151 ++++++++ ...ob_app_categories_count_request_builder.go | 80 ++++ ...obile_app_category_item_request_builder.go | 81 ++++ ...roid_lob_app_categories_request_builder.go | 108 ++++++ ..._content_versions_count_request_builder.go | 80 ++++ ...em_contained_apps_count_request_builder.go | 80 ++++ ...bile_contained_app_item_request_builder.go | 159 ++++++++ ...ons_item_contained_apps_request_builder.go | 151 ++++++++ ...rsions_item_files_count_request_builder.go | 80 ++++ ...tem_files_item_commit_post_request_body.go | 111 ++++++ ..._item_files_item_commit_request_builder.go | 68 ++++ ...files_item_renew_upload_request_builder.go | 64 ++++ ...e_app_content_file_item_request_builder.go | 167 ++++++++ ...ent_versions_item_files_request_builder.go | 151 ++++++++ ...mobile_app_content_item_request_builder.go | 167 ++++++++ ...ob_app_content_versions_request_builder.go | 151 ++++++++ ...app_relationships_count_request_builder.go | 80 ++++ ...e_app_relationship_item_request_builder.go | 159 ++++++++ ...d_lob_app_relationships_request_builder.go | 151 ++++++++ ...managed_android_lob_app_request_builder.go | 16 + ...b_app_assignments_count_request_builder.go | 80 ++++ ...ile_app_assignment_item_request_builder.go | 159 ++++++++ ...o_s_lob_app_assignments_request_builder.go | 151 ++++++++ ...ob_app_categories_count_request_builder.go | 80 ++++ ...obile_app_category_item_request_builder.go | 81 ++++ ..._o_s_lob_app_categories_request_builder.go | 108 ++++++ ..._content_versions_count_request_builder.go | 80 ++++ ...em_contained_apps_count_request_builder.go | 80 ++++ ...bile_contained_app_item_request_builder.go | 159 ++++++++ ...ons_item_contained_apps_request_builder.go | 151 ++++++++ ...rsions_item_files_count_request_builder.go | 80 ++++ ...tem_files_item_commit_post_request_body.go | 111 ++++++ ..._item_files_item_commit_request_builder.go | 68 ++++ ...files_item_renew_upload_request_builder.go | 64 ++++ ...e_app_content_file_item_request_builder.go | 167 ++++++++ ...ent_versions_item_files_request_builder.go | 151 ++++++++ ...mobile_app_content_item_request_builder.go | 167 ++++++++ ...ob_app_content_versions_request_builder.go | 151 ++++++++ ...app_relationships_count_request_builder.go | 80 ++++ ...e_app_relationship_item_request_builder.go | 159 ++++++++ ...s_lob_app_relationships_request_builder.go | 151 ++++++++ ...h_managed_i_o_s_lob_app_request_builder.go | 16 + ...b_app_assignments_count_request_builder.go | 80 ++++ ...ile_app_assignment_item_request_builder.go | 159 ++++++++ ...ile_lob_app_assignments_request_builder.go | 151 ++++++++ ...ob_app_categories_count_request_builder.go | 80 ++++ ...obile_app_category_item_request_builder.go | 81 ++++ ...bile_lob_app_categories_request_builder.go | 108 ++++++ ..._content_versions_count_request_builder.go | 80 ++++ ...em_contained_apps_count_request_builder.go | 80 ++++ ...bile_contained_app_item_request_builder.go | 159 ++++++++ ...ons_item_contained_apps_request_builder.go | 151 ++++++++ ...rsions_item_files_count_request_builder.go | 80 ++++ ...tem_files_item_commit_post_request_body.go | 111 ++++++ ..._item_files_item_commit_request_builder.go | 68 ++++ ...files_item_renew_upload_request_builder.go | 64 ++++ ...e_app_content_file_item_request_builder.go | 167 ++++++++ ...ent_versions_item_files_request_builder.go | 151 ++++++++ ...mobile_app_content_item_request_builder.go | 167 ++++++++ ...ob_app_content_versions_request_builder.go | 151 ++++++++ ...app_relationships_count_request_builder.go | 80 ++++ ...e_app_relationship_item_request_builder.go | 159 ++++++++ ...e_lob_app_relationships_request_builder.go | 151 ++++++++ ..._managed_mobile_lob_app_request_builder.go | 16 + ...s_app_assignments_count_request_builder.go | 80 ++++ ...ile_app_assignment_item_request_builder.go | 159 ++++++++ ...usiness_app_assignments_request_builder.go | 151 ++++++++ ...ss_app_categories_count_request_builder.go | 80 ++++ ...obile_app_category_item_request_builder.go | 81 ++++ ...business_app_categories_request_builder.go | 108 ++++++ ...pp_contained_apps_count_request_builder.go | 80 ++++ ...bile_contained_app_item_request_builder.go | 159 ++++++++ ...ness_app_contained_apps_request_builder.go | 151 ++++++++ ...app_relationships_count_request_builder.go | 80 ++++ ...e_app_relationship_item_request_builder.go | 159 ++++++++ ...iness_app_relationships_request_builder.go | 151 ++++++++ ..._store_for_business_app_request_builder.go | 16 + ...b_app_assignments_count_request_builder.go | 80 ++++ ...ile_app_assignment_item_request_builder.go | 159 ++++++++ ...n32_lob_app_assignments_request_builder.go | 151 ++++++++ ...ob_app_categories_count_request_builder.go | 80 ++++ ...obile_app_category_item_request_builder.go | 81 ++++ ...in32_lob_app_categories_request_builder.go | 108 ++++++ ..._content_versions_count_request_builder.go | 80 ++++ ...em_contained_apps_count_request_builder.go | 80 ++++ ...bile_contained_app_item_request_builder.go | 159 ++++++++ ...ons_item_contained_apps_request_builder.go | 151 ++++++++ ...rsions_item_files_count_request_builder.go | 80 ++++ ...tem_files_item_commit_post_request_body.go | 111 ++++++ ..._item_files_item_commit_request_builder.go | 68 ++++ ...files_item_renew_upload_request_builder.go | 64 ++++ ...e_app_content_file_item_request_builder.go | 167 ++++++++ ...ent_versions_item_files_request_builder.go | 151 ++++++++ ...mobile_app_content_item_request_builder.go | 167 ++++++++ ...ob_app_content_versions_request_builder.go | 151 ++++++++ ...app_relationships_count_request_builder.go | 80 ++++ ...e_app_relationship_item_request_builder.go | 159 ++++++++ ...2_lob_app_relationships_request_builder.go | 151 ++++++++ ...tem_graph_win32_lob_app_request_builder.go | 16 + ...t_app_assignments_count_request_builder.go | 80 ++++ ...ile_app_assignment_item_request_builder.go | 159 ++++++++ ...win_get_app_assignments_request_builder.go | 151 ++++++++ ...et_app_categories_count_request_builder.go | 80 ++++ ...obile_app_category_item_request_builder.go | 81 ++++ ..._win_get_app_categories_request_builder.go | 108 ++++++ ...app_relationships_count_request_builder.go | 80 ++++ ...e_app_relationship_item_request_builder.go | 159 ++++++++ ...n_get_app_relationships_request_builder.go | 151 ++++++++ ..._item_graph_win_get_app_request_builder.go | 12 + ...app_x_assignments_count_request_builder.go | 80 ++++ ...ile_app_assignment_item_request_builder.go | 159 ++++++++ ...ndows_app_x_assignments_request_builder.go | 151 ++++++++ ..._app_x_categories_count_request_builder.go | 80 ++++ ...obile_app_category_item_request_builder.go | 81 ++++ ...indows_app_x_categories_request_builder.go | 108 ++++++ ..._content_versions_count_request_builder.go | 80 ++++ ...em_contained_apps_count_request_builder.go | 80 ++++ ...bile_contained_app_item_request_builder.go | 159 ++++++++ ...ons_item_contained_apps_request_builder.go | 151 ++++++++ ...rsions_item_files_count_request_builder.go | 80 ++++ ...tem_files_item_commit_post_request_body.go | 111 ++++++ ..._item_files_item_commit_request_builder.go | 68 ++++ ...files_item_renew_upload_request_builder.go | 64 ++++ ...e_app_content_file_item_request_builder.go | 167 ++++++++ ...ent_versions_item_files_request_builder.go | 151 ++++++++ ...mobile_app_content_item_request_builder.go | 167 ++++++++ ..._app_x_content_versions_request_builder.go | 151 ++++++++ ...p_x_relationships_count_request_builder.go | 80 ++++ ...e_app_relationship_item_request_builder.go | 159 ++++++++ ...ows_app_x_relationships_request_builder.go | 151 ++++++++ ...tem_graph_windows_app_x_request_builder.go | 16 + ...m_s_i_assignments_count_request_builder.go | 80 ++++ ...ile_app_assignment_item_request_builder.go | 159 ++++++++ ...obile_m_s_i_assignments_request_builder.go | 151 ++++++++ ..._m_s_i_categories_count_request_builder.go | 80 ++++ ...obile_app_category_item_request_builder.go | 81 ++++ ...mobile_m_s_i_categories_request_builder.go | 108 ++++++ ..._content_versions_count_request_builder.go | 80 ++++ ...em_contained_apps_count_request_builder.go | 80 ++++ ...bile_contained_app_item_request_builder.go | 159 ++++++++ ...ons_item_contained_apps_request_builder.go | 151 ++++++++ ...rsions_item_files_count_request_builder.go | 80 ++++ ...tem_files_item_commit_post_request_body.go | 111 ++++++ ..._item_files_item_commit_request_builder.go | 68 ++++ ...files_item_renew_upload_request_builder.go | 64 ++++ ...e_app_content_file_item_request_builder.go | 167 ++++++++ ...ent_versions_item_files_request_builder.go | 151 ++++++++ ...mobile_app_content_item_request_builder.go | 167 ++++++++ ..._m_s_i_content_versions_request_builder.go | 151 ++++++++ ...s_i_relationships_count_request_builder.go | 80 ++++ ...e_app_relationship_item_request_builder.go | 159 ++++++++ ...ile_m_s_i_relationships_request_builder.go | 151 ++++++++ ...ph_windows_mobile_m_s_i_request_builder.go | 16 + ...e_app_assignments_count_request_builder.go | 80 ++++ ...ile_app_assignment_item_request_builder.go | 159 ++++++++ ...s_store_app_assignments_request_builder.go | 151 ++++++++ ...re_app_categories_count_request_builder.go | 80 ++++ ...obile_app_category_item_request_builder.go | 81 ++++ ...ws_store_app_categories_request_builder.go | 108 ++++++ ...app_relationships_count_request_builder.go | 80 ++++ ...e_app_relationship_item_request_builder.go | 159 ++++++++ ...store_app_relationships_request_builder.go | 151 ++++++++ ...graph_windows_store_app_request_builder.go | 12 + ...app_x_assignments_count_request_builder.go | 80 ++++ ...ile_app_assignment_item_request_builder.go | 159 ++++++++ ...ersal_app_x_assignments_request_builder.go | 151 ++++++++ ..._app_x_categories_count_request_builder.go | 80 ++++ ...obile_app_category_item_request_builder.go | 81 ++++ ...versal_app_x_categories_request_builder.go | 108 ++++++ ...ed_contained_apps_count_request_builder.go | 80 ++++ ...bile_contained_app_item_request_builder.go | 159 ++++++++ ...ommitted_contained_apps_request_builder.go | 151 ++++++++ ..._content_versions_count_request_builder.go | 80 ++++ ...em_contained_apps_count_request_builder.go | 80 ++++ ...bile_contained_app_item_request_builder.go | 159 ++++++++ ...ons_item_contained_apps_request_builder.go | 151 ++++++++ ...rsions_item_files_count_request_builder.go | 80 ++++ ...tem_files_item_commit_post_request_body.go | 111 ++++++ ..._item_files_item_commit_request_builder.go | 68 ++++ ...files_item_renew_upload_request_builder.go | 64 ++++ ...e_app_content_file_item_request_builder.go | 167 ++++++++ ...ent_versions_item_files_request_builder.go | 151 ++++++++ ...mobile_app_content_item_request_builder.go | 167 ++++++++ ..._app_x_content_versions_request_builder.go | 151 ++++++++ ...p_x_relationships_count_request_builder.go | 80 ++++ ...e_app_relationship_item_request_builder.go | 159 ++++++++ ...sal_app_x_relationships_request_builder.go | 151 ++++++++ ...windows_universal_app_x_request_builder.go | 20 + ...b_app_assignments_count_request_builder.go | 80 ++++ ...ile_app_assignment_item_request_builder.go | 159 ++++++++ ...ows_web_app_assignments_request_builder.go | 151 ++++++++ ...eb_app_categories_count_request_builder.go | 80 ++++ ...obile_app_category_item_request_builder.go | 81 ++++ ...dows_web_app_categories_request_builder.go | 108 ++++++ ...app_relationships_count_request_builder.go | 80 ++++ ...e_app_relationship_item_request_builder.go | 159 ++++++++ ...s_web_app_relationships_request_builder.go | 151 ++++++++ ...m_graph_windows_web_app_request_builder.go | 12 + ...ovisioning_errors_count_request_builder.go | 83 ++++ ...ice_provisioning_errors_request_builder.go | 100 +++++ ...ssigned_users_user_item_request_builder.go | 4 + ...tion_configuration_item_request_builder.go | 23 +- ...uthority_as_entity_item_request_builder.go | 6 +- ...certificate_authorities_request_builder.go | 6 +- ...lication_configurations_request_builder.go | 9 +- .../deleted_items_delta_request_builder.go | 90 ----- directory/deleted_items_delta_response.go | 88 ----- ...s_directory_object_item_request_builder.go | 98 ----- ...eted_items_get_by_ids_post_request_body.go | 158 -------- ...eleted_items_get_by_ids_request_builder.go | 75 ---- .../deleted_items_get_by_ids_response.go | 88 ----- ...et_user_owned_objects_post_request_body.go | 146 ------- ..._get_user_owned_objects_request_builder.go | 76 ---- ...m_check_member_groups_post_request_body.go | 116 ------ ...tem_check_member_groups_request_builder.go | 75 ---- ...items_item_check_member_groups_response.go | 82 ---- ..._check_member_objects_post_request_body.go | 116 ------ ...em_check_member_objects_request_builder.go | 72 ---- ...tems_item_check_member_objects_response.go | 82 ---- ...tem_get_member_groups_post_request_body.go | 110 ------ ..._item_get_member_groups_request_builder.go | 75 ---- ...d_items_item_get_member_groups_response.go | 82 ---- ...em_get_member_objects_post_request_body.go | 110 ------ ...item_get_member_objects_request_builder.go | 72 ---- ..._items_item_get_member_objects_response.go | 82 ---- ...eted_items_item_restore_request_builder.go | 72 ---- directory/deleted_items_request_builder.go | 59 --- ...s_validate_properties_post_request_body.go | 219 ----------- ...ems_validate_properties_request_builder.go | 71 ---- .../directory_role_item_request_builder.go | 6 +- .../directory_roles_request_builder.go | 6 +- .../item_members_item_ref_request_builder.go | 6 +- .../item_members_ref_request_builder.go | 4 +- ...s_with_role_template_id_request_builder.go | 6 +- .../item_created_by_user_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...m_items_drive_item_item_request_builder.go | 6 +- ...ms_item_created_by_user_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...m_last_modified_by_user_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...ms_item_retention_label_request_builder.go | 6 +- ...ems_item_workbook_names_request_builder.go | 2 +- ...ook_tables_item_columns_request_builder.go | 2 +- ...rkbook_tables_item_rows_request_builder.go | 2 +- ...workbook_worksheets_add_request_builder.go | 4 +- ...item_series_item_points_request_builder.go | 8 +- ...item_charts_item_series_request_builder.go | 2 +- ..._worksheets_item_charts_request_builder.go | 2 +- ...tem_tables_item_columns_request_builder.go | 2 +- ...s_item_tables_item_rows_request_builder.go | 2 +- ...tem_workbook_worksheets_request_builder.go | 2 +- ...m_last_modified_by_user_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...em_list_created_by_user_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...ms_item_created_by_user_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...m_last_modified_by_user_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...t_last_modified_by_user_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ .../classes_item_group_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ .../classes_item_modules_request_builder.go | 4 +- education/me_user_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...ion_profiles_item_start_request_builder.go | 4 +- education/users_item_user_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...flows_inbound_flow_item_request_builder.go | 14 +- ...stry_data_inbound_flows_request_builder.go | 8 +- graph_request_adapter.go | 3 +- groups/group_item_request_builder.go | 4 + ...r_view_item_attachments_request_builder.go | 6 +- ...rences_item_attachments_request_builder.go | 6 +- ...tances_item_attachments_request_builder.go | 6 +- ...tances_item_attachments_request_builder.go | 6 +- ...rences_item_attachments_request_builder.go | 6 +- ...events_item_attachments_request_builder.go | 6 +- ...rences_item_attachments_request_builder.go | 6 +- ...tances_item_attachments_request_builder.go | 6 +- ...tances_item_attachments_request_builder.go | 6 +- ...rences_item_attachments_request_builder.go | 6 +- ...r_view_item_attachments_request_builder.go | 6 +- ...rences_item_attachments_request_builder.go | 6 +- ...tances_item_attachments_request_builder.go | 6 +- ...tances_item_attachments_request_builder.go | 6 +- ...rences_item_attachments_request_builder.go | 6 +- ...item_threads_item_reply_request_builder.go | 6 +- groups/item_conversations_request_builder.go | 6 +- ...events_item_attachments_request_builder.go | 6 +- ...rences_item_attachments_request_builder.go | 6 +- ...tances_item_attachments_request_builder.go | 6 +- ...tances_item_attachments_request_builder.go | 6 +- ...rences_item_attachments_request_builder.go | 6 +- ...ovisioning_errors_count_request_builder.go | 78 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...es_item_created_by_user_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...m_last_modified_by_user_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...ts_item_created_by_user_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...ms_item_created_by_user_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...m_last_modified_by_user_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...m_last_modified_by_user_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...es_item_lists_list_item_request_builder.go | 8 +- ...es_item_created_by_user_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...m_last_modified_by_user_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...onversation_member_item_request_builder.go | 6 +- ..._channels_item_messages_request_builder.go | 6 +- groups/item_team_group_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...m_team_owners_user_item_request_builder.go | 4 + ...onversation_member_item_request_builder.go | 6 +- ...rimary_channel_messages_request_builder.go | 6 +- ...onversation_thread_item_request_builder.go | 6 +- ...item_threads_item_reply_request_builder.go | 6 +- ...tion_configuration_item_request_builder.go | 4 +- ...tion_configuration_item_request_builder.go | 4 +- ...ons_named_location_item_request_builder.go | 14 +- ...ser_flow_attribute_item_request_builder.go | 8 +- .../user_flow_attributes_request_builder.go | 4 +- ...s_item_custom_extension_request_builder.go | 6 +- ...s_item_custom_extension_request_builder.go | 6 +- ...s_item_custom_extension_request_builder.go | 6 +- ...tible_groups_group_item_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ..._callout_extension_item_request_builder.go | 6 +- ...s_item_custom_extension_request_builder.go | 6 +- ...tible_groups_group_item_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...ensions_item_created_by_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...s_item_last_modified_by_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...rkflows_item_created_by_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...s_item_last_modified_by_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...ng_results_item_subject_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...ng_results_item_subject_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...ng_results_item_subject_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...ng_results_item_subject_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...ng_results_item_subject_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...ng_results_item_subject_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...ng_results_item_subject_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...ersions_item_created_by_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...s_item_last_modified_by_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...ng_results_item_subject_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...ng_results_item_subject_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...rkflows_item_created_by_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...s_item_last_modified_by_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...ng_results_item_subject_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...ng_results_item_subject_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...ng_results_item_subject_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...ng_results_item_subject_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...ng_results_item_subject_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...ng_results_item_subject_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...ng_results_item_subject_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...ersions_item_created_by_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...s_item_last_modified_by_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...ng_results_item_subject_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...le_instances_item_group_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...ule_requests_item_group_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...nt_schedules_item_group_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...le_instances_item_group_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...ule_requests_item_group_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...ty_schedules_item_group_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...ons_risk_detection_item_request_builder.go | 8 +- .../item_invited_user_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ kiota-lock.json | 2 +- ...luded_groups_group_item_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ models/access_review_schedule_definition.go | 20 +- models/action_step.go | 4 +- models/action_url.go | 4 +- models/admin.go | 70 ---- models/admin_windows.go | 75 ++++ models/agreement_file_properties.go | 8 +- models/api_application.go | 4 +- models/app_credential_sign_in_activity.go | 4 +- models/app_identity.go | 4 +- models/attachment_base.go | 4 +- models/certificate_authority_as_entity.go | 16 +- models/certificate_authority_path.go | 4 +- ...ificate_based_application_configuration.go | 8 +- ...nications_application_instance_identity.go | 4 +- models/custom_extension_handler.go | 4 +- models/default_user_role_permissions.go | 12 +- ...ion_setting_group_collection_definition.go | 8 +- ...on_simple_setting_collection_definition.go | 8 +- ...configuration_simple_setting_definition.go | 16 +- models/directory_audit.go | 16 +- models/ediscovery/case_escaped.go | 39 ++ models/ediscovery/case_escapedable.go | 47 --- models/endpoint.go | 8 +- models/externalconnectors/property.go | 12 +- models/file_encryption_info.go | 362 ++++++++++++++++++ models/governance_subject.go | 8 +- models/identity_user_flow_attribute.go | 4 +- models/insight_identity.go | 4 +- ...pp_assigned_license_collection_response.go | 87 +++++ models/key_credential_configuration.go | 4 +- ...icrosoft_authenticator_feature_settings.go | 12 +- .../mobile_app_content_collection_response.go | 87 +++++ ...le_app_content_file_collection_response.go | 87 +++++ ...obile_contained_app_collection_response.go | 87 +++++ ...art_external_users_self_service_sign_up.go | 4 +- models/password_single_sign_on_field.go | 4 +- models/phone_authentication_method.go | 4 +- models/pkcs12_certificate_information.go | 4 +- models/risk_detection.go | 36 ++ models/search_hit.go | 36 -- .../tenant_allow_or_block_list_action.go | 8 +- models/service_principal_risk_detection.go | 36 ++ ..._provisioning_error_collection_response.go | 87 +++++ models/sign_in.go | 4 +- models/subject_rights_request.go | 56 +-- .../synchronization_job_restart_criteria.go | 4 +- models/synchronization_template.go | 4 +- models/term_column.go | 4 +- models/ti_indicator.go | 4 +- ...ed_certificate_authority_as_entity_base.go | 4 +- models/unified_rbac_resource_namespace.go | 4 +- ...nified_role_management_alert_definition.go | 8 +- models/upload_session.go | 4 +- models/user.go | 4 +- models/vendor_escaped.go | 50 --- models/vendor_escapedable.go | 59 +++ models/virtual_event_registration.go | 36 +- ...irtual_event_registration_configuration.go | 12 +- models/virtual_event_session.go | 4 +- models/virtual_event_webinar.go | 8 +- models/workbook_range_view.go | 8 +- models/workspace_collection_response.go | 87 +++++ ...ate_authentication_method_configuration.go | 36 ++ ..._certificate_issuer_hints_configuration.go | 147 +++++++ models/x509_certificate_issuer_hints_state.go | 40 ++ .../item_connector_groups_request_builder.go | 6 +- .../item_graph_room_list_request_builder.go | 8 + ...h_room_list_rooms_count_request_builder.go | 80 ++++ ...m_graph_room_list_rooms_request_builder.go | 151 ++++++++ ...om_list_rooms_room_item_request_builder.go | 159 ++++++++ ...m_list_workspaces_count_request_builder.go | 80 ++++ ...ph_room_list_workspaces_request_builder.go | 151 ++++++++ ...rkspaces_workspace_item_request_builder.go | 159 ++++++++ ...tion_configuration_item_request_builder.go | 4 +- .../authorization_policy_request_builder.go | 9 +- ...dentity_synchronization_request_builder.go | 7 - ...luded_groups_group_item_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...luded_groups_group_item_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...lowed_groups_group_item_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 83 ++++ ...ice_provisioning_errors_request_builder.go | 100 +++++ ...ovisioning_errors_count_request_builder.go | 83 ++++ ...ice_provisioning_errors_request_builder.go | 100 +++++ ...allowed_users_user_item_request_builder.go | 4 + ...riggers_item_definition_request_builder.go | 6 +- ...lowed_groups_group_item_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...allowed_users_user_item_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 83 ++++ ...ice_provisioning_errors_request_builder.go | 100 +++++ ...tem_approvers_user_item_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 83 ++++ ...ice_provisioning_errors_request_builder.go | 100 +++++ ...collaborators_user_item_request_builder.go | 4 + .../risk_detections_request_builder.go | 8 +- ...roup_sources_item_group_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...tem_approvers_user_item_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...collaborators_user_item_request_builder.go | 4 + ...s_item_child_host_pairs_request_builder.go | 6 +- ...e_hosts_item_host_pairs_request_builder.go | 6 +- ..._item_parent_host_pairs_request_builder.go | 6 +- .../item_created_by_user_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 78 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...m_last_modified_by_user_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...em_list_created_by_user_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...ms_item_created_by_user_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...m_last_modified_by_user_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...t_last_modified_by_user_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ sites/item_created_by_user_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...m_last_modified_by_user_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...ts_item_created_by_user_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...ms_item_created_by_user_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...m_last_modified_by_user_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...m_last_modified_by_user_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ sites/item_lists_list_item_request_builder.go | 8 +- ...es_item_created_by_user_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...m_last_modified_by_user_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ sites/sites_request_builder.go | 8 +- ...sions_item_registration_request_builder.go | 6 +- ...ions_item_registrations_request_builder.go | 6 +- ...event_registration_item_request_builder.go | 6 +- ...istration_configuration_request_builder.go | 6 +- ...strations_item_sessions_request_builder.go | 6 +- ...tual_event_session_item_request_builder.go | 6 +- ...nars_item_registrations_request_builder.go | 9 +- ...event_registration_item_request_builder.go | 9 +- ...sions_item_registration_request_builder.go | 6 +- ...ions_item_registrations_request_builder.go | 6 +- ...event_registration_item_request_builder.go | 6 +- .../subscribed_skus_request_builder.go | 6 +- ...onversation_member_item_request_builder.go | 6 +- ..._channels_item_messages_request_builder.go | 6 +- teams/item_group_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ .../item_owners_user_item_request_builder.go | 4 + ...onversation_member_item_request_builder.go | 6 +- ...rimary_channel_messages_request_builder.go | 6 +- ...onversation_member_item_request_builder.go | 6 +- ..._channels_item_messages_request_builder.go | 6 +- ...m_team_definition_group_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...nition_owners_user_item_request_builder.go | 4 + ...onversation_member_item_request_builder.go | 6 +- ...rimary_channel_messages_request_builder.go | 6 +- ...onversation_member_item_request_builder.go | 6 +- ..._channels_item_messages_request_builder.go | 6 +- ...onversation_member_item_request_builder.go | 6 +- ..._channels_item_messages_request_builder.go | 6 +- ...m_team_definition_group_request_builder.go | 4 + ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ ...nition_owners_user_item_request_builder.go | 4 + ...onversation_member_item_request_builder.go | 6 +- ...rimary_channel_messages_request_builder.go | 6 +- teamwork/team_templates_request_builder.go | 8 +- ...r_view_item_attachments_request_builder.go | 6 +- ...rences_item_attachments_request_builder.go | 6 +- ...tances_item_attachments_request_builder.go | 6 +- ...tances_item_attachments_request_builder.go | 6 +- ...rences_item_attachments_request_builder.go | 6 +- ...events_item_attachments_request_builder.go | 6 +- ...rences_item_attachments_request_builder.go | 6 +- ...tances_item_attachments_request_builder.go | 6 +- ...tances_item_attachments_request_builder.go | 6 +- ...rences_item_attachments_request_builder.go | 6 +- ...r_view_item_attachments_request_builder.go | 6 +- ...rences_item_attachments_request_builder.go | 6 +- ...tances_item_attachments_request_builder.go | 6 +- ...tances_item_attachments_request_builder.go | 6 +- ...rences_item_attachments_request_builder.go | 6 +- ...events_item_attachments_request_builder.go | 6 +- ...rences_item_attachments_request_builder.go | 6 +- ...tances_item_attachments_request_builder.go | 6 +- ...tances_item_attachments_request_builder.go | 6 +- ...rences_item_attachments_request_builder.go | 6 +- ...r_view_item_attachments_request_builder.go | 6 +- ...rences_item_attachments_request_builder.go | 6 +- ...tances_item_attachments_request_builder.go | 6 +- ...tances_item_attachments_request_builder.go | 6 +- ...rences_item_attachments_request_builder.go | 6 +- ...r_view_item_attachments_request_builder.go | 6 +- ...rences_item_attachments_request_builder.go | 6 +- ...tances_item_attachments_request_builder.go | 6 +- ...tances_item_attachments_request_builder.go | 6 +- ...rences_item_attachments_request_builder.go | 6 +- ...events_item_attachments_request_builder.go | 6 +- ...rences_item_attachments_request_builder.go | 6 +- ...tances_item_attachments_request_builder.go | 6 +- ...tances_item_attachments_request_builder.go | 6 +- ...rences_item_attachments_request_builder.go | 6 +- ...tem_chats_item_messages_request_builder.go | 6 +- ...events_item_attachments_request_builder.go | 6 +- ...rences_item_attachments_request_builder.go | 6 +- ...tances_item_attachments_request_builder.go | 6 +- ...tances_item_attachments_request_builder.go | 6 +- ...rences_item_attachments_request_builder.go | 6 +- ...ssages_item_attachments_request_builder.go | 6 +- ...ssages_item_attachments_request_builder.go | 6 +- ...ssages_item_attachments_request_builder.go | 6 +- ...ages_item_value_content_request_builder.go | 2 +- ...m_messages_message_item_request_builder.go | 14 +- users/item_messages_request_builder.go | 8 +- ...tings_item_registration_request_builder.go | 6 +- ...s_outlook_category_item_request_builder.go | 4 +- users/item_presence_request_builder.go | 8 +- ...s_directory_object_item_request_builder.go | 6 +- ...item_registered_devices_request_builder.go | 6 +- ...ovisioning_errors_count_request_builder.go | 80 ++++ ...ice_provisioning_errors_request_builder.go | 97 +++++ users/user_item_request_builder.go | 4 + 910 files changed, 60811 insertions(+), 3217 deletions(-) create mode 100644 compliance/ediscovery_cases_item_custodians_item_unified_group_sources_item_group_service_provisioning_errors_count_request_builder.go create mode 100644 compliance/ediscovery_cases_item_custodians_item_unified_group_sources_item_group_service_provisioning_errors_request_builder.go create mode 100644 compliance/ediscovery_cases_item_legal_holds_item_unified_group_sources_item_group_service_provisioning_errors_count_request_builder.go create mode 100644 compliance/ediscovery_cases_item_legal_holds_item_unified_group_sources_item_group_service_provisioning_errors_request_builder.go create mode 100644 compliance/ediscovery_cases_item_operations_item_microsoft_graph_ediscovery_case_export_operation_review_set_request_builder.go create mode 100644 contacts/item_service_provisioning_errors_count_request_builder.go create mode 100644 contacts/item_service_provisioning_errors_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_android_for_work_app_assignments_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_android_for_work_app_assignments_mobile_app_assignment_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_android_for_work_app_assignments_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_android_for_work_app_categories_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_android_for_work_app_categories_mobile_app_category_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_android_for_work_app_categories_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_android_for_work_app_relationships_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_android_for_work_app_relationships_mobile_app_relationship_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_android_for_work_app_relationships_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_android_lob_app_assignments_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_android_lob_app_assignments_mobile_app_assignment_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_android_lob_app_assignments_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_android_lob_app_categories_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_android_lob_app_categories_mobile_app_category_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_android_lob_app_categories_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_android_lob_app_content_versions_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_android_lob_app_content_versions_item_contained_apps_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_android_lob_app_content_versions_item_contained_apps_mobile_contained_app_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_android_lob_app_content_versions_item_contained_apps_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_android_lob_app_content_versions_item_files_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_android_lob_app_content_versions_item_files_item_commit_post_request_body.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_android_lob_app_content_versions_item_files_item_commit_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_android_lob_app_content_versions_item_files_item_renew_upload_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_android_lob_app_content_versions_item_files_mobile_app_content_file_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_android_lob_app_content_versions_item_files_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_android_lob_app_content_versions_mobile_app_content_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_android_lob_app_content_versions_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_android_lob_app_relationships_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_android_lob_app_relationships_mobile_app_relationship_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_android_lob_app_relationships_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_android_managed_store_app_assignments_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_android_managed_store_app_assignments_mobile_app_assignment_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_android_managed_store_app_assignments_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_android_managed_store_app_categories_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_android_managed_store_app_categories_mobile_app_category_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_android_managed_store_app_categories_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_android_managed_store_app_relationships_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_android_managed_store_app_relationships_mobile_app_relationship_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_android_managed_store_app_relationships_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_android_store_app_assignments_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_android_store_app_assignments_mobile_app_assignment_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_android_store_app_assignments_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_android_store_app_categories_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_android_store_app_categories_mobile_app_category_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_android_store_app_categories_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_android_store_app_relationships_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_android_store_app_relationships_mobile_app_relationship_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_android_store_app_relationships_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_ios_lob_app_assignments_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_ios_lob_app_assignments_mobile_app_assignment_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_ios_lob_app_assignments_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_ios_lob_app_categories_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_ios_lob_app_categories_mobile_app_category_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_ios_lob_app_categories_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_ios_lob_app_content_versions_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_ios_lob_app_content_versions_item_contained_apps_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_ios_lob_app_content_versions_item_contained_apps_mobile_contained_app_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_ios_lob_app_content_versions_item_contained_apps_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_ios_lob_app_content_versions_item_files_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_ios_lob_app_content_versions_item_files_item_commit_post_request_body.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_ios_lob_app_content_versions_item_files_item_commit_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_ios_lob_app_content_versions_item_files_item_renew_upload_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_ios_lob_app_content_versions_item_files_mobile_app_content_file_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_ios_lob_app_content_versions_item_files_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_ios_lob_app_content_versions_mobile_app_content_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_ios_lob_app_content_versions_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_ios_lob_app_relationships_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_ios_lob_app_relationships_mobile_app_relationship_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_ios_lob_app_relationships_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_ios_store_app_assignments_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_ios_store_app_assignments_mobile_app_assignment_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_ios_store_app_assignments_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_ios_store_app_categories_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_ios_store_app_categories_mobile_app_category_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_ios_store_app_categories_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_ios_store_app_relationships_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_ios_store_app_relationships_mobile_app_relationship_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_ios_store_app_relationships_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_ios_vpp_app_assigned_licenses_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_ios_vpp_app_assigned_licenses_ios_vpp_app_assigned_license_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_ios_vpp_app_assigned_licenses_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_ios_vpp_app_assignments_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_ios_vpp_app_assignments_mobile_app_assignment_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_ios_vpp_app_assignments_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_ios_vpp_app_categories_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_ios_vpp_app_categories_mobile_app_category_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_ios_vpp_app_categories_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_ios_vpp_app_relationships_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_ios_vpp_app_relationships_mobile_app_relationship_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_ios_vpp_app_relationships_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_assignments_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_assignments_mobile_app_assignment_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_assignments_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_categories_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_categories_mobile_app_category_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_categories_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_content_versions_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_content_versions_item_contained_apps_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_content_versions_item_contained_apps_mobile_contained_app_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_content_versions_item_contained_apps_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_content_versions_item_files_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_content_versions_item_files_item_commit_post_request_body.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_content_versions_item_files_item_commit_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_content_versions_item_files_item_renew_upload_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_content_versions_item_files_mobile_app_content_file_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_content_versions_item_files_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_content_versions_mobile_app_content_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_content_versions_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_relationships_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_relationships_mobile_app_relationship_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_relationships_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_assignments_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_assignments_mobile_app_assignment_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_assignments_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_categories_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_categories_mobile_app_category_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_categories_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_content_versions_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_content_versions_item_contained_apps_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_content_versions_item_contained_apps_mobile_contained_app_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_content_versions_item_contained_apps_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_content_versions_item_files_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_content_versions_item_files_item_commit_post_request_body.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_content_versions_item_files_item_commit_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_content_versions_item_files_item_renew_upload_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_content_versions_item_files_mobile_app_content_file_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_content_versions_item_files_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_content_versions_mobile_app_content_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_content_versions_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_relationships_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_relationships_mobile_app_relationship_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_relationships_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_assignments_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_assignments_mobile_app_assignment_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_assignments_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_categories_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_categories_mobile_app_category_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_categories_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_content_versions_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_content_versions_item_contained_apps_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_content_versions_item_contained_apps_mobile_contained_app_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_content_versions_item_contained_apps_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_content_versions_item_files_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_content_versions_item_files_item_commit_post_request_body.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_content_versions_item_files_item_commit_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_content_versions_item_files_item_renew_upload_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_content_versions_item_files_mobile_app_content_file_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_content_versions_item_files_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_content_versions_mobile_app_content_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_content_versions_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_relationships_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_relationships_mobile_app_relationship_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_relationships_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_assignments_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_assignments_mobile_app_assignment_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_assignments_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_categories_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_categories_mobile_app_category_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_categories_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_content_versions_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_content_versions_item_contained_apps_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_content_versions_item_contained_apps_mobile_contained_app_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_content_versions_item_contained_apps_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_content_versions_item_files_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_content_versions_item_files_item_commit_post_request_body.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_content_versions_item_files_item_commit_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_content_versions_item_files_item_renew_upload_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_content_versions_item_files_mobile_app_content_file_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_content_versions_item_files_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_content_versions_mobile_app_content_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_content_versions_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_relationships_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_relationships_mobile_app_relationship_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_relationships_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_assignments_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_assignments_mobile_app_assignment_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_assignments_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_categories_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_categories_mobile_app_category_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_categories_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_content_versions_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_content_versions_item_contained_apps_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_content_versions_item_contained_apps_mobile_contained_app_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_content_versions_item_contained_apps_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_content_versions_item_files_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_content_versions_item_files_item_commit_post_request_body.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_content_versions_item_files_item_commit_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_content_versions_item_files_item_renew_upload_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_content_versions_item_files_mobile_app_content_file_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_content_versions_item_files_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_content_versions_mobile_app_content_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_content_versions_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_relationships_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_relationships_mobile_app_relationship_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_relationships_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_assignments_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_assignments_mobile_app_assignment_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_assignments_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_categories_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_categories_mobile_app_category_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_categories_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_content_versions_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_content_versions_item_contained_apps_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_content_versions_item_contained_apps_mobile_contained_app_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_content_versions_item_contained_apps_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_content_versions_item_files_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_content_versions_item_files_item_commit_post_request_body.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_content_versions_item_files_item_commit_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_content_versions_item_files_item_renew_upload_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_content_versions_item_files_mobile_app_content_file_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_content_versions_item_files_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_content_versions_mobile_app_content_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_content_versions_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_relationships_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_relationships_mobile_app_relationship_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_relationships_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_microsoft_store_for_business_app_assignments_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_microsoft_store_for_business_app_assignments_mobile_app_assignment_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_microsoft_store_for_business_app_assignments_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_microsoft_store_for_business_app_categories_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_microsoft_store_for_business_app_categories_mobile_app_category_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_microsoft_store_for_business_app_categories_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_microsoft_store_for_business_app_contained_apps_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_microsoft_store_for_business_app_contained_apps_mobile_contained_app_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_microsoft_store_for_business_app_contained_apps_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_microsoft_store_for_business_app_relationships_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_microsoft_store_for_business_app_relationships_mobile_app_relationship_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_microsoft_store_for_business_app_relationships_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_win32_lob_app_assignments_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_win32_lob_app_assignments_mobile_app_assignment_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_win32_lob_app_assignments_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_win32_lob_app_categories_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_win32_lob_app_categories_mobile_app_category_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_win32_lob_app_categories_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_win32_lob_app_content_versions_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_win32_lob_app_content_versions_item_contained_apps_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_win32_lob_app_content_versions_item_contained_apps_mobile_contained_app_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_win32_lob_app_content_versions_item_contained_apps_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_win32_lob_app_content_versions_item_files_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_win32_lob_app_content_versions_item_files_item_commit_post_request_body.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_win32_lob_app_content_versions_item_files_item_commit_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_win32_lob_app_content_versions_item_files_item_renew_upload_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_win32_lob_app_content_versions_item_files_mobile_app_content_file_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_win32_lob_app_content_versions_item_files_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_win32_lob_app_content_versions_mobile_app_content_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_win32_lob_app_content_versions_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_win32_lob_app_relationships_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_win32_lob_app_relationships_mobile_app_relationship_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_win32_lob_app_relationships_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_win_get_app_assignments_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_win_get_app_assignments_mobile_app_assignment_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_win_get_app_assignments_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_win_get_app_categories_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_win_get_app_categories_mobile_app_category_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_win_get_app_categories_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_win_get_app_relationships_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_win_get_app_relationships_mobile_app_relationship_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_win_get_app_relationships_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_app_x_assignments_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_app_x_assignments_mobile_app_assignment_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_app_x_assignments_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_app_x_categories_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_app_x_categories_mobile_app_category_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_app_x_categories_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_app_x_content_versions_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_app_x_content_versions_item_contained_apps_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_app_x_content_versions_item_contained_apps_mobile_contained_app_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_app_x_content_versions_item_contained_apps_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_app_x_content_versions_item_files_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_app_x_content_versions_item_files_item_commit_post_request_body.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_app_x_content_versions_item_files_item_commit_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_app_x_content_versions_item_files_item_renew_upload_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_app_x_content_versions_item_files_mobile_app_content_file_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_app_x_content_versions_item_files_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_app_x_content_versions_mobile_app_content_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_app_x_content_versions_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_app_x_relationships_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_app_x_relationships_mobile_app_relationship_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_app_x_relationships_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_assignments_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_assignments_mobile_app_assignment_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_assignments_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_categories_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_categories_mobile_app_category_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_categories_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_content_versions_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_content_versions_item_contained_apps_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_content_versions_item_contained_apps_mobile_contained_app_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_content_versions_item_contained_apps_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_content_versions_item_files_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_content_versions_item_files_item_commit_post_request_body.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_content_versions_item_files_item_commit_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_content_versions_item_files_item_renew_upload_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_content_versions_item_files_mobile_app_content_file_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_content_versions_item_files_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_content_versions_mobile_app_content_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_content_versions_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_relationships_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_relationships_mobile_app_relationship_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_relationships_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_store_app_assignments_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_store_app_assignments_mobile_app_assignment_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_store_app_assignments_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_store_app_categories_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_store_app_categories_mobile_app_category_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_store_app_categories_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_store_app_relationships_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_store_app_relationships_mobile_app_relationship_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_store_app_relationships_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_assignments_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_assignments_mobile_app_assignment_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_assignments_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_categories_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_categories_mobile_app_category_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_categories_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_committed_contained_apps_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_committed_contained_apps_mobile_contained_app_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_committed_contained_apps_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_content_versions_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_content_versions_item_contained_apps_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_content_versions_item_contained_apps_mobile_contained_app_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_content_versions_item_contained_apps_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_content_versions_item_files_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_content_versions_item_files_item_commit_post_request_body.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_content_versions_item_files_item_commit_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_content_versions_item_files_item_renew_upload_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_content_versions_item_files_mobile_app_content_file_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_content_versions_item_files_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_content_versions_mobile_app_content_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_content_versions_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_relationships_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_relationships_mobile_app_relationship_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_relationships_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_web_app_assignments_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_web_app_assignments_mobile_app_assignment_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_web_app_assignments_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_web_app_categories_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_web_app_categories_mobile_app_category_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_web_app_categories_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_web_app_relationships_count_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_web_app_relationships_mobile_app_relationship_item_request_builder.go create mode 100644 deviceappmanagement/mobile_apps_item_graph_windows_web_app_relationships_request_builder.go create mode 100644 devicemanagement/virtual_endpoint_provisioning_policies_item_assignments_item_assigned_users_item_service_provisioning_errors_count_request_builder.go create mode 100644 devicemanagement/virtual_endpoint_provisioning_policies_item_assignments_item_assigned_users_item_service_provisioning_errors_request_builder.go delete mode 100644 directory/deleted_items_delta_request_builder.go delete mode 100644 directory/deleted_items_delta_response.go delete mode 100644 directory/deleted_items_get_by_ids_post_request_body.go delete mode 100644 directory/deleted_items_get_by_ids_request_builder.go delete mode 100644 directory/deleted_items_get_by_ids_response.go delete mode 100644 directory/deleted_items_get_user_owned_objects_post_request_body.go delete mode 100644 directory/deleted_items_get_user_owned_objects_request_builder.go delete mode 100644 directory/deleted_items_item_check_member_groups_post_request_body.go delete mode 100644 directory/deleted_items_item_check_member_groups_request_builder.go delete mode 100644 directory/deleted_items_item_check_member_groups_response.go delete mode 100644 directory/deleted_items_item_check_member_objects_post_request_body.go delete mode 100644 directory/deleted_items_item_check_member_objects_request_builder.go delete mode 100644 directory/deleted_items_item_check_member_objects_response.go delete mode 100644 directory/deleted_items_item_get_member_groups_post_request_body.go delete mode 100644 directory/deleted_items_item_get_member_groups_request_builder.go delete mode 100644 directory/deleted_items_item_get_member_groups_response.go delete mode 100644 directory/deleted_items_item_get_member_objects_post_request_body.go delete mode 100644 directory/deleted_items_item_get_member_objects_request_builder.go delete mode 100644 directory/deleted_items_item_get_member_objects_response.go delete mode 100644 directory/deleted_items_item_restore_request_builder.go delete mode 100644 directory/deleted_items_validate_properties_post_request_body.go delete mode 100644 directory/deleted_items_validate_properties_request_builder.go create mode 100644 drives/item_created_by_user_service_provisioning_errors_count_request_builder.go create mode 100644 drives/item_created_by_user_service_provisioning_errors_request_builder.go create mode 100644 drives/item_items_item_created_by_user_service_provisioning_errors_count_request_builder.go create mode 100644 drives/item_items_item_created_by_user_service_provisioning_errors_request_builder.go create mode 100644 drives/item_items_item_last_modified_by_user_service_provisioning_errors_count_request_builder.go create mode 100644 drives/item_items_item_last_modified_by_user_service_provisioning_errors_request_builder.go create mode 100644 drives/item_last_modified_by_user_service_provisioning_errors_count_request_builder.go create mode 100644 drives/item_last_modified_by_user_service_provisioning_errors_request_builder.go create mode 100644 drives/item_list_created_by_user_service_provisioning_errors_count_request_builder.go create mode 100644 drives/item_list_created_by_user_service_provisioning_errors_request_builder.go create mode 100644 drives/item_list_items_item_created_by_user_service_provisioning_errors_count_request_builder.go create mode 100644 drives/item_list_items_item_created_by_user_service_provisioning_errors_request_builder.go create mode 100644 drives/item_list_items_item_last_modified_by_user_service_provisioning_errors_count_request_builder.go create mode 100644 drives/item_list_items_item_last_modified_by_user_service_provisioning_errors_request_builder.go create mode 100644 drives/item_list_last_modified_by_user_service_provisioning_errors_count_request_builder.go create mode 100644 drives/item_list_last_modified_by_user_service_provisioning_errors_request_builder.go create mode 100644 education/classes_item_group_service_provisioning_errors_count_request_builder.go create mode 100644 education/classes_item_group_service_provisioning_errors_request_builder.go create mode 100644 education/me_user_service_provisioning_errors_count_request_builder.go create mode 100644 education/me_user_service_provisioning_errors_request_builder.go create mode 100644 education/users_item_user_service_provisioning_errors_count_request_builder.go create mode 100644 education/users_item_user_service_provisioning_errors_request_builder.go create mode 100644 groups/item_service_provisioning_errors_count_request_builder.go create mode 100644 groups/item_service_provisioning_errors_request_builder.go create mode 100644 groups/item_sites_item_created_by_user_service_provisioning_errors_count_request_builder.go create mode 100644 groups/item_sites_item_created_by_user_service_provisioning_errors_request_builder.go create mode 100644 groups/item_sites_item_last_modified_by_user_service_provisioning_errors_count_request_builder.go create mode 100644 groups/item_sites_item_last_modified_by_user_service_provisioning_errors_request_builder.go create mode 100644 groups/item_sites_item_lists_item_created_by_user_service_provisioning_errors_count_request_builder.go create mode 100644 groups/item_sites_item_lists_item_created_by_user_service_provisioning_errors_request_builder.go create mode 100644 groups/item_sites_item_lists_item_items_item_created_by_user_service_provisioning_errors_count_request_builder.go create mode 100644 groups/item_sites_item_lists_item_items_item_created_by_user_service_provisioning_errors_request_builder.go create mode 100644 groups/item_sites_item_lists_item_items_item_last_modified_by_user_service_provisioning_errors_count_request_builder.go create mode 100644 groups/item_sites_item_lists_item_items_item_last_modified_by_user_service_provisioning_errors_request_builder.go create mode 100644 groups/item_sites_item_lists_item_last_modified_by_user_service_provisioning_errors_count_request_builder.go create mode 100644 groups/item_sites_item_lists_item_last_modified_by_user_service_provisioning_errors_request_builder.go create mode 100644 groups/item_sites_item_pages_item_created_by_user_service_provisioning_errors_count_request_builder.go create mode 100644 groups/item_sites_item_pages_item_created_by_user_service_provisioning_errors_request_builder.go create mode 100644 groups/item_sites_item_pages_item_last_modified_by_user_service_provisioning_errors_count_request_builder.go create mode 100644 groups/item_sites_item_pages_item_last_modified_by_user_service_provisioning_errors_request_builder.go create mode 100644 groups/item_team_group_service_provisioning_errors_count_request_builder.go create mode 100644 groups/item_team_group_service_provisioning_errors_request_builder.go create mode 100644 groups/item_team_owners_item_service_provisioning_errors_count_request_builder.go create mode 100644 groups/item_team_owners_item_service_provisioning_errors_request_builder.go create mode 100644 identitygovernance/entitlement_management_access_package_assignments_item_access_package_incompatible_groups_item_service_provisioning_errors_count_request_builder.go create mode 100644 identitygovernance/entitlement_management_access_package_assignments_item_access_package_incompatible_groups_item_service_provisioning_errors_request_builder.go create mode 100644 identitygovernance/entitlement_management_access_packages_item_incompatible_groups_item_service_provisioning_errors_count_request_builder.go create mode 100644 identitygovernance/entitlement_management_access_packages_item_incompatible_groups_item_service_provisioning_errors_request_builder.go create mode 100644 identitygovernance/lifecycle_workflows_custom_task_extensions_item_created_by_service_provisioning_errors_count_request_builder.go create mode 100644 identitygovernance/lifecycle_workflows_custom_task_extensions_item_created_by_service_provisioning_errors_request_builder.go create mode 100644 identitygovernance/lifecycle_workflows_custom_task_extensions_item_last_modified_by_service_provisioning_errors_count_request_builder.go create mode 100644 identitygovernance/lifecycle_workflows_custom_task_extensions_item_last_modified_by_service_provisioning_errors_request_builder.go create mode 100644 identitygovernance/lifecycle_workflows_deleted_items_workflows_item_created_by_service_provisioning_errors_count_request_builder.go create mode 100644 identitygovernance/lifecycle_workflows_deleted_items_workflows_item_created_by_service_provisioning_errors_request_builder.go create mode 100644 identitygovernance/lifecycle_workflows_deleted_items_workflows_item_last_modified_by_service_provisioning_errors_count_request_builder.go create mode 100644 identitygovernance/lifecycle_workflows_deleted_items_workflows_item_last_modified_by_service_provisioning_errors_request_builder.go create mode 100644 identitygovernance/lifecycle_workflows_deleted_items_workflows_item_runs_item_task_processing_results_item_subject_service_provisioning_errors_count_request_builder.go create mode 100644 identitygovernance/lifecycle_workflows_deleted_items_workflows_item_runs_item_task_processing_results_item_subject_service_provisioning_errors_request_builder.go create mode 100644 identitygovernance/lifecycle_workflows_deleted_items_workflows_item_runs_item_user_processing_results_item_subject_service_provisioning_errors_count_request_builder.go create mode 100644 identitygovernance/lifecycle_workflows_deleted_items_workflows_item_runs_item_user_processing_results_item_subject_service_provisioning_errors_request_builder.go create mode 100644 identitygovernance/lifecycle_workflows_deleted_items_workflows_item_runs_item_user_processing_results_item_task_processing_results_item_subject_service_provisioning_errors_count_request_builder.go create mode 100644 identitygovernance/lifecycle_workflows_deleted_items_workflows_item_runs_item_user_processing_results_item_task_processing_results_item_subject_service_provisioning_errors_request_builder.go create mode 100644 identitygovernance/lifecycle_workflows_deleted_items_workflows_item_task_reports_item_task_processing_results_item_subject_service_provisioning_errors_count_request_builder.go create mode 100644 identitygovernance/lifecycle_workflows_deleted_items_workflows_item_task_reports_item_task_processing_results_item_subject_service_provisioning_errors_request_builder.go create mode 100644 identitygovernance/lifecycle_workflows_deleted_items_workflows_item_tasks_item_task_processing_results_item_subject_service_provisioning_errors_count_request_builder.go create mode 100644 identitygovernance/lifecycle_workflows_deleted_items_workflows_item_tasks_item_task_processing_results_item_subject_service_provisioning_errors_request_builder.go create mode 100644 identitygovernance/lifecycle_workflows_deleted_items_workflows_item_user_processing_results_item_subject_service_provisioning_errors_count_request_builder.go create mode 100644 identitygovernance/lifecycle_workflows_deleted_items_workflows_item_user_processing_results_item_subject_service_provisioning_errors_request_builder.go create mode 100644 identitygovernance/lifecycle_workflows_deleted_items_workflows_item_user_processing_results_item_task_processing_results_item_subject_service_provisioning_errors_count_request_builder.go create mode 100644 identitygovernance/lifecycle_workflows_deleted_items_workflows_item_user_processing_results_item_task_processing_results_item_subject_service_provisioning_errors_request_builder.go create mode 100644 identitygovernance/lifecycle_workflows_deleted_items_workflows_item_versions_item_created_by_service_provisioning_errors_count_request_builder.go create mode 100644 identitygovernance/lifecycle_workflows_deleted_items_workflows_item_versions_item_created_by_service_provisioning_errors_request_builder.go create mode 100644 identitygovernance/lifecycle_workflows_deleted_items_workflows_item_versions_item_last_modified_by_service_provisioning_errors_count_request_builder.go create mode 100644 identitygovernance/lifecycle_workflows_deleted_items_workflows_item_versions_item_last_modified_by_service_provisioning_errors_request_builder.go create mode 100644 identitygovernance/lifecycle_workflows_deleted_items_workflows_item_versions_item_tasks_item_task_processing_results_item_subject_service_provisioning_errors_count_request_builder.go create mode 100644 identitygovernance/lifecycle_workflows_deleted_items_workflows_item_versions_item_tasks_item_task_processing_results_item_subject_service_provisioning_errors_request_builder.go create mode 100644 identitygovernance/lifecycle_workflows_workflow_templates_item_tasks_item_task_processing_results_item_subject_service_provisioning_errors_count_request_builder.go create mode 100644 identitygovernance/lifecycle_workflows_workflow_templates_item_tasks_item_task_processing_results_item_subject_service_provisioning_errors_request_builder.go create mode 100644 identitygovernance/lifecycle_workflows_workflows_item_created_by_service_provisioning_errors_count_request_builder.go create mode 100644 identitygovernance/lifecycle_workflows_workflows_item_created_by_service_provisioning_errors_request_builder.go create mode 100644 identitygovernance/lifecycle_workflows_workflows_item_last_modified_by_service_provisioning_errors_count_request_builder.go create mode 100644 identitygovernance/lifecycle_workflows_workflows_item_last_modified_by_service_provisioning_errors_request_builder.go create mode 100644 identitygovernance/lifecycle_workflows_workflows_item_runs_item_task_processing_results_item_subject_service_provisioning_errors_count_request_builder.go create mode 100644 identitygovernance/lifecycle_workflows_workflows_item_runs_item_task_processing_results_item_subject_service_provisioning_errors_request_builder.go create mode 100644 identitygovernance/lifecycle_workflows_workflows_item_runs_item_user_processing_results_item_subject_service_provisioning_errors_count_request_builder.go create mode 100644 identitygovernance/lifecycle_workflows_workflows_item_runs_item_user_processing_results_item_subject_service_provisioning_errors_request_builder.go create mode 100644 identitygovernance/lifecycle_workflows_workflows_item_runs_item_user_processing_results_item_task_processing_results_item_subject_service_provisioning_errors_count_request_builder.go create mode 100644 identitygovernance/lifecycle_workflows_workflows_item_runs_item_user_processing_results_item_task_processing_results_item_subject_service_provisioning_errors_request_builder.go create mode 100644 identitygovernance/lifecycle_workflows_workflows_item_task_reports_item_task_processing_results_item_subject_service_provisioning_errors_count_request_builder.go create mode 100644 identitygovernance/lifecycle_workflows_workflows_item_task_reports_item_task_processing_results_item_subject_service_provisioning_errors_request_builder.go create mode 100644 identitygovernance/lifecycle_workflows_workflows_item_tasks_item_task_processing_results_item_subject_service_provisioning_errors_count_request_builder.go create mode 100644 identitygovernance/lifecycle_workflows_workflows_item_tasks_item_task_processing_results_item_subject_service_provisioning_errors_request_builder.go create mode 100644 identitygovernance/lifecycle_workflows_workflows_item_user_processing_results_item_subject_service_provisioning_errors_count_request_builder.go create mode 100644 identitygovernance/lifecycle_workflows_workflows_item_user_processing_results_item_subject_service_provisioning_errors_request_builder.go create mode 100644 identitygovernance/lifecycle_workflows_workflows_item_user_processing_results_item_task_processing_results_item_subject_service_provisioning_errors_count_request_builder.go create mode 100644 identitygovernance/lifecycle_workflows_workflows_item_user_processing_results_item_task_processing_results_item_subject_service_provisioning_errors_request_builder.go create mode 100644 identitygovernance/lifecycle_workflows_workflows_item_versions_item_created_by_service_provisioning_errors_count_request_builder.go create mode 100644 identitygovernance/lifecycle_workflows_workflows_item_versions_item_created_by_service_provisioning_errors_request_builder.go create mode 100644 identitygovernance/lifecycle_workflows_workflows_item_versions_item_last_modified_by_service_provisioning_errors_count_request_builder.go create mode 100644 identitygovernance/lifecycle_workflows_workflows_item_versions_item_last_modified_by_service_provisioning_errors_request_builder.go create mode 100644 identitygovernance/lifecycle_workflows_workflows_item_versions_item_tasks_item_task_processing_results_item_subject_service_provisioning_errors_count_request_builder.go create mode 100644 identitygovernance/lifecycle_workflows_workflows_item_versions_item_tasks_item_task_processing_results_item_subject_service_provisioning_errors_request_builder.go create mode 100644 identitygovernance/privileged_access_group_assignment_schedule_instances_item_group_service_provisioning_errors_count_request_builder.go create mode 100644 identitygovernance/privileged_access_group_assignment_schedule_instances_item_group_service_provisioning_errors_request_builder.go create mode 100644 identitygovernance/privileged_access_group_assignment_schedule_requests_item_group_service_provisioning_errors_count_request_builder.go create mode 100644 identitygovernance/privileged_access_group_assignment_schedule_requests_item_group_service_provisioning_errors_request_builder.go create mode 100644 identitygovernance/privileged_access_group_assignment_schedules_item_group_service_provisioning_errors_count_request_builder.go create mode 100644 identitygovernance/privileged_access_group_assignment_schedules_item_group_service_provisioning_errors_request_builder.go create mode 100644 identitygovernance/privileged_access_group_eligibility_schedule_instances_item_group_service_provisioning_errors_count_request_builder.go create mode 100644 identitygovernance/privileged_access_group_eligibility_schedule_instances_item_group_service_provisioning_errors_request_builder.go create mode 100644 identitygovernance/privileged_access_group_eligibility_schedule_requests_item_group_service_provisioning_errors_count_request_builder.go create mode 100644 identitygovernance/privileged_access_group_eligibility_schedule_requests_item_group_service_provisioning_errors_request_builder.go create mode 100644 identitygovernance/privileged_access_group_eligibility_schedules_item_group_service_provisioning_errors_count_request_builder.go create mode 100644 identitygovernance/privileged_access_group_eligibility_schedules_item_group_service_provisioning_errors_request_builder.go create mode 100644 invitations/item_invited_user_service_provisioning_errors_count_request_builder.go create mode 100644 invitations/item_invited_user_service_provisioning_errors_request_builder.go create mode 100644 mobilitymanagementpolicies/item_included_groups_item_service_provisioning_errors_count_request_builder.go create mode 100644 mobilitymanagementpolicies/item_included_groups_item_service_provisioning_errors_request_builder.go create mode 100644 models/admin_windows.go delete mode 100644 models/ediscovery/case_escapedable.go create mode 100644 models/file_encryption_info.go create mode 100644 models/ios_vpp_app_assigned_license_collection_response.go create mode 100644 models/mobile_app_content_collection_response.go create mode 100644 models/mobile_app_content_file_collection_response.go create mode 100644 models/mobile_contained_app_collection_response.go create mode 100644 models/service_provisioning_error_collection_response.go create mode 100644 models/vendor_escapedable.go create mode 100644 models/workspace_collection_response.go create mode 100644 models/x509_certificate_issuer_hints_configuration.go create mode 100644 models/x509_certificate_issuer_hints_state.go create mode 100644 places/item_graph_room_list_rooms_count_request_builder.go create mode 100644 places/item_graph_room_list_rooms_request_builder.go create mode 100644 places/item_graph_room_list_rooms_room_item_request_builder.go create mode 100644 places/item_graph_room_list_workspaces_count_request_builder.go create mode 100644 places/item_graph_room_list_workspaces_request_builder.go create mode 100644 places/item_graph_room_list_workspaces_workspace_item_request_builder.go create mode 100644 policies/mobile_app_management_policies_item_included_groups_item_service_provisioning_errors_count_request_builder.go create mode 100644 policies/mobile_app_management_policies_item_included_groups_item_service_provisioning_errors_request_builder.go create mode 100644 policies/mobile_device_management_policies_item_included_groups_item_service_provisioning_errors_count_request_builder.go create mode 100644 policies/mobile_device_management_policies_item_included_groups_item_service_provisioning_errors_request_builder.go create mode 100644 print/printer_shares_item_allowed_groups_item_service_provisioning_errors_count_request_builder.go create mode 100644 print/printer_shares_item_allowed_groups_item_service_provisioning_errors_request_builder.go create mode 100644 print/printer_shares_item_allowed_users_item_service_provisioning_errors_count_request_builder.go create mode 100644 print/printer_shares_item_allowed_users_item_service_provisioning_errors_request_builder.go create mode 100644 print/shares_item_allowed_groups_item_service_provisioning_errors_count_request_builder.go create mode 100644 print/shares_item_allowed_groups_item_service_provisioning_errors_request_builder.go create mode 100644 print/shares_item_allowed_users_item_service_provisioning_errors_count_request_builder.go create mode 100644 print/shares_item_allowed_users_item_service_provisioning_errors_request_builder.go create mode 100644 privacy/subject_rights_requests_item_approvers_item_service_provisioning_errors_count_request_builder.go create mode 100644 privacy/subject_rights_requests_item_approvers_item_service_provisioning_errors_request_builder.go create mode 100644 privacy/subject_rights_requests_item_collaborators_item_service_provisioning_errors_count_request_builder.go create mode 100644 privacy/subject_rights_requests_item_collaborators_item_service_provisioning_errors_request_builder.go create mode 100644 security/cases_ediscovery_cases_item_custodians_item_unified_group_sources_item_group_service_provisioning_errors_count_request_builder.go create mode 100644 security/cases_ediscovery_cases_item_custodians_item_unified_group_sources_item_group_service_provisioning_errors_request_builder.go create mode 100644 security/subject_rights_requests_item_approvers_item_service_provisioning_errors_count_request_builder.go create mode 100644 security/subject_rights_requests_item_approvers_item_service_provisioning_errors_request_builder.go create mode 100644 security/subject_rights_requests_item_collaborators_item_service_provisioning_errors_count_request_builder.go create mode 100644 security/subject_rights_requests_item_collaborators_item_service_provisioning_errors_request_builder.go create mode 100644 shares/item_created_by_user_service_provisioning_errors_count_request_builder.go create mode 100644 shares/item_created_by_user_service_provisioning_errors_request_builder.go create mode 100644 shares/item_last_modified_by_user_service_provisioning_errors_count_request_builder.go create mode 100644 shares/item_last_modified_by_user_service_provisioning_errors_request_builder.go create mode 100644 shares/item_list_created_by_user_service_provisioning_errors_count_request_builder.go create mode 100644 shares/item_list_created_by_user_service_provisioning_errors_request_builder.go create mode 100644 shares/item_list_items_item_created_by_user_service_provisioning_errors_count_request_builder.go create mode 100644 shares/item_list_items_item_created_by_user_service_provisioning_errors_request_builder.go create mode 100644 shares/item_list_items_item_last_modified_by_user_service_provisioning_errors_count_request_builder.go create mode 100644 shares/item_list_items_item_last_modified_by_user_service_provisioning_errors_request_builder.go create mode 100644 shares/item_list_last_modified_by_user_service_provisioning_errors_count_request_builder.go create mode 100644 shares/item_list_last_modified_by_user_service_provisioning_errors_request_builder.go create mode 100644 sites/item_created_by_user_service_provisioning_errors_count_request_builder.go create mode 100644 sites/item_created_by_user_service_provisioning_errors_request_builder.go create mode 100644 sites/item_last_modified_by_user_service_provisioning_errors_count_request_builder.go create mode 100644 sites/item_last_modified_by_user_service_provisioning_errors_request_builder.go create mode 100644 sites/item_lists_item_created_by_user_service_provisioning_errors_count_request_builder.go create mode 100644 sites/item_lists_item_created_by_user_service_provisioning_errors_request_builder.go create mode 100644 sites/item_lists_item_items_item_created_by_user_service_provisioning_errors_count_request_builder.go create mode 100644 sites/item_lists_item_items_item_created_by_user_service_provisioning_errors_request_builder.go create mode 100644 sites/item_lists_item_items_item_last_modified_by_user_service_provisioning_errors_count_request_builder.go create mode 100644 sites/item_lists_item_items_item_last_modified_by_user_service_provisioning_errors_request_builder.go create mode 100644 sites/item_lists_item_last_modified_by_user_service_provisioning_errors_count_request_builder.go create mode 100644 sites/item_lists_item_last_modified_by_user_service_provisioning_errors_request_builder.go create mode 100644 sites/item_pages_item_created_by_user_service_provisioning_errors_count_request_builder.go create mode 100644 sites/item_pages_item_created_by_user_service_provisioning_errors_request_builder.go create mode 100644 sites/item_pages_item_last_modified_by_user_service_provisioning_errors_count_request_builder.go create mode 100644 sites/item_pages_item_last_modified_by_user_service_provisioning_errors_request_builder.go create mode 100644 teams/item_group_service_provisioning_errors_count_request_builder.go create mode 100644 teams/item_group_service_provisioning_errors_request_builder.go create mode 100644 teams/item_owners_item_service_provisioning_errors_count_request_builder.go create mode 100644 teams/item_owners_item_service_provisioning_errors_request_builder.go create mode 100644 teamtemplatedefinition/item_team_definition_group_service_provisioning_errors_count_request_builder.go create mode 100644 teamtemplatedefinition/item_team_definition_group_service_provisioning_errors_request_builder.go create mode 100644 teamtemplatedefinition/item_team_definition_owners_item_service_provisioning_errors_count_request_builder.go create mode 100644 teamtemplatedefinition/item_team_definition_owners_item_service_provisioning_errors_request_builder.go create mode 100644 teamwork/team_templates_item_definitions_item_team_definition_group_service_provisioning_errors_count_request_builder.go create mode 100644 teamwork/team_templates_item_definitions_item_team_definition_group_service_provisioning_errors_request_builder.go create mode 100644 teamwork/team_templates_item_definitions_item_team_definition_owners_item_service_provisioning_errors_count_request_builder.go create mode 100644 teamwork/team_templates_item_definitions_item_team_definition_owners_item_service_provisioning_errors_request_builder.go create mode 100644 users/item_service_provisioning_errors_count_request_builder.go create mode 100644 users/item_service_provisioning_errors_request_builder.go diff --git a/admin/windows_updates_resource_connections_resource_connection_item_request_builder.go b/admin/windows_updates_resource_connections_resource_connection_item_request_builder.go index d037bc6f4df..5e2b54fc1d1 100644 --- a/admin/windows_updates_resource_connections_resource_connection_item_request_builder.go +++ b/admin/windows_updates_resource_connections_resource_connection_item_request_builder.go @@ -54,10 +54,10 @@ func NewWindowsUpdatesResourceConnectionsResourceConnectionItemRequestBuilder(ra urlParams["request-raw-url"] = rawUrl return NewWindowsUpdatesResourceConnectionsResourceConnectionItemRequestBuilderInternal(urlParams, requestAdapter) } -// Delete delete an operationalInsightsConnection object. +// Delete delete a resourceConnection object. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/windowsupdates-operationalinsightsconnection-delete?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/windowsupdates-resourceconnection-delete?view=graph-rest-1.0 func (m *WindowsUpdatesResourceConnectionsResourceConnectionItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *WindowsUpdatesResourceConnectionsResourceConnectionItemRequestBuilderDeleteRequestConfiguration)(error) { requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); if err != nil { @@ -114,7 +114,7 @@ func (m *WindowsUpdatesResourceConnectionsResourceConnectionItemRequestBuilder) } return res.(i17376df570f19ff3c32da2d66a677d31250ed0ff64059351645f48a152316b3c.ResourceConnectionable), nil } -// ToDeleteRequestInformation delete an operationalInsightsConnection object. +// ToDeleteRequestInformation delete a resourceConnection object. func (m *WindowsUpdatesResourceConnectionsResourceConnectionItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *WindowsUpdatesResourceConnectionsResourceConnectionItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/admin/windows_updates_updatable_assets_updatable_asset_item_request_builder.go b/admin/windows_updates_updatable_assets_updatable_asset_item_request_builder.go index a70a8679126..24ba3006327 100644 --- a/admin/windows_updates_updatable_assets_updatable_asset_item_request_builder.go +++ b/admin/windows_updates_updatable_assets_updatable_asset_item_request_builder.go @@ -18,7 +18,7 @@ type WindowsUpdatesUpdatableAssetsUpdatableAssetItemRequestBuilderDeleteRequestC // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// WindowsUpdatesUpdatableAssetsUpdatableAssetItemRequestBuilderGetQueryParameters read the properties and relationships of an updatableAssetGroup object. +// WindowsUpdatesUpdatableAssetsUpdatableAssetItemRequestBuilderGetQueryParameters read the properties and relationships of an updatableAsset object. type WindowsUpdatesUpdatableAssetsUpdatableAssetItemRequestBuilderGetQueryParameters struct { // Expand related entities Expand []string `uriparametername:"%24expand"` @@ -73,10 +73,10 @@ func (m *WindowsUpdatesUpdatableAssetsUpdatableAssetItemRequestBuilder) Delete(c } return nil } -// Get read the properties and relationships of an updatableAssetGroup object. +// Get read the properties and relationships of an updatableAsset object. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/windowsupdates-updatableassetgroup-get?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/windowsupdates-updatableasset-get?view=graph-rest-1.0 func (m *WindowsUpdatesUpdatableAssetsUpdatableAssetItemRequestBuilder) Get(ctx context.Context, requestConfiguration *WindowsUpdatesUpdatableAssetsUpdatableAssetItemRequestBuilderGetRequestConfiguration)(i17376df570f19ff3c32da2d66a677d31250ed0ff64059351645f48a152316b3c.UpdatableAssetable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -142,7 +142,7 @@ func (m *WindowsUpdatesUpdatableAssetsUpdatableAssetItemRequestBuilder) ToDelete } return requestInfo, nil } -// ToGetRequestInformation read the properties and relationships of an updatableAssetGroup object. +// ToGetRequestInformation read the properties and relationships of an updatableAsset object. func (m *WindowsUpdatesUpdatableAssetsUpdatableAssetItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *WindowsUpdatesUpdatableAssetsUpdatableAssetItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/admin/windows_updates_update_policies_item_compliance_changes_compliance_change_item_request_builder.go b/admin/windows_updates_update_policies_item_compliance_changes_compliance_change_item_request_builder.go index af6fc249055..c2adef961aa 100644 --- a/admin/windows_updates_update_policies_item_compliance_changes_compliance_change_item_request_builder.go +++ b/admin/windows_updates_update_policies_item_compliance_changes_compliance_change_item_request_builder.go @@ -54,10 +54,10 @@ func NewWindowsUpdatesUpdatePoliciesItemComplianceChangesComplianceChangeItemReq urlParams["request-raw-url"] = rawUrl return NewWindowsUpdatesUpdatePoliciesItemComplianceChangesComplianceChangeItemRequestBuilderInternal(urlParams, requestAdapter) } -// Delete delete a contentApproval object. +// Delete delete a complianceChange object. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/windowsupdates-contentapproval-delete?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/windowsupdates-compliancechange-delete?view=graph-rest-1.0 func (m *WindowsUpdatesUpdatePoliciesItemComplianceChangesComplianceChangeItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *WindowsUpdatesUpdatePoliciesItemComplianceChangesComplianceChangeItemRequestBuilderDeleteRequestConfiguration)(error) { requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); if err != nil { @@ -117,7 +117,7 @@ func (m *WindowsUpdatesUpdatePoliciesItemComplianceChangesComplianceChangeItemRe } return res.(i17376df570f19ff3c32da2d66a677d31250ed0ff64059351645f48a152316b3c.ComplianceChangeable), nil } -// ToDeleteRequestInformation delete a contentApproval object. +// ToDeleteRequestInformation delete a complianceChange object. func (m *WindowsUpdatesUpdatePoliciesItemComplianceChangesComplianceChangeItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *WindowsUpdatesUpdatePoliciesItemComplianceChangesComplianceChangeItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/app/online_meetings_item_registration_request_builder.go b/app/online_meetings_item_registration_request_builder.go index a80ef20d7d2..049120a5eb6 100644 --- a/app/online_meetings_item_registration_request_builder.go +++ b/app/online_meetings_item_registration_request_builder.go @@ -58,10 +58,10 @@ func NewOnlineMeetingsItemRegistrationRequestBuilder(rawUrl string, requestAdapt func (m *OnlineMeetingsItemRegistrationRequestBuilder) CustomQuestions()(*OnlineMeetingsItemRegistrationCustomQuestionsRequestBuilder) { return NewOnlineMeetingsItemRegistrationCustomQuestionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Delete disable and delete the meetingRegistration of an onlineMeeting on behalf of the organizer. +// Delete disable and delete the externalMeetingRegistration of an onlineMeeting. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/meetingregistration-delete?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/externalmeetingregistration-delete?view=graph-rest-1.0 func (m *OnlineMeetingsItemRegistrationRequestBuilder) Delete(ctx context.Context, requestConfiguration *OnlineMeetingsItemRegistrationRequestBuilderDeleteRequestConfiguration)(error) { requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); if err != nil { @@ -125,7 +125,7 @@ func (m *OnlineMeetingsItemRegistrationRequestBuilder) Patch(ctx context.Context func (m *OnlineMeetingsItemRegistrationRequestBuilder) Registrants()(*OnlineMeetingsItemRegistrationRegistrantsRequestBuilder) { return NewOnlineMeetingsItemRegistrationRegistrantsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// ToDeleteRequestInformation disable and delete the meetingRegistration of an onlineMeeting on behalf of the organizer. +// ToDeleteRequestInformation disable and delete the externalMeetingRegistration of an onlineMeeting. func (m *OnlineMeetingsItemRegistrationRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *OnlineMeetingsItemRegistrationRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/applications/item_add_key_request_builder.go b/applications/item_add_key_request_builder.go index 42bbc9f9251..b52dade349a 100644 --- a/applications/item_add_key_request_builder.go +++ b/applications/item_add_key_request_builder.go @@ -31,7 +31,7 @@ func NewItemAddKeyRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263 urlParams["request-raw-url"] = rawUrl return NewItemAddKeyRequestBuilderInternal(urlParams, requestAdapter) } -// Post 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. +// Post 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. // [Find more info here] // // [Find more info here]: https://learn.microsoft.com/graph/api/application-addkey?view=graph-rest-1.0 @@ -53,7 +53,7 @@ func (m *ItemAddKeyRequestBuilder) Post(ctx context.Context, body ItemAddKeyPost } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.KeyCredentialable), nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation 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. func (m *ItemAddKeyRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemAddKeyPostRequestBodyable, requestConfiguration *ItemAddKeyRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/chats/item_messages_request_builder.go b/chats/item_messages_request_builder.go index aaef9ddf4f4..ca2090c9d43 100644 --- a/chats/item_messages_request_builder.go +++ b/chats/item_messages_request_builder.go @@ -100,10 +100,10 @@ func (m *ItemMessagesRequestBuilder) Get(ctx context.Context, requestConfigurati } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageCollectionResponseable), nil } -// Post send a new chatMessage in the specified channel or a chat. +// Post send a new chatMessage 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 creating a chat message. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/chatmessage-post?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/chat-post-messages?view=graph-rest-1.0 func (m *ItemMessagesRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, requestConfiguration *ItemMessagesRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -138,7 +138,7 @@ func (m *ItemMessagesRequestBuilder) ToGetRequestInformation(ctx context.Context } return requestInfo, nil } -// ToPostRequestInformation send a new chatMessage in the specified channel or a chat. +// ToPostRequestInformation send a new chatMessage 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 creating a chat message. func (m *ItemMessagesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, requestConfiguration *ItemMessagesRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/communications/online_meetings_item_registration_request_builder.go b/communications/online_meetings_item_registration_request_builder.go index 68e4b671275..333b73ec646 100644 --- a/communications/online_meetings_item_registration_request_builder.go +++ b/communications/online_meetings_item_registration_request_builder.go @@ -58,10 +58,10 @@ func NewOnlineMeetingsItemRegistrationRequestBuilder(rawUrl string, requestAdapt func (m *OnlineMeetingsItemRegistrationRequestBuilder) CustomQuestions()(*OnlineMeetingsItemRegistrationCustomQuestionsRequestBuilder) { return NewOnlineMeetingsItemRegistrationCustomQuestionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Delete disable and delete the meetingRegistration of an onlineMeeting on behalf of the organizer. +// Delete disable and delete the externalMeetingRegistration of an onlineMeeting. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/meetingregistration-delete?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/externalmeetingregistration-delete?view=graph-rest-1.0 func (m *OnlineMeetingsItemRegistrationRequestBuilder) Delete(ctx context.Context, requestConfiguration *OnlineMeetingsItemRegistrationRequestBuilderDeleteRequestConfiguration)(error) { requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); if err != nil { @@ -125,7 +125,7 @@ func (m *OnlineMeetingsItemRegistrationRequestBuilder) Patch(ctx context.Context func (m *OnlineMeetingsItemRegistrationRequestBuilder) Registrants()(*OnlineMeetingsItemRegistrationRegistrantsRequestBuilder) { return NewOnlineMeetingsItemRegistrationRegistrantsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// ToDeleteRequestInformation disable and delete the meetingRegistration of an onlineMeeting on behalf of the organizer. +// ToDeleteRequestInformation disable and delete the externalMeetingRegistration of an onlineMeeting. func (m *OnlineMeetingsItemRegistrationRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *OnlineMeetingsItemRegistrationRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/compliance/ediscovery_cases_item_custodians_item_unified_group_sources_item_group_request_builder.go b/compliance/ediscovery_cases_item_custodians_item_unified_group_sources_item_group_request_builder.go index 85ee036764f..72f57c99776 100644 --- a/compliance/ediscovery_cases_item_custodians_item_unified_group_sources_item_group_request_builder.go +++ b/compliance/ediscovery_cases_item_custodians_item_unified_group_sources_item_group_request_builder.go @@ -60,6 +60,10 @@ func (m *EdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupRequestBui } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Groupable), nil } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *EdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupRequestBuilder) ServiceProvisioningErrors()(*EdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilder) { + return NewEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation the group associated with the unifiedGroupSource. // Deprecated: The ediscovery Apis are deprecated under /compliance and will stop returning data from February 01, 2023. Please use the new ediscovery Apis under /security. as of 2022-12/ediscoveryNamespace on 2022-12-05 and will be removed 2023-02-01 func (m *EdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *EdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { diff --git a/compliance/ediscovery_cases_item_custodians_item_unified_group_sources_item_group_service_provisioning_errors_count_request_builder.go b/compliance/ediscovery_cases_item_custodians_item_unified_group_sources_item_group_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..7c36aeaebad --- /dev/null +++ b/compliance/ediscovery_cases_item_custodians_item_unified_group_sources_item_group_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,83 @@ +package compliance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// EdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type EdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// EdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type EdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// EdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type EdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *EdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*EdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilder) { + m := &EdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/compliance/ediscovery/cases/{case%2Did}/custodians/{custodian%2Did}/unifiedGroupSources/{unifiedGroupSource%2Did}/group/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*EdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +// Deprecated: The ediscovery Apis are deprecated under /compliance and will stop returning data from February 01, 2023. Please use the new ediscovery Apis under /security. as of 2022-12/ediscoveryNamespace on 2022-12-05 and will be removed 2023-02-01 +func (m *EdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *EdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +// Deprecated: The ediscovery Apis are deprecated under /compliance and will stop returning data from February 01, 2023. Please use the new ediscovery Apis under /security. as of 2022-12/ediscoveryNamespace on 2022-12-05 and will be removed 2023-02-01 +func (m *EdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *EdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: The ediscovery Apis are deprecated under /compliance and will stop returning data from February 01, 2023. Please use the new ediscovery Apis under /security. as of 2022-12/ediscoveryNamespace on 2022-12-05 and will be removed 2023-02-01 +func (m *EdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*EdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilder) { + return NewEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/compliance/ediscovery_cases_item_custodians_item_unified_group_sources_item_group_service_provisioning_errors_request_builder.go b/compliance/ediscovery_cases_item_custodians_item_unified_group_sources_item_group_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..db500278511 --- /dev/null +++ b/compliance/ediscovery_cases_item_custodians_item_unified_group_sources_item_group_service_provisioning_errors_request_builder.go @@ -0,0 +1,100 @@ +package compliance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// EdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \compliance\ediscovery\cases\{case-id}\custodians\{custodian-id}\unifiedGroupSources\{unifiedGroupSource-id}\group\serviceProvisioningErrors +type EdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// EdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +type EdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// EdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type EdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *EdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*EdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilder) { + m := &EdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/compliance/ediscovery/cases/{case%2Did}/custodians/{custodian%2Did}/unifiedGroupSources/{unifiedGroupSource%2Did}/group/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*EdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *EdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilder) Count()(*EdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilder) { + return NewEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +// Deprecated: The ediscovery Apis are deprecated under /compliance and will stop returning data from February 01, 2023. Please use the new ediscovery Apis under /security. as of 2022-12/ediscoveryNamespace on 2022-12-05 and will be removed 2023-02-01 +func (m *EdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *EdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +// Deprecated: The ediscovery Apis are deprecated under /compliance and will stop returning data from February 01, 2023. Please use the new ediscovery Apis under /security. as of 2022-12/ediscoveryNamespace on 2022-12-05 and will be removed 2023-02-01 +func (m *EdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *EdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: The ediscovery Apis are deprecated under /compliance and will stop returning data from February 01, 2023. Please use the new ediscovery Apis under /security. as of 2022-12/ediscoveryNamespace on 2022-12-05 and will be removed 2023-02-01 +func (m *EdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*EdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilder) { + return NewEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/compliance/ediscovery_cases_item_legal_holds_item_unified_group_sources_item_group_request_builder.go b/compliance/ediscovery_cases_item_legal_holds_item_unified_group_sources_item_group_request_builder.go index c3d7ff0116e..548b1cf4559 100644 --- a/compliance/ediscovery_cases_item_legal_holds_item_unified_group_sources_item_group_request_builder.go +++ b/compliance/ediscovery_cases_item_legal_holds_item_unified_group_sources_item_group_request_builder.go @@ -60,6 +60,10 @@ func (m *EdiscoveryCasesItemLegalHoldsItemUnifiedGroupSourcesItemGroupRequestBui } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Groupable), nil } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *EdiscoveryCasesItemLegalHoldsItemUnifiedGroupSourcesItemGroupRequestBuilder) ServiceProvisioningErrors()(*EdiscoveryCasesItemLegalHoldsItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilder) { + return NewEdiscoveryCasesItemLegalHoldsItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation the group associated with the unifiedGroupSource. // Deprecated: The ediscovery Apis are deprecated under /compliance and will stop returning data from February 01, 2023. Please use the new ediscovery Apis under /security. as of 2022-12/ediscoveryNamespace on 2022-12-05 and will be removed 2023-02-01 func (m *EdiscoveryCasesItemLegalHoldsItemUnifiedGroupSourcesItemGroupRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *EdiscoveryCasesItemLegalHoldsItemUnifiedGroupSourcesItemGroupRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { diff --git a/compliance/ediscovery_cases_item_legal_holds_item_unified_group_sources_item_group_service_provisioning_errors_count_request_builder.go b/compliance/ediscovery_cases_item_legal_holds_item_unified_group_sources_item_group_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..78e227fc50d --- /dev/null +++ b/compliance/ediscovery_cases_item_legal_holds_item_unified_group_sources_item_group_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,83 @@ +package compliance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// EdiscoveryCasesItemLegalHoldsItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type EdiscoveryCasesItemLegalHoldsItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// EdiscoveryCasesItemLegalHoldsItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type EdiscoveryCasesItemLegalHoldsItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// EdiscoveryCasesItemLegalHoldsItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type EdiscoveryCasesItemLegalHoldsItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *EdiscoveryCasesItemLegalHoldsItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewEdiscoveryCasesItemLegalHoldsItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewEdiscoveryCasesItemLegalHoldsItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*EdiscoveryCasesItemLegalHoldsItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilder) { + m := &EdiscoveryCasesItemLegalHoldsItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/compliance/ediscovery/cases/{case%2Did}/legalHolds/{legalHold%2Did}/unifiedGroupSources/{unifiedGroupSource%2Did}/group/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewEdiscoveryCasesItemLegalHoldsItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewEdiscoveryCasesItemLegalHoldsItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*EdiscoveryCasesItemLegalHoldsItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewEdiscoveryCasesItemLegalHoldsItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +// Deprecated: The ediscovery Apis are deprecated under /compliance and will stop returning data from February 01, 2023. Please use the new ediscovery Apis under /security. as of 2022-12/ediscoveryNamespace on 2022-12-05 and will be removed 2023-02-01 +func (m *EdiscoveryCasesItemLegalHoldsItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *EdiscoveryCasesItemLegalHoldsItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +// Deprecated: The ediscovery Apis are deprecated under /compliance and will stop returning data from February 01, 2023. Please use the new ediscovery Apis under /security. as of 2022-12/ediscoveryNamespace on 2022-12-05 and will be removed 2023-02-01 +func (m *EdiscoveryCasesItemLegalHoldsItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *EdiscoveryCasesItemLegalHoldsItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: The ediscovery Apis are deprecated under /compliance and will stop returning data from February 01, 2023. Please use the new ediscovery Apis under /security. as of 2022-12/ediscoveryNamespace on 2022-12-05 and will be removed 2023-02-01 +func (m *EdiscoveryCasesItemLegalHoldsItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*EdiscoveryCasesItemLegalHoldsItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilder) { + return NewEdiscoveryCasesItemLegalHoldsItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/compliance/ediscovery_cases_item_legal_holds_item_unified_group_sources_item_group_service_provisioning_errors_request_builder.go b/compliance/ediscovery_cases_item_legal_holds_item_unified_group_sources_item_group_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..123e890c3d3 --- /dev/null +++ b/compliance/ediscovery_cases_item_legal_holds_item_unified_group_sources_item_group_service_provisioning_errors_request_builder.go @@ -0,0 +1,100 @@ +package compliance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// EdiscoveryCasesItemLegalHoldsItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \compliance\ediscovery\cases\{case-id}\legalHolds\{legalHold-id}\unifiedGroupSources\{unifiedGroupSource-id}\group\serviceProvisioningErrors +type EdiscoveryCasesItemLegalHoldsItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// EdiscoveryCasesItemLegalHoldsItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +type EdiscoveryCasesItemLegalHoldsItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// EdiscoveryCasesItemLegalHoldsItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type EdiscoveryCasesItemLegalHoldsItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *EdiscoveryCasesItemLegalHoldsItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewEdiscoveryCasesItemLegalHoldsItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewEdiscoveryCasesItemLegalHoldsItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*EdiscoveryCasesItemLegalHoldsItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilder) { + m := &EdiscoveryCasesItemLegalHoldsItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/compliance/ediscovery/cases/{case%2Did}/legalHolds/{legalHold%2Did}/unifiedGroupSources/{unifiedGroupSource%2Did}/group/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewEdiscoveryCasesItemLegalHoldsItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewEdiscoveryCasesItemLegalHoldsItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*EdiscoveryCasesItemLegalHoldsItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewEdiscoveryCasesItemLegalHoldsItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *EdiscoveryCasesItemLegalHoldsItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilder) Count()(*EdiscoveryCasesItemLegalHoldsItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilder) { + return NewEdiscoveryCasesItemLegalHoldsItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +// Deprecated: The ediscovery Apis are deprecated under /compliance and will stop returning data from February 01, 2023. Please use the new ediscovery Apis under /security. as of 2022-12/ediscoveryNamespace on 2022-12-05 and will be removed 2023-02-01 +func (m *EdiscoveryCasesItemLegalHoldsItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *EdiscoveryCasesItemLegalHoldsItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +// Deprecated: The ediscovery Apis are deprecated under /compliance and will stop returning data from February 01, 2023. Please use the new ediscovery Apis under /security. as of 2022-12/ediscoveryNamespace on 2022-12-05 and will be removed 2023-02-01 +func (m *EdiscoveryCasesItemLegalHoldsItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *EdiscoveryCasesItemLegalHoldsItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: The ediscovery Apis are deprecated under /compliance and will stop returning data from February 01, 2023. Please use the new ediscovery Apis under /security. as of 2022-12/ediscoveryNamespace on 2022-12-05 and will be removed 2023-02-01 +func (m *EdiscoveryCasesItemLegalHoldsItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*EdiscoveryCasesItemLegalHoldsItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilder) { + return NewEdiscoveryCasesItemLegalHoldsItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/compliance/ediscovery_cases_item_operations_item_microsoft_graph_ediscovery_case_export_operation_request_builder.go b/compliance/ediscovery_cases_item_operations_item_microsoft_graph_ediscovery_case_export_operation_request_builder.go index 0af1bf2c689..af3953fc934 100644 --- a/compliance/ediscovery_cases_item_operations_item_microsoft_graph_ediscovery_case_export_operation_request_builder.go +++ b/compliance/ediscovery_cases_item_operations_item_microsoft_graph_ediscovery_case_export_operation_request_builder.go @@ -60,6 +60,10 @@ func (m *EdiscoveryCasesItemOperationsItemMicrosoftGraphEdiscoveryCaseExportOper } return res.(ic154d683aa4025ee28853b9c1a3c35cd1f093a1c4542feba4c07682e2752db13.CaseExportOperationable), nil } +// ReviewSet provides operations to manage the reviewSet property of the microsoft.graph.ediscovery.caseExportOperation entity. +func (m *EdiscoveryCasesItemOperationsItemMicrosoftGraphEdiscoveryCaseExportOperationRequestBuilder) ReviewSet()(*EdiscoveryCasesItemOperationsItemMicrosoftGraphEdiscoveryCaseExportOperationReviewSetRequestBuilder) { + return NewEdiscoveryCasesItemOperationsItemMicrosoftGraphEdiscoveryCaseExportOperationReviewSetRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation get the item of type microsoft.graph.ediscovery.caseOperation as microsoft.graph.ediscovery.caseExportOperation // Deprecated: The ediscovery Apis are deprecated under /compliance and will stop returning data from February 01, 2023. Please use the new ediscovery Apis under /security. as of 2022-12/ediscoveryNamespace on 2022-12-05 and will be removed 2023-02-01 func (m *EdiscoveryCasesItemOperationsItemMicrosoftGraphEdiscoveryCaseExportOperationRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *EdiscoveryCasesItemOperationsItemMicrosoftGraphEdiscoveryCaseExportOperationRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { diff --git a/compliance/ediscovery_cases_item_operations_item_microsoft_graph_ediscovery_case_export_operation_review_set_request_builder.go b/compliance/ediscovery_cases_item_operations_item_microsoft_graph_ediscovery_case_export_operation_review_set_request_builder.go new file mode 100644 index 00000000000..7b35eb09c29 --- /dev/null +++ b/compliance/ediscovery_cases_item_operations_item_microsoft_graph_ediscovery_case_export_operation_review_set_request_builder.go @@ -0,0 +1,84 @@ +package compliance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" + ic154d683aa4025ee28853b9c1a3c35cd1f093a1c4542feba4c07682e2752db13 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/ediscovery" +) + +// EdiscoveryCasesItemOperationsItemMicrosoftGraphEdiscoveryCaseExportOperationReviewSetRequestBuilder provides operations to manage the reviewSet property of the microsoft.graph.ediscovery.caseExportOperation entity. +type EdiscoveryCasesItemOperationsItemMicrosoftGraphEdiscoveryCaseExportOperationReviewSetRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// EdiscoveryCasesItemOperationsItemMicrosoftGraphEdiscoveryCaseExportOperationReviewSetRequestBuilderGetQueryParameters the review set the content is being exported from. +type EdiscoveryCasesItemOperationsItemMicrosoftGraphEdiscoveryCaseExportOperationReviewSetRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// EdiscoveryCasesItemOperationsItemMicrosoftGraphEdiscoveryCaseExportOperationReviewSetRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type EdiscoveryCasesItemOperationsItemMicrosoftGraphEdiscoveryCaseExportOperationReviewSetRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *EdiscoveryCasesItemOperationsItemMicrosoftGraphEdiscoveryCaseExportOperationReviewSetRequestBuilderGetQueryParameters +} +// NewEdiscoveryCasesItemOperationsItemMicrosoftGraphEdiscoveryCaseExportOperationReviewSetRequestBuilderInternal instantiates a new ReviewSetRequestBuilder and sets the default values. +func NewEdiscoveryCasesItemOperationsItemMicrosoftGraphEdiscoveryCaseExportOperationReviewSetRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*EdiscoveryCasesItemOperationsItemMicrosoftGraphEdiscoveryCaseExportOperationReviewSetRequestBuilder) { + m := &EdiscoveryCasesItemOperationsItemMicrosoftGraphEdiscoveryCaseExportOperationReviewSetRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/compliance/ediscovery/cases/{case%2Did}/operations/{caseOperation%2Did}/microsoft.graph.ediscovery.caseExportOperation/reviewSet{?%24select,%24expand}", pathParameters), + } + return m +} +// NewEdiscoveryCasesItemOperationsItemMicrosoftGraphEdiscoveryCaseExportOperationReviewSetRequestBuilder instantiates a new ReviewSetRequestBuilder and sets the default values. +func NewEdiscoveryCasesItemOperationsItemMicrosoftGraphEdiscoveryCaseExportOperationReviewSetRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*EdiscoveryCasesItemOperationsItemMicrosoftGraphEdiscoveryCaseExportOperationReviewSetRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewEdiscoveryCasesItemOperationsItemMicrosoftGraphEdiscoveryCaseExportOperationReviewSetRequestBuilderInternal(urlParams, requestAdapter) +} +// Get the review set the content is being exported from. +// Deprecated: The ediscovery Apis are deprecated under /compliance and will stop returning data from February 01, 2023. Please use the new ediscovery Apis under /security. as of 2022-12/ediscoveryNamespace on 2022-12-05 and will be removed 2023-02-01 +func (m *EdiscoveryCasesItemOperationsItemMicrosoftGraphEdiscoveryCaseExportOperationReviewSetRequestBuilder) Get(ctx context.Context, requestConfiguration *EdiscoveryCasesItemOperationsItemMicrosoftGraphEdiscoveryCaseExportOperationReviewSetRequestBuilderGetRequestConfiguration)(ic154d683aa4025ee28853b9c1a3c35cd1f093a1c4542feba4c07682e2752db13.ReviewSetable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ic154d683aa4025ee28853b9c1a3c35cd1f093a1c4542feba4c07682e2752db13.CreateReviewSetFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ic154d683aa4025ee28853b9c1a3c35cd1f093a1c4542feba4c07682e2752db13.ReviewSetable), nil +} +// ToGetRequestInformation the review set the content is being exported from. +// Deprecated: The ediscovery Apis are deprecated under /compliance and will stop returning data from February 01, 2023. Please use the new ediscovery Apis under /security. as of 2022-12/ediscoveryNamespace on 2022-12-05 and will be removed 2023-02-01 +func (m *EdiscoveryCasesItemOperationsItemMicrosoftGraphEdiscoveryCaseExportOperationReviewSetRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *EdiscoveryCasesItemOperationsItemMicrosoftGraphEdiscoveryCaseExportOperationReviewSetRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: The ediscovery Apis are deprecated under /compliance and will stop returning data from February 01, 2023. Please use the new ediscovery Apis under /security. as of 2022-12/ediscoveryNamespace on 2022-12-05 and will be removed 2023-02-01 +func (m *EdiscoveryCasesItemOperationsItemMicrosoftGraphEdiscoveryCaseExportOperationReviewSetRequestBuilder) WithUrl(rawUrl string)(*EdiscoveryCasesItemOperationsItemMicrosoftGraphEdiscoveryCaseExportOperationReviewSetRequestBuilder) { + return NewEdiscoveryCasesItemOperationsItemMicrosoftGraphEdiscoveryCaseExportOperationReviewSetRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/contacts/item_service_provisioning_errors_count_request_builder.go b/contacts/item_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..6fcb0b269a1 --- /dev/null +++ b/contacts/item_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package contacts + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type ItemServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type ItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// ItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewItemServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewItemServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemServiceProvisioningErrorsCountRequestBuilder) { + m := &ItemServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/contacts/{orgContact%2Did}/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewItemServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewItemServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *ItemServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *ItemServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*ItemServiceProvisioningErrorsCountRequestBuilder) { + return NewItemServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/contacts/item_service_provisioning_errors_request_builder.go b/contacts/item_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..21beb3d1862 --- /dev/null +++ b/contacts/item_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package contacts + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \contacts\{orgContact-id}\serviceProvisioningErrors +type ItemServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from an orgContact object . Supports $filter (eq, not, for isResolved and serviceInstance). +type ItemServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// ItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewItemServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemServiceProvisioningErrorsRequestBuilder) { + m := &ItemServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/contacts/{orgContact%2Did}/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewItemServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *ItemServiceProvisioningErrorsRequestBuilder) Count()(*ItemServiceProvisioningErrorsCountRequestBuilder) { + return NewItemServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from an orgContact object . Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from an orgContact object . Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*ItemServiceProvisioningErrorsRequestBuilder) { + return NewItemServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/contacts/org_contact_item_request_builder.go b/contacts/org_contact_item_request_builder.go index 3e2be2aba5f..24d4df46557 100644 --- a/contacts/org_contact_item_request_builder.go +++ b/contacts/org_contact_item_request_builder.go @@ -147,6 +147,10 @@ func (m *OrgContactItemRequestBuilder) Restore()(*ItemRestoreRequestBuilder) { func (m *OrgContactItemRequestBuilder) RetryServiceProvisioning()(*ItemRetryServiceProvisioningRequestBuilder) { return NewItemRetryServiceProvisioningRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *OrgContactItemRequestBuilder) ServiceProvisioningErrors()(*ItemServiceProvisioningErrorsRequestBuilder) { + return NewItemServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToDeleteRequestInformation delete entity from contacts func (m *OrgContactItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *OrgContactItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/deviceappmanagement/mobile_apps_item_graph_android_for_work_app_assignments_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_android_for_work_app_assignments_count_request_builder.go new file mode 100644 index 00000000000..dd8dc3aff6d --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_android_for_work_app_assignments_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphAndroidForWorkAppAssignmentsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphAndroidForWorkAppAssignmentsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphAndroidForWorkAppAssignmentsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphAndroidForWorkAppAssignmentsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphAndroidForWorkAppAssignmentsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidForWorkAppAssignmentsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphAndroidForWorkAppAssignmentsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphAndroidForWorkAppAssignmentsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidForWorkAppAssignmentsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidForWorkAppAssignmentsCountRequestBuilder) { + m := &MobileAppsItemGraphAndroidForWorkAppAssignmentsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidForWorkApp/assignments/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphAndroidForWorkAppAssignmentsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidForWorkAppAssignmentsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidForWorkAppAssignmentsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphAndroidForWorkAppAssignmentsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphAndroidForWorkAppAssignmentsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidForWorkAppAssignmentsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphAndroidForWorkAppAssignmentsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidForWorkAppAssignmentsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphAndroidForWorkAppAssignmentsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphAndroidForWorkAppAssignmentsCountRequestBuilder) { + return NewMobileAppsItemGraphAndroidForWorkAppAssignmentsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_android_for_work_app_assignments_mobile_app_assignment_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_android_for_work_app_assignments_mobile_app_assignment_item_request_builder.go new file mode 100644 index 00000000000..a77e00d9cec --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_android_for_work_app_assignments_mobile_app_assignment_item_request_builder.go @@ -0,0 +1,159 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphAndroidForWorkAppAssignmentsMobileAppAssignmentItemRequestBuilder provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphAndroidForWorkAppAssignmentsMobileAppAssignmentItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphAndroidForWorkAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidForWorkAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphAndroidForWorkAppAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters the list of group assignments for this mobile app. +type MobileAppsItemGraphAndroidForWorkAppAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphAndroidForWorkAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidForWorkAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphAndroidForWorkAppAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphAndroidForWorkAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidForWorkAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphAndroidForWorkAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidForWorkAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidForWorkAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + m := &MobileAppsItemGraphAndroidForWorkAppAssignmentsMobileAppAssignmentItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidForWorkApp/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphAndroidForWorkAppAssignmentsMobileAppAssignmentItemRequestBuilder instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidForWorkAppAssignmentsMobileAppAssignmentItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidForWorkAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphAndroidForWorkAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property assignments for deviceAppManagement +func (m *MobileAppsItemGraphAndroidForWorkAppAssignmentsMobileAppAssignmentItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidForWorkAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphAndroidForWorkAppAssignmentsMobileAppAssignmentItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidForWorkAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// Patch update the navigation property assignments in deviceAppManagement +func (m *MobileAppsItemGraphAndroidForWorkAppAssignmentsMobileAppAssignmentItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphAndroidForWorkAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// ToDeleteRequestInformation delete navigation property assignments for deviceAppManagement +func (m *MobileAppsItemGraphAndroidForWorkAppAssignmentsMobileAppAssignmentItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidForWorkAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphAndroidForWorkAppAssignmentsMobileAppAssignmentItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidForWorkAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property assignments in deviceAppManagement +func (m *MobileAppsItemGraphAndroidForWorkAppAssignmentsMobileAppAssignmentItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphAndroidForWorkAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphAndroidForWorkAppAssignmentsMobileAppAssignmentItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphAndroidForWorkAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + return NewMobileAppsItemGraphAndroidForWorkAppAssignmentsMobileAppAssignmentItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_android_for_work_app_assignments_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_android_for_work_app_assignments_request_builder.go new file mode 100644 index 00000000000..f1171103ae1 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_android_for_work_app_assignments_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphAndroidForWorkAppAssignmentsRequestBuilder provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphAndroidForWorkAppAssignmentsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphAndroidForWorkAppAssignmentsRequestBuilderGetQueryParameters the list of group assignments for this mobile app. +type MobileAppsItemGraphAndroidForWorkAppAssignmentsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphAndroidForWorkAppAssignmentsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidForWorkAppAssignmentsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphAndroidForWorkAppAssignmentsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphAndroidForWorkAppAssignmentsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidForWorkAppAssignmentsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppAssignmentId provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphAndroidForWorkAppAssignmentsRequestBuilder) ByMobileAppAssignmentId(mobileAppAssignmentId string)(*MobileAppsItemGraphAndroidForWorkAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppAssignmentId != "" { + urlTplParams["mobileAppAssignment%2Did"] = mobileAppAssignmentId + } + return NewMobileAppsItemGraphAndroidForWorkAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphAndroidForWorkAppAssignmentsRequestBuilderInternal instantiates a new AssignmentsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidForWorkAppAssignmentsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidForWorkAppAssignmentsRequestBuilder) { + m := &MobileAppsItemGraphAndroidForWorkAppAssignmentsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidForWorkApp/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphAndroidForWorkAppAssignmentsRequestBuilder instantiates a new AssignmentsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidForWorkAppAssignmentsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidForWorkAppAssignmentsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphAndroidForWorkAppAssignmentsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphAndroidForWorkAppAssignmentsRequestBuilder) Count()(*MobileAppsItemGraphAndroidForWorkAppAssignmentsCountRequestBuilder) { + return NewMobileAppsItemGraphAndroidForWorkAppAssignmentsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphAndroidForWorkAppAssignmentsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidForWorkAppAssignmentsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentCollectionResponseable), nil +} +// Post create new navigation property to assignments for deviceAppManagement +func (m *MobileAppsItemGraphAndroidForWorkAppAssignmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphAndroidForWorkAppAssignmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// ToGetRequestInformation the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphAndroidForWorkAppAssignmentsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidForWorkAppAssignmentsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to assignments for deviceAppManagement +func (m *MobileAppsItemGraphAndroidForWorkAppAssignmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphAndroidForWorkAppAssignmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphAndroidForWorkAppAssignmentsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphAndroidForWorkAppAssignmentsRequestBuilder) { + return NewMobileAppsItemGraphAndroidForWorkAppAssignmentsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_android_for_work_app_categories_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_android_for_work_app_categories_count_request_builder.go new file mode 100644 index 00000000000..69bc548c072 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_android_for_work_app_categories_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphAndroidForWorkAppCategoriesCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphAndroidForWorkAppCategoriesCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphAndroidForWorkAppCategoriesCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphAndroidForWorkAppCategoriesCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphAndroidForWorkAppCategoriesCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidForWorkAppCategoriesCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphAndroidForWorkAppCategoriesCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphAndroidForWorkAppCategoriesCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidForWorkAppCategoriesCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidForWorkAppCategoriesCountRequestBuilder) { + m := &MobileAppsItemGraphAndroidForWorkAppCategoriesCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidForWorkApp/categories/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphAndroidForWorkAppCategoriesCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidForWorkAppCategoriesCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidForWorkAppCategoriesCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphAndroidForWorkAppCategoriesCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphAndroidForWorkAppCategoriesCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidForWorkAppCategoriesCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphAndroidForWorkAppCategoriesCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidForWorkAppCategoriesCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphAndroidForWorkAppCategoriesCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphAndroidForWorkAppCategoriesCountRequestBuilder) { + return NewMobileAppsItemGraphAndroidForWorkAppCategoriesCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_android_for_work_app_categories_mobile_app_category_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_android_for_work_app_categories_mobile_app_category_item_request_builder.go new file mode 100644 index 00000000000..8ebfd2a88eb --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_android_for_work_app_categories_mobile_app_category_item_request_builder.go @@ -0,0 +1,81 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphAndroidForWorkAppCategoriesMobileAppCategoryItemRequestBuilder provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphAndroidForWorkAppCategoriesMobileAppCategoryItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphAndroidForWorkAppCategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters the list of categories for this app. +type MobileAppsItemGraphAndroidForWorkAppCategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphAndroidForWorkAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidForWorkAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphAndroidForWorkAppCategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphAndroidForWorkAppCategoriesMobileAppCategoryItemRequestBuilderInternal instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidForWorkAppCategoriesMobileAppCategoryItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidForWorkAppCategoriesMobileAppCategoryItemRequestBuilder) { + m := &MobileAppsItemGraphAndroidForWorkAppCategoriesMobileAppCategoryItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidForWorkApp/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphAndroidForWorkAppCategoriesMobileAppCategoryItemRequestBuilder instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidForWorkAppCategoriesMobileAppCategoryItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidForWorkAppCategoriesMobileAppCategoryItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphAndroidForWorkAppCategoriesMobileAppCategoryItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get the list of categories for this app. +func (m *MobileAppsItemGraphAndroidForWorkAppCategoriesMobileAppCategoryItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidForWorkAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppCategoryFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryable), nil +} +// ToGetRequestInformation the list of categories for this app. +func (m *MobileAppsItemGraphAndroidForWorkAppCategoriesMobileAppCategoryItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidForWorkAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphAndroidForWorkAppCategoriesMobileAppCategoryItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphAndroidForWorkAppCategoriesMobileAppCategoryItemRequestBuilder) { + return NewMobileAppsItemGraphAndroidForWorkAppCategoriesMobileAppCategoryItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_android_for_work_app_categories_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_android_for_work_app_categories_request_builder.go new file mode 100644 index 00000000000..44ac1dbc66f --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_android_for_work_app_categories_request_builder.go @@ -0,0 +1,108 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphAndroidForWorkAppCategoriesRequestBuilder provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphAndroidForWorkAppCategoriesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphAndroidForWorkAppCategoriesRequestBuilderGetQueryParameters the list of categories for this app. +type MobileAppsItemGraphAndroidForWorkAppCategoriesRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphAndroidForWorkAppCategoriesRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidForWorkAppCategoriesRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphAndroidForWorkAppCategoriesRequestBuilderGetQueryParameters +} +// ByMobileAppCategoryId provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphAndroidForWorkAppCategoriesRequestBuilder) ByMobileAppCategoryId(mobileAppCategoryId string)(*MobileAppsItemGraphAndroidForWorkAppCategoriesMobileAppCategoryItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppCategoryId != "" { + urlTplParams["mobileAppCategory%2Did"] = mobileAppCategoryId + } + return NewMobileAppsItemGraphAndroidForWorkAppCategoriesMobileAppCategoryItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphAndroidForWorkAppCategoriesRequestBuilderInternal instantiates a new CategoriesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidForWorkAppCategoriesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidForWorkAppCategoriesRequestBuilder) { + m := &MobileAppsItemGraphAndroidForWorkAppCategoriesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidForWorkApp/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphAndroidForWorkAppCategoriesRequestBuilder instantiates a new CategoriesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidForWorkAppCategoriesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidForWorkAppCategoriesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphAndroidForWorkAppCategoriesRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphAndroidForWorkAppCategoriesRequestBuilder) Count()(*MobileAppsItemGraphAndroidForWorkAppCategoriesCountRequestBuilder) { + return NewMobileAppsItemGraphAndroidForWorkAppCategoriesCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of categories for this app. +func (m *MobileAppsItemGraphAndroidForWorkAppCategoriesRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidForWorkAppCategoriesRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppCategoryCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryCollectionResponseable), nil +} +// ToGetRequestInformation the list of categories for this app. +func (m *MobileAppsItemGraphAndroidForWorkAppCategoriesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidForWorkAppCategoriesRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphAndroidForWorkAppCategoriesRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphAndroidForWorkAppCategoriesRequestBuilder) { + return NewMobileAppsItemGraphAndroidForWorkAppCategoriesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_android_for_work_app_relationships_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_android_for_work_app_relationships_count_request_builder.go new file mode 100644 index 00000000000..d427b19a32d --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_android_for_work_app_relationships_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphAndroidForWorkAppRelationshipsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphAndroidForWorkAppRelationshipsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphAndroidForWorkAppRelationshipsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphAndroidForWorkAppRelationshipsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphAndroidForWorkAppRelationshipsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidForWorkAppRelationshipsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphAndroidForWorkAppRelationshipsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphAndroidForWorkAppRelationshipsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidForWorkAppRelationshipsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidForWorkAppRelationshipsCountRequestBuilder) { + m := &MobileAppsItemGraphAndroidForWorkAppRelationshipsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidForWorkApp/relationships/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphAndroidForWorkAppRelationshipsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidForWorkAppRelationshipsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidForWorkAppRelationshipsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphAndroidForWorkAppRelationshipsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphAndroidForWorkAppRelationshipsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidForWorkAppRelationshipsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphAndroidForWorkAppRelationshipsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidForWorkAppRelationshipsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphAndroidForWorkAppRelationshipsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphAndroidForWorkAppRelationshipsCountRequestBuilder) { + return NewMobileAppsItemGraphAndroidForWorkAppRelationshipsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_android_for_work_app_relationships_mobile_app_relationship_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_android_for_work_app_relationships_mobile_app_relationship_item_request_builder.go new file mode 100644 index 00000000000..a00a7730947 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_android_for_work_app_relationships_mobile_app_relationship_item_request_builder.go @@ -0,0 +1,159 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphAndroidForWorkAppRelationshipsMobileAppRelationshipItemRequestBuilder provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphAndroidForWorkAppRelationshipsMobileAppRelationshipItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphAndroidForWorkAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidForWorkAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphAndroidForWorkAppRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters list of relationships for this mobile app. +type MobileAppsItemGraphAndroidForWorkAppRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphAndroidForWorkAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidForWorkAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphAndroidForWorkAppRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphAndroidForWorkAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidForWorkAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphAndroidForWorkAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal instantiates a new MobileAppRelationshipItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidForWorkAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidForWorkAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + m := &MobileAppsItemGraphAndroidForWorkAppRelationshipsMobileAppRelationshipItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidForWorkApp/relationships/{mobileAppRelationship%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphAndroidForWorkAppRelationshipsMobileAppRelationshipItemRequestBuilder instantiates a new MobileAppRelationshipItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidForWorkAppRelationshipsMobileAppRelationshipItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidForWorkAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphAndroidForWorkAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property relationships for deviceAppManagement +func (m *MobileAppsItemGraphAndroidForWorkAppRelationshipsMobileAppRelationshipItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidForWorkAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get list of relationships for this mobile app. +func (m *MobileAppsItemGraphAndroidForWorkAppRelationshipsMobileAppRelationshipItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidForWorkAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// Patch update the navigation property relationships in deviceAppManagement +func (m *MobileAppsItemGraphAndroidForWorkAppRelationshipsMobileAppRelationshipItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphAndroidForWorkAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// ToDeleteRequestInformation delete navigation property relationships for deviceAppManagement +func (m *MobileAppsItemGraphAndroidForWorkAppRelationshipsMobileAppRelationshipItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidForWorkAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation list of relationships for this mobile app. +func (m *MobileAppsItemGraphAndroidForWorkAppRelationshipsMobileAppRelationshipItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidForWorkAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property relationships in deviceAppManagement +func (m *MobileAppsItemGraphAndroidForWorkAppRelationshipsMobileAppRelationshipItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphAndroidForWorkAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphAndroidForWorkAppRelationshipsMobileAppRelationshipItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphAndroidForWorkAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + return NewMobileAppsItemGraphAndroidForWorkAppRelationshipsMobileAppRelationshipItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_android_for_work_app_relationships_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_android_for_work_app_relationships_request_builder.go new file mode 100644 index 00000000000..87e89518503 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_android_for_work_app_relationships_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphAndroidForWorkAppRelationshipsRequestBuilder provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphAndroidForWorkAppRelationshipsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphAndroidForWorkAppRelationshipsRequestBuilderGetQueryParameters list of relationships for this mobile app. +type MobileAppsItemGraphAndroidForWorkAppRelationshipsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphAndroidForWorkAppRelationshipsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidForWorkAppRelationshipsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphAndroidForWorkAppRelationshipsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphAndroidForWorkAppRelationshipsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidForWorkAppRelationshipsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppRelationshipId provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphAndroidForWorkAppRelationshipsRequestBuilder) ByMobileAppRelationshipId(mobileAppRelationshipId string)(*MobileAppsItemGraphAndroidForWorkAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppRelationshipId != "" { + urlTplParams["mobileAppRelationship%2Did"] = mobileAppRelationshipId + } + return NewMobileAppsItemGraphAndroidForWorkAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphAndroidForWorkAppRelationshipsRequestBuilderInternal instantiates a new RelationshipsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidForWorkAppRelationshipsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidForWorkAppRelationshipsRequestBuilder) { + m := &MobileAppsItemGraphAndroidForWorkAppRelationshipsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidForWorkApp/relationships{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphAndroidForWorkAppRelationshipsRequestBuilder instantiates a new RelationshipsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidForWorkAppRelationshipsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidForWorkAppRelationshipsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphAndroidForWorkAppRelationshipsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphAndroidForWorkAppRelationshipsRequestBuilder) Count()(*MobileAppsItemGraphAndroidForWorkAppRelationshipsCountRequestBuilder) { + return NewMobileAppsItemGraphAndroidForWorkAppRelationshipsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get list of relationships for this mobile app. +func (m *MobileAppsItemGraphAndroidForWorkAppRelationshipsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidForWorkAppRelationshipsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipCollectionResponseable), nil +} +// Post create new navigation property to relationships for deviceAppManagement +func (m *MobileAppsItemGraphAndroidForWorkAppRelationshipsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphAndroidForWorkAppRelationshipsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// ToGetRequestInformation list of relationships for this mobile app. +func (m *MobileAppsItemGraphAndroidForWorkAppRelationshipsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidForWorkAppRelationshipsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to relationships for deviceAppManagement +func (m *MobileAppsItemGraphAndroidForWorkAppRelationshipsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphAndroidForWorkAppRelationshipsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphAndroidForWorkAppRelationshipsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphAndroidForWorkAppRelationshipsRequestBuilder) { + return NewMobileAppsItemGraphAndroidForWorkAppRelationshipsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_android_for_work_app_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_android_for_work_app_request_builder.go index 59a8027d563..249d2f3fd8b 100644 --- a/deviceappmanagement/mobile_apps_item_graph_android_for_work_app_request_builder.go +++ b/deviceappmanagement/mobile_apps_item_graph_android_for_work_app_request_builder.go @@ -27,6 +27,14 @@ type MobileAppsItemGraphAndroidForWorkAppRequestBuilderGetRequestConfiguration s // Request query parameters QueryParameters *MobileAppsItemGraphAndroidForWorkAppRequestBuilderGetQueryParameters } +// Assignments provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphAndroidForWorkAppRequestBuilder) Assignments()(*MobileAppsItemGraphAndroidForWorkAppAssignmentsRequestBuilder) { + return NewMobileAppsItemGraphAndroidForWorkAppAssignmentsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Categories provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphAndroidForWorkAppRequestBuilder) Categories()(*MobileAppsItemGraphAndroidForWorkAppCategoriesRequestBuilder) { + return NewMobileAppsItemGraphAndroidForWorkAppCategoriesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // NewMobileAppsItemGraphAndroidForWorkAppRequestBuilderInternal instantiates a new GraphAndroidForWorkAppRequestBuilder and sets the default values. func NewMobileAppsItemGraphAndroidForWorkAppRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidForWorkAppRequestBuilder) { m := &MobileAppsItemGraphAndroidForWorkAppRequestBuilder{ @@ -59,6 +67,10 @@ func (m *MobileAppsItemGraphAndroidForWorkAppRequestBuilder) Get(ctx context.Con } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AndroidForWorkAppable), nil } +// Relationships provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphAndroidForWorkAppRequestBuilder) Relationships()(*MobileAppsItemGraphAndroidForWorkAppRelationshipsRequestBuilder) { + return NewMobileAppsItemGraphAndroidForWorkAppRelationshipsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation get the item of type microsoft.graph.mobileApp as microsoft.graph.androidForWorkApp func (m *MobileAppsItemGraphAndroidForWorkAppRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidForWorkAppRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/deviceappmanagement/mobile_apps_item_graph_android_lob_app_assignments_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_android_lob_app_assignments_count_request_builder.go new file mode 100644 index 00000000000..c935b8ec71b --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_android_lob_app_assignments_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphAndroidLobAppAssignmentsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphAndroidLobAppAssignmentsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphAndroidLobAppAssignmentsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphAndroidLobAppAssignmentsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphAndroidLobAppAssignmentsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidLobAppAssignmentsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphAndroidLobAppAssignmentsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphAndroidLobAppAssignmentsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidLobAppAssignmentsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidLobAppAssignmentsCountRequestBuilder) { + m := &MobileAppsItemGraphAndroidLobAppAssignmentsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/assignments/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphAndroidLobAppAssignmentsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidLobAppAssignmentsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidLobAppAssignmentsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphAndroidLobAppAssignmentsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphAndroidLobAppAssignmentsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidLobAppAssignmentsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphAndroidLobAppAssignmentsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidLobAppAssignmentsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphAndroidLobAppAssignmentsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphAndroidLobAppAssignmentsCountRequestBuilder) { + return NewMobileAppsItemGraphAndroidLobAppAssignmentsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_android_lob_app_assignments_mobile_app_assignment_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_android_lob_app_assignments_mobile_app_assignment_item_request_builder.go new file mode 100644 index 00000000000..c88e6e0a5fe --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_android_lob_app_assignments_mobile_app_assignment_item_request_builder.go @@ -0,0 +1,159 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilder provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters the list of group assignments for this mobile app. +type MobileAppsItemGraphAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + m := &MobileAppsItemGraphAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilder instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property assignments for deviceAppManagement +func (m *MobileAppsItemGraphAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// Patch update the navigation property assignments in deviceAppManagement +func (m *MobileAppsItemGraphAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// ToDeleteRequestInformation delete navigation property assignments for deviceAppManagement +func (m *MobileAppsItemGraphAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property assignments in deviceAppManagement +func (m *MobileAppsItemGraphAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + return NewMobileAppsItemGraphAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_android_lob_app_assignments_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_android_lob_app_assignments_request_builder.go new file mode 100644 index 00000000000..6b07599660d --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_android_lob_app_assignments_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphAndroidLobAppAssignmentsRequestBuilder provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphAndroidLobAppAssignmentsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphAndroidLobAppAssignmentsRequestBuilderGetQueryParameters the list of group assignments for this mobile app. +type MobileAppsItemGraphAndroidLobAppAssignmentsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphAndroidLobAppAssignmentsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidLobAppAssignmentsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphAndroidLobAppAssignmentsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphAndroidLobAppAssignmentsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidLobAppAssignmentsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppAssignmentId provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphAndroidLobAppAssignmentsRequestBuilder) ByMobileAppAssignmentId(mobileAppAssignmentId string)(*MobileAppsItemGraphAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppAssignmentId != "" { + urlTplParams["mobileAppAssignment%2Did"] = mobileAppAssignmentId + } + return NewMobileAppsItemGraphAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphAndroidLobAppAssignmentsRequestBuilderInternal instantiates a new AssignmentsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidLobAppAssignmentsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidLobAppAssignmentsRequestBuilder) { + m := &MobileAppsItemGraphAndroidLobAppAssignmentsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphAndroidLobAppAssignmentsRequestBuilder instantiates a new AssignmentsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidLobAppAssignmentsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidLobAppAssignmentsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphAndroidLobAppAssignmentsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphAndroidLobAppAssignmentsRequestBuilder) Count()(*MobileAppsItemGraphAndroidLobAppAssignmentsCountRequestBuilder) { + return NewMobileAppsItemGraphAndroidLobAppAssignmentsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphAndroidLobAppAssignmentsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidLobAppAssignmentsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentCollectionResponseable), nil +} +// Post create new navigation property to assignments for deviceAppManagement +func (m *MobileAppsItemGraphAndroidLobAppAssignmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphAndroidLobAppAssignmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// ToGetRequestInformation the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphAndroidLobAppAssignmentsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidLobAppAssignmentsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to assignments for deviceAppManagement +func (m *MobileAppsItemGraphAndroidLobAppAssignmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphAndroidLobAppAssignmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphAndroidLobAppAssignmentsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphAndroidLobAppAssignmentsRequestBuilder) { + return NewMobileAppsItemGraphAndroidLobAppAssignmentsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_android_lob_app_categories_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_android_lob_app_categories_count_request_builder.go new file mode 100644 index 00000000000..5f2ec9d24af --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_android_lob_app_categories_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphAndroidLobAppCategoriesCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphAndroidLobAppCategoriesCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphAndroidLobAppCategoriesCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphAndroidLobAppCategoriesCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphAndroidLobAppCategoriesCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidLobAppCategoriesCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphAndroidLobAppCategoriesCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphAndroidLobAppCategoriesCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidLobAppCategoriesCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidLobAppCategoriesCountRequestBuilder) { + m := &MobileAppsItemGraphAndroidLobAppCategoriesCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/categories/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphAndroidLobAppCategoriesCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidLobAppCategoriesCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidLobAppCategoriesCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphAndroidLobAppCategoriesCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphAndroidLobAppCategoriesCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidLobAppCategoriesCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphAndroidLobAppCategoriesCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidLobAppCategoriesCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphAndroidLobAppCategoriesCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphAndroidLobAppCategoriesCountRequestBuilder) { + return NewMobileAppsItemGraphAndroidLobAppCategoriesCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_android_lob_app_categories_mobile_app_category_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_android_lob_app_categories_mobile_app_category_item_request_builder.go new file mode 100644 index 00000000000..839059faa99 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_android_lob_app_categories_mobile_app_category_item_request_builder.go @@ -0,0 +1,81 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphAndroidLobAppCategoriesMobileAppCategoryItemRequestBuilder provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphAndroidLobAppCategoriesMobileAppCategoryItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphAndroidLobAppCategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters the list of categories for this app. +type MobileAppsItemGraphAndroidLobAppCategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphAndroidLobAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidLobAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphAndroidLobAppCategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphAndroidLobAppCategoriesMobileAppCategoryItemRequestBuilderInternal instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidLobAppCategoriesMobileAppCategoryItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidLobAppCategoriesMobileAppCategoryItemRequestBuilder) { + m := &MobileAppsItemGraphAndroidLobAppCategoriesMobileAppCategoryItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphAndroidLobAppCategoriesMobileAppCategoryItemRequestBuilder instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidLobAppCategoriesMobileAppCategoryItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidLobAppCategoriesMobileAppCategoryItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphAndroidLobAppCategoriesMobileAppCategoryItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get the list of categories for this app. +func (m *MobileAppsItemGraphAndroidLobAppCategoriesMobileAppCategoryItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidLobAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppCategoryFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryable), nil +} +// ToGetRequestInformation the list of categories for this app. +func (m *MobileAppsItemGraphAndroidLobAppCategoriesMobileAppCategoryItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidLobAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphAndroidLobAppCategoriesMobileAppCategoryItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphAndroidLobAppCategoriesMobileAppCategoryItemRequestBuilder) { + return NewMobileAppsItemGraphAndroidLobAppCategoriesMobileAppCategoryItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_android_lob_app_categories_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_android_lob_app_categories_request_builder.go new file mode 100644 index 00000000000..d6dc801d451 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_android_lob_app_categories_request_builder.go @@ -0,0 +1,108 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphAndroidLobAppCategoriesRequestBuilder provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphAndroidLobAppCategoriesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphAndroidLobAppCategoriesRequestBuilderGetQueryParameters the list of categories for this app. +type MobileAppsItemGraphAndroidLobAppCategoriesRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphAndroidLobAppCategoriesRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidLobAppCategoriesRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphAndroidLobAppCategoriesRequestBuilderGetQueryParameters +} +// ByMobileAppCategoryId provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphAndroidLobAppCategoriesRequestBuilder) ByMobileAppCategoryId(mobileAppCategoryId string)(*MobileAppsItemGraphAndroidLobAppCategoriesMobileAppCategoryItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppCategoryId != "" { + urlTplParams["mobileAppCategory%2Did"] = mobileAppCategoryId + } + return NewMobileAppsItemGraphAndroidLobAppCategoriesMobileAppCategoryItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphAndroidLobAppCategoriesRequestBuilderInternal instantiates a new CategoriesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidLobAppCategoriesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidLobAppCategoriesRequestBuilder) { + m := &MobileAppsItemGraphAndroidLobAppCategoriesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphAndroidLobAppCategoriesRequestBuilder instantiates a new CategoriesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidLobAppCategoriesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidLobAppCategoriesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphAndroidLobAppCategoriesRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphAndroidLobAppCategoriesRequestBuilder) Count()(*MobileAppsItemGraphAndroidLobAppCategoriesCountRequestBuilder) { + return NewMobileAppsItemGraphAndroidLobAppCategoriesCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of categories for this app. +func (m *MobileAppsItemGraphAndroidLobAppCategoriesRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidLobAppCategoriesRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppCategoryCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryCollectionResponseable), nil +} +// ToGetRequestInformation the list of categories for this app. +func (m *MobileAppsItemGraphAndroidLobAppCategoriesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidLobAppCategoriesRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphAndroidLobAppCategoriesRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphAndroidLobAppCategoriesRequestBuilder) { + return NewMobileAppsItemGraphAndroidLobAppCategoriesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_android_lob_app_content_versions_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_android_lob_app_content_versions_count_request_builder.go new file mode 100644 index 00000000000..e2bbf50f65c --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_android_lob_app_content_versions_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphAndroidLobAppContentVersionsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphAndroidLobAppContentVersionsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphAndroidLobAppContentVersionsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphAndroidLobAppContentVersionsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphAndroidLobAppContentVersionsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidLobAppContentVersionsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphAndroidLobAppContentVersionsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphAndroidLobAppContentVersionsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidLobAppContentVersionsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidLobAppContentVersionsCountRequestBuilder) { + m := &MobileAppsItemGraphAndroidLobAppContentVersionsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/contentVersions/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphAndroidLobAppContentVersionsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidLobAppContentVersionsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidLobAppContentVersionsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphAndroidLobAppContentVersionsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidLobAppContentVersionsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidLobAppContentVersionsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphAndroidLobAppContentVersionsCountRequestBuilder) { + return NewMobileAppsItemGraphAndroidLobAppContentVersionsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_android_lob_app_content_versions_item_contained_apps_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_android_lob_app_content_versions_item_contained_apps_count_request_builder.go new file mode 100644 index 00000000000..2339979ee7e --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_android_lob_app_content_versions_item_contained_apps_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsCountRequestBuilder) { + m := &MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/contentVersions/{mobileAppContent%2Did}/containedApps/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsCountRequestBuilder) { + return NewMobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_android_lob_app_content_versions_item_contained_apps_mobile_contained_app_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_android_lob_app_content_versions_item_contained_apps_mobile_contained_app_item_request_builder.go new file mode 100644 index 00000000000..b3bc82546ad --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_android_lob_app_content_versions_item_contained_apps_mobile_contained_app_item_request_builder.go @@ -0,0 +1,159 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. +type MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetQueryParameters the collection of contained apps in a MobileLobApp acting as a package. +type MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderInternal instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) { + m := &MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/contentVersions/{mobileAppContent%2Did}/containedApps/{mobileContainedApp%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property containedApps for deviceAppManagement +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get the collection of contained apps in a MobileLobApp acting as a package. +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileContainedAppFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable), nil +} +// Patch update the navigation property containedApps in deviceAppManagement +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, requestConfiguration *MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileContainedAppFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable), nil +} +// ToDeleteRequestInformation delete navigation property containedApps for deviceAppManagement +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation the collection of contained apps in a MobileLobApp acting as a package. +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property containedApps in deviceAppManagement +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, requestConfiguration *MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) { + return NewMobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_android_lob_app_content_versions_item_contained_apps_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_android_lob_app_content_versions_item_contained_apps_request_builder.go new file mode 100644 index 00000000000..13981c012c4 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_android_lob_app_content_versions_item_contained_apps_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsRequestBuilder provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. +type MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsRequestBuilderGetQueryParameters the collection of contained apps in a MobileLobApp acting as a package. +type MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileContainedAppId provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsRequestBuilder) ByMobileContainedAppId(mobileContainedAppId string)(*MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileContainedAppId != "" { + urlTplParams["mobileContainedApp%2Did"] = mobileContainedAppId + } + return NewMobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsRequestBuilderInternal instantiates a new ContainedAppsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsRequestBuilder) { + m := &MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/contentVersions/{mobileAppContent%2Did}/containedApps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsRequestBuilder instantiates a new ContainedAppsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsRequestBuilder) Count()(*MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsCountRequestBuilder) { + return NewMobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the collection of contained apps in a MobileLobApp acting as a package. +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileContainedAppCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppCollectionResponseable), nil +} +// Post create new navigation property to containedApps for deviceAppManagement +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, requestConfiguration *MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileContainedAppFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable), nil +} +// ToGetRequestInformation the collection of contained apps in a MobileLobApp acting as a package. +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to containedApps for deviceAppManagement +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, requestConfiguration *MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsRequestBuilder) { + return NewMobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_android_lob_app_content_versions_item_files_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_android_lob_app_content_versions_item_files_count_request_builder.go new file mode 100644 index 00000000000..77cffb58ccd --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_android_lob_app_content_versions_item_files_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphAndroidLobAppContentVersionsItemFilesCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidLobAppContentVersionsItemFilesCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesCountRequestBuilder) { + m := &MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/contentVersions/{mobileAppContent%2Did}/files/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphAndroidLobAppContentVersionsItemFilesCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidLobAppContentVersionsItemFilesCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphAndroidLobAppContentVersionsItemFilesCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesCountRequestBuilder) { + return NewMobileAppsItemGraphAndroidLobAppContentVersionsItemFilesCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_android_lob_app_content_versions_item_files_item_commit_post_request_body.go b/deviceappmanagement/mobile_apps_item_graph_android_lob_app_content_versions_item_files_item_commit_post_request_body.go new file mode 100644 index 00000000000..ea4a2909d24 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_android_lob_app_content_versions_item_files_item_commit_post_request_body.go @@ -0,0 +1,111 @@ +package deviceappmanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +// MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemCommitPostRequestBody +type MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemCommitPostRequestBody struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewMobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemCommitPostRequestBody instantiates a new MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemCommitPostRequestBody and sets the default values. +func NewMobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemCommitPostRequestBody()(*MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemCommitPostRequestBody) { + m := &MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemCommitPostRequestBody{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateMobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemCommitPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemCommitPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemCommitPostRequestBody(), nil +} +// GetAdditionalData gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemCommitPostRequestBody) GetAdditionalData()(map[string]any) { + val , err := m.backingStore.Get("additionalData") + if err != nil { + panic(err) + } + if val == nil { + var value = make(map[string]any); + m.SetAdditionalData(value); + } + return val.(map[string]any) +} +// GetBackingStore gets the backingStore property value. Stores model information. +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemCommitPostRequestBody) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemCommitPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["fileEncryptionInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateFileEncryptionInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetFileEncryptionInfo(val.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable)) + } + return nil + } + return res +} +// GetFileEncryptionInfo gets the fileEncryptionInfo property value. The fileEncryptionInfo property +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemCommitPostRequestBody) GetFileEncryptionInfo()(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable) { + val, err := m.GetBackingStore().Get("fileEncryptionInfo") + if err != nil { + panic(err) + } + if val != nil { + return val.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable) + } + return nil +} +// Serialize serializes information the current object +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemCommitPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("fileEncryptionInfo", m.GetFileEncryptionInfo()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemCommitPostRequestBody) SetAdditionalData(value map[string]any)() { + err := m.GetBackingStore().Set("additionalData", value) + if err != nil { + panic(err) + } +} +// SetBackingStore sets the backingStore property value. Stores model information. +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemCommitPostRequestBody) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetFileEncryptionInfo sets the fileEncryptionInfo property value. The fileEncryptionInfo property +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemCommitPostRequestBody) SetFileEncryptionInfo(value ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable)() { + err := m.GetBackingStore().Set("fileEncryptionInfo", value) + if err != nil { + panic(err) + } +} +// MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemCommitPostRequestBodyable +type MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemCommitPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetFileEncryptionInfo()(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetFileEncryptionInfo(value ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable)() +} diff --git a/deviceappmanagement/mobile_apps_item_graph_android_lob_app_content_versions_item_files_item_commit_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_android_lob_app_content_versions_item_files_item_commit_request_builder.go new file mode 100644 index 00000000000..9577bb0e711 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_android_lob_app_content_versions_item_files_item_commit_request_builder.go @@ -0,0 +1,68 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemCommitRequestBuilder provides operations to call the commit method. +type MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemCommitRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemCommitRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemCommitRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemCommitRequestBuilderInternal instantiates a new CommitRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemCommitRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemCommitRequestBuilder) { + m := &MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemCommitRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/commit", pathParameters), + } + return m +} +// NewMobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemCommitRequestBuilder instantiates a new CommitRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemCommitRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemCommitRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemCommitRequestBuilderInternal(urlParams, requestAdapter) +} +// Post commits a file of a given app. +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemCommitRequestBuilder) Post(ctx context.Context, body MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemCommitPostRequestBodyable, requestConfiguration *MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemCommitRequestBuilderPostRequestConfiguration)(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation commits a file of a given app. +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemCommitRequestBuilder) ToPostRequestInformation(ctx context.Context, body MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemCommitPostRequestBodyable, requestConfiguration *MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemCommitRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemCommitRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemCommitRequestBuilder) { + return NewMobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemCommitRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_android_lob_app_content_versions_item_files_item_renew_upload_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_android_lob_app_content_versions_item_files_item_renew_upload_request_builder.go new file mode 100644 index 00000000000..b7ee410c4d1 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_android_lob_app_content_versions_item_files_item_renew_upload_request_builder.go @@ -0,0 +1,64 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder provides operations to call the renewUpload method. +type MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemRenewUploadRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemRenewUploadRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemRenewUploadRequestBuilderInternal instantiates a new RenewUploadRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemRenewUploadRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder) { + m := &MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/renewUpload", pathParameters), + } + return m +} +// NewMobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder instantiates a new RenewUploadRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemRenewUploadRequestBuilderInternal(urlParams, requestAdapter) +} +// Post renews the SAS URI for an application file upload. +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder) Post(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemRenewUploadRequestBuilderPostRequestConfiguration)(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation renews the SAS URI for an application file upload. +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemRenewUploadRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder) { + return NewMobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_android_lob_app_content_versions_item_files_mobile_app_content_file_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_android_lob_app_content_versions_item_files_mobile_app_content_file_item_request_builder.go new file mode 100644 index 00000000000..f7cc5dba07f --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_android_lob_app_content_versions_item_files_mobile_app_content_file_item_request_builder.go @@ -0,0 +1,167 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. +type MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetQueryParameters the list of files for this app content version. +type MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// Commit provides operations to call the commit method. +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) Commit()(*MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemCommitRequestBuilder) { + return NewMobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemCommitRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderInternal instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) { + m := &MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property files for deviceAppManagement +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get the list of files for this app content version. +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFileFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable), nil +} +// Patch update the navigation property files in deviceAppManagement +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, requestConfiguration *MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFileFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable), nil +} +// RenewUpload provides operations to call the renewUpload method. +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) RenewUpload()(*MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder) { + return NewMobileAppsItemGraphAndroidLobAppContentVersionsItemFilesItemRenewUploadRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToDeleteRequestInformation delete navigation property files for deviceAppManagement +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation the list of files for this app content version. +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property files in deviceAppManagement +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, requestConfiguration *MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) { + return NewMobileAppsItemGraphAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_android_lob_app_content_versions_item_files_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_android_lob_app_content_versions_item_files_request_builder.go new file mode 100644 index 00000000000..753c89c6678 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_android_lob_app_content_versions_item_files_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesRequestBuilder provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. +type MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesRequestBuilderGetQueryParameters the list of files for this app content version. +type MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppContentFileId provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesRequestBuilder) ByMobileAppContentFileId(mobileAppContentFileId string)(*MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppContentFileId != "" { + urlTplParams["mobileAppContentFile%2Did"] = mobileAppContentFileId + } + return NewMobileAppsItemGraphAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphAndroidLobAppContentVersionsItemFilesRequestBuilderInternal instantiates a new FilesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidLobAppContentVersionsItemFilesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesRequestBuilder) { + m := &MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/contentVersions/{mobileAppContent%2Did}/files{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphAndroidLobAppContentVersionsItemFilesRequestBuilder instantiates a new FilesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidLobAppContentVersionsItemFilesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphAndroidLobAppContentVersionsItemFilesRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesRequestBuilder) Count()(*MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesCountRequestBuilder) { + return NewMobileAppsItemGraphAndroidLobAppContentVersionsItemFilesCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of files for this app content version. +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFileCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileCollectionResponseable), nil +} +// Post create new navigation property to files for deviceAppManagement +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, requestConfiguration *MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFileFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable), nil +} +// ToGetRequestInformation the list of files for this app content version. +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to files for deviceAppManagement +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, requestConfiguration *MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesRequestBuilder) { + return NewMobileAppsItemGraphAndroidLobAppContentVersionsItemFilesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_android_lob_app_content_versions_mobile_app_content_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_android_lob_app_content_versions_mobile_app_content_item_request_builder.go new file mode 100644 index 00000000000..947ea486f72 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_android_lob_app_content_versions_mobile_app_content_item_request_builder.go @@ -0,0 +1,167 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphAndroidLobAppContentVersionsMobileAppContentItemRequestBuilder provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. +type MobileAppsItemGraphAndroidLobAppContentVersionsMobileAppContentItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphAndroidLobAppContentVersionsMobileAppContentItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidLobAppContentVersionsMobileAppContentItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphAndroidLobAppContentVersionsMobileAppContentItemRequestBuilderGetQueryParameters the list of content versions for this app. +type MobileAppsItemGraphAndroidLobAppContentVersionsMobileAppContentItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphAndroidLobAppContentVersionsMobileAppContentItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidLobAppContentVersionsMobileAppContentItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphAndroidLobAppContentVersionsMobileAppContentItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphAndroidLobAppContentVersionsMobileAppContentItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidLobAppContentVersionsMobileAppContentItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphAndroidLobAppContentVersionsMobileAppContentItemRequestBuilderInternal instantiates a new MobileAppContentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidLobAppContentVersionsMobileAppContentItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidLobAppContentVersionsMobileAppContentItemRequestBuilder) { + m := &MobileAppsItemGraphAndroidLobAppContentVersionsMobileAppContentItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/contentVersions/{mobileAppContent%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphAndroidLobAppContentVersionsMobileAppContentItemRequestBuilder instantiates a new MobileAppContentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidLobAppContentVersionsMobileAppContentItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidLobAppContentVersionsMobileAppContentItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphAndroidLobAppContentVersionsMobileAppContentItemRequestBuilderInternal(urlParams, requestAdapter) +} +// ContainedApps provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsMobileAppContentItemRequestBuilder) ContainedApps()(*MobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsRequestBuilder) { + return NewMobileAppsItemGraphAndroidLobAppContentVersionsItemContainedAppsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Delete delete navigation property contentVersions for deviceAppManagement +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsMobileAppContentItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidLobAppContentVersionsMobileAppContentItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Files provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsMobileAppContentItemRequestBuilder) Files()(*MobileAppsItemGraphAndroidLobAppContentVersionsItemFilesRequestBuilder) { + return NewMobileAppsItemGraphAndroidLobAppContentVersionsItemFilesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of content versions for this app. +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsMobileAppContentItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidLobAppContentVersionsMobileAppContentItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable), nil +} +// Patch update the navigation property contentVersions in deviceAppManagement +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsMobileAppContentItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, requestConfiguration *MobileAppsItemGraphAndroidLobAppContentVersionsMobileAppContentItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable), nil +} +// ToDeleteRequestInformation delete navigation property contentVersions for deviceAppManagement +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsMobileAppContentItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidLobAppContentVersionsMobileAppContentItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation the list of content versions for this app. +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsMobileAppContentItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidLobAppContentVersionsMobileAppContentItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property contentVersions in deviceAppManagement +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsMobileAppContentItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, requestConfiguration *MobileAppsItemGraphAndroidLobAppContentVersionsMobileAppContentItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsMobileAppContentItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphAndroidLobAppContentVersionsMobileAppContentItemRequestBuilder) { + return NewMobileAppsItemGraphAndroidLobAppContentVersionsMobileAppContentItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_android_lob_app_content_versions_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_android_lob_app_content_versions_request_builder.go new file mode 100644 index 00000000000..52565c31348 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_android_lob_app_content_versions_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphAndroidLobAppContentVersionsRequestBuilder provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. +type MobileAppsItemGraphAndroidLobAppContentVersionsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphAndroidLobAppContentVersionsRequestBuilderGetQueryParameters the list of content versions for this app. +type MobileAppsItemGraphAndroidLobAppContentVersionsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphAndroidLobAppContentVersionsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidLobAppContentVersionsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphAndroidLobAppContentVersionsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphAndroidLobAppContentVersionsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidLobAppContentVersionsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppContentId provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsRequestBuilder) ByMobileAppContentId(mobileAppContentId string)(*MobileAppsItemGraphAndroidLobAppContentVersionsMobileAppContentItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppContentId != "" { + urlTplParams["mobileAppContent%2Did"] = mobileAppContentId + } + return NewMobileAppsItemGraphAndroidLobAppContentVersionsMobileAppContentItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphAndroidLobAppContentVersionsRequestBuilderInternal instantiates a new ContentVersionsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidLobAppContentVersionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidLobAppContentVersionsRequestBuilder) { + m := &MobileAppsItemGraphAndroidLobAppContentVersionsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/contentVersions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphAndroidLobAppContentVersionsRequestBuilder instantiates a new ContentVersionsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidLobAppContentVersionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidLobAppContentVersionsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphAndroidLobAppContentVersionsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsRequestBuilder) Count()(*MobileAppsItemGraphAndroidLobAppContentVersionsCountRequestBuilder) { + return NewMobileAppsItemGraphAndroidLobAppContentVersionsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of content versions for this app. +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidLobAppContentVersionsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentCollectionResponseable), nil +} +// Post create new navigation property to contentVersions for deviceAppManagement +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, requestConfiguration *MobileAppsItemGraphAndroidLobAppContentVersionsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable), nil +} +// ToGetRequestInformation the list of content versions for this app. +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidLobAppContentVersionsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to contentVersions for deviceAppManagement +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, requestConfiguration *MobileAppsItemGraphAndroidLobAppContentVersionsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphAndroidLobAppContentVersionsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphAndroidLobAppContentVersionsRequestBuilder) { + return NewMobileAppsItemGraphAndroidLobAppContentVersionsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_android_lob_app_relationships_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_android_lob_app_relationships_count_request_builder.go new file mode 100644 index 00000000000..4a6f7b822ba --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_android_lob_app_relationships_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphAndroidLobAppRelationshipsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphAndroidLobAppRelationshipsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphAndroidLobAppRelationshipsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphAndroidLobAppRelationshipsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphAndroidLobAppRelationshipsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidLobAppRelationshipsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphAndroidLobAppRelationshipsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphAndroidLobAppRelationshipsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidLobAppRelationshipsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidLobAppRelationshipsCountRequestBuilder) { + m := &MobileAppsItemGraphAndroidLobAppRelationshipsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/relationships/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphAndroidLobAppRelationshipsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidLobAppRelationshipsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidLobAppRelationshipsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphAndroidLobAppRelationshipsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphAndroidLobAppRelationshipsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidLobAppRelationshipsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphAndroidLobAppRelationshipsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidLobAppRelationshipsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphAndroidLobAppRelationshipsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphAndroidLobAppRelationshipsCountRequestBuilder) { + return NewMobileAppsItemGraphAndroidLobAppRelationshipsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_android_lob_app_relationships_mobile_app_relationship_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_android_lob_app_relationships_mobile_app_relationship_item_request_builder.go new file mode 100644 index 00000000000..0ecadd67a41 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_android_lob_app_relationships_mobile_app_relationship_item_request_builder.go @@ -0,0 +1,159 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilder provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters list of relationships for this mobile app. +type MobileAppsItemGraphAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal instantiates a new MobileAppRelationshipItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + m := &MobileAppsItemGraphAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/relationships/{mobileAppRelationship%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilder instantiates a new MobileAppRelationshipItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property relationships for deviceAppManagement +func (m *MobileAppsItemGraphAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get list of relationships for this mobile app. +func (m *MobileAppsItemGraphAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// Patch update the navigation property relationships in deviceAppManagement +func (m *MobileAppsItemGraphAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// ToDeleteRequestInformation delete navigation property relationships for deviceAppManagement +func (m *MobileAppsItemGraphAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation list of relationships for this mobile app. +func (m *MobileAppsItemGraphAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property relationships in deviceAppManagement +func (m *MobileAppsItemGraphAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + return NewMobileAppsItemGraphAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_android_lob_app_relationships_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_android_lob_app_relationships_request_builder.go new file mode 100644 index 00000000000..8238dae49d6 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_android_lob_app_relationships_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphAndroidLobAppRelationshipsRequestBuilder provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphAndroidLobAppRelationshipsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphAndroidLobAppRelationshipsRequestBuilderGetQueryParameters list of relationships for this mobile app. +type MobileAppsItemGraphAndroidLobAppRelationshipsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphAndroidLobAppRelationshipsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidLobAppRelationshipsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphAndroidLobAppRelationshipsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphAndroidLobAppRelationshipsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidLobAppRelationshipsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppRelationshipId provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphAndroidLobAppRelationshipsRequestBuilder) ByMobileAppRelationshipId(mobileAppRelationshipId string)(*MobileAppsItemGraphAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppRelationshipId != "" { + urlTplParams["mobileAppRelationship%2Did"] = mobileAppRelationshipId + } + return NewMobileAppsItemGraphAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphAndroidLobAppRelationshipsRequestBuilderInternal instantiates a new RelationshipsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidLobAppRelationshipsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidLobAppRelationshipsRequestBuilder) { + m := &MobileAppsItemGraphAndroidLobAppRelationshipsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/relationships{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphAndroidLobAppRelationshipsRequestBuilder instantiates a new RelationshipsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidLobAppRelationshipsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidLobAppRelationshipsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphAndroidLobAppRelationshipsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphAndroidLobAppRelationshipsRequestBuilder) Count()(*MobileAppsItemGraphAndroidLobAppRelationshipsCountRequestBuilder) { + return NewMobileAppsItemGraphAndroidLobAppRelationshipsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get list of relationships for this mobile app. +func (m *MobileAppsItemGraphAndroidLobAppRelationshipsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidLobAppRelationshipsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipCollectionResponseable), nil +} +// Post create new navigation property to relationships for deviceAppManagement +func (m *MobileAppsItemGraphAndroidLobAppRelationshipsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphAndroidLobAppRelationshipsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// ToGetRequestInformation list of relationships for this mobile app. +func (m *MobileAppsItemGraphAndroidLobAppRelationshipsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidLobAppRelationshipsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to relationships for deviceAppManagement +func (m *MobileAppsItemGraphAndroidLobAppRelationshipsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphAndroidLobAppRelationshipsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphAndroidLobAppRelationshipsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphAndroidLobAppRelationshipsRequestBuilder) { + return NewMobileAppsItemGraphAndroidLobAppRelationshipsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_android_lob_app_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_android_lob_app_request_builder.go index 8dc07abd8c2..7f334620cd2 100644 --- a/deviceappmanagement/mobile_apps_item_graph_android_lob_app_request_builder.go +++ b/deviceappmanagement/mobile_apps_item_graph_android_lob_app_request_builder.go @@ -27,6 +27,14 @@ type MobileAppsItemGraphAndroidLobAppRequestBuilderGetRequestConfiguration struc // Request query parameters QueryParameters *MobileAppsItemGraphAndroidLobAppRequestBuilderGetQueryParameters } +// Assignments provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphAndroidLobAppRequestBuilder) Assignments()(*MobileAppsItemGraphAndroidLobAppAssignmentsRequestBuilder) { + return NewMobileAppsItemGraphAndroidLobAppAssignmentsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Categories provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphAndroidLobAppRequestBuilder) Categories()(*MobileAppsItemGraphAndroidLobAppCategoriesRequestBuilder) { + return NewMobileAppsItemGraphAndroidLobAppCategoriesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // NewMobileAppsItemGraphAndroidLobAppRequestBuilderInternal instantiates a new GraphAndroidLobAppRequestBuilder and sets the default values. func NewMobileAppsItemGraphAndroidLobAppRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidLobAppRequestBuilder) { m := &MobileAppsItemGraphAndroidLobAppRequestBuilder{ @@ -40,6 +48,10 @@ func NewMobileAppsItemGraphAndroidLobAppRequestBuilder(rawUrl string, requestAda urlParams["request-raw-url"] = rawUrl return NewMobileAppsItemGraphAndroidLobAppRequestBuilderInternal(urlParams, requestAdapter) } +// ContentVersions provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. +func (m *MobileAppsItemGraphAndroidLobAppRequestBuilder) ContentVersions()(*MobileAppsItemGraphAndroidLobAppContentVersionsRequestBuilder) { + return NewMobileAppsItemGraphAndroidLobAppContentVersionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // Get get the item of type microsoft.graph.mobileApp as microsoft.graph.androidLobApp func (m *MobileAppsItemGraphAndroidLobAppRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidLobAppRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AndroidLobAppable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); @@ -59,6 +71,10 @@ func (m *MobileAppsItemGraphAndroidLobAppRequestBuilder) Get(ctx context.Context } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AndroidLobAppable), nil } +// Relationships provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphAndroidLobAppRequestBuilder) Relationships()(*MobileAppsItemGraphAndroidLobAppRelationshipsRequestBuilder) { + return NewMobileAppsItemGraphAndroidLobAppRelationshipsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation get the item of type microsoft.graph.mobileApp as microsoft.graph.androidLobApp func (m *MobileAppsItemGraphAndroidLobAppRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidLobAppRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/deviceappmanagement/mobile_apps_item_graph_android_managed_store_app_assignments_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_android_managed_store_app_assignments_count_request_builder.go new file mode 100644 index 00000000000..053f7451745 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_android_managed_store_app_assignments_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphAndroidManagedStoreAppAssignmentsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphAndroidManagedStoreAppAssignmentsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphAndroidManagedStoreAppAssignmentsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphAndroidManagedStoreAppAssignmentsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphAndroidManagedStoreAppAssignmentsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidManagedStoreAppAssignmentsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphAndroidManagedStoreAppAssignmentsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphAndroidManagedStoreAppAssignmentsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidManagedStoreAppAssignmentsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidManagedStoreAppAssignmentsCountRequestBuilder) { + m := &MobileAppsItemGraphAndroidManagedStoreAppAssignmentsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidManagedStoreApp/assignments/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphAndroidManagedStoreAppAssignmentsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidManagedStoreAppAssignmentsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidManagedStoreAppAssignmentsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphAndroidManagedStoreAppAssignmentsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphAndroidManagedStoreAppAssignmentsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidManagedStoreAppAssignmentsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphAndroidManagedStoreAppAssignmentsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidManagedStoreAppAssignmentsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphAndroidManagedStoreAppAssignmentsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphAndroidManagedStoreAppAssignmentsCountRequestBuilder) { + return NewMobileAppsItemGraphAndroidManagedStoreAppAssignmentsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_android_managed_store_app_assignments_mobile_app_assignment_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_android_managed_store_app_assignments_mobile_app_assignment_item_request_builder.go new file mode 100644 index 00000000000..8d86e4edae2 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_android_managed_store_app_assignments_mobile_app_assignment_item_request_builder.go @@ -0,0 +1,159 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphAndroidManagedStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphAndroidManagedStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphAndroidManagedStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidManagedStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphAndroidManagedStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters the list of group assignments for this mobile app. +type MobileAppsItemGraphAndroidManagedStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphAndroidManagedStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidManagedStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphAndroidManagedStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphAndroidManagedStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidManagedStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphAndroidManagedStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidManagedStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidManagedStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + m := &MobileAppsItemGraphAndroidManagedStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidManagedStoreApp/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphAndroidManagedStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidManagedStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidManagedStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphAndroidManagedStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property assignments for deviceAppManagement +func (m *MobileAppsItemGraphAndroidManagedStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidManagedStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphAndroidManagedStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidManagedStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// Patch update the navigation property assignments in deviceAppManagement +func (m *MobileAppsItemGraphAndroidManagedStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphAndroidManagedStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// ToDeleteRequestInformation delete navigation property assignments for deviceAppManagement +func (m *MobileAppsItemGraphAndroidManagedStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidManagedStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphAndroidManagedStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidManagedStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property assignments in deviceAppManagement +func (m *MobileAppsItemGraphAndroidManagedStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphAndroidManagedStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphAndroidManagedStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphAndroidManagedStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + return NewMobileAppsItemGraphAndroidManagedStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_android_managed_store_app_assignments_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_android_managed_store_app_assignments_request_builder.go new file mode 100644 index 00000000000..753d98a080b --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_android_managed_store_app_assignments_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphAndroidManagedStoreAppAssignmentsRequestBuilder provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphAndroidManagedStoreAppAssignmentsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphAndroidManagedStoreAppAssignmentsRequestBuilderGetQueryParameters the list of group assignments for this mobile app. +type MobileAppsItemGraphAndroidManagedStoreAppAssignmentsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphAndroidManagedStoreAppAssignmentsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidManagedStoreAppAssignmentsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphAndroidManagedStoreAppAssignmentsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphAndroidManagedStoreAppAssignmentsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidManagedStoreAppAssignmentsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppAssignmentId provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphAndroidManagedStoreAppAssignmentsRequestBuilder) ByMobileAppAssignmentId(mobileAppAssignmentId string)(*MobileAppsItemGraphAndroidManagedStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppAssignmentId != "" { + urlTplParams["mobileAppAssignment%2Did"] = mobileAppAssignmentId + } + return NewMobileAppsItemGraphAndroidManagedStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphAndroidManagedStoreAppAssignmentsRequestBuilderInternal instantiates a new AssignmentsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidManagedStoreAppAssignmentsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidManagedStoreAppAssignmentsRequestBuilder) { + m := &MobileAppsItemGraphAndroidManagedStoreAppAssignmentsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidManagedStoreApp/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphAndroidManagedStoreAppAssignmentsRequestBuilder instantiates a new AssignmentsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidManagedStoreAppAssignmentsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidManagedStoreAppAssignmentsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphAndroidManagedStoreAppAssignmentsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphAndroidManagedStoreAppAssignmentsRequestBuilder) Count()(*MobileAppsItemGraphAndroidManagedStoreAppAssignmentsCountRequestBuilder) { + return NewMobileAppsItemGraphAndroidManagedStoreAppAssignmentsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphAndroidManagedStoreAppAssignmentsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidManagedStoreAppAssignmentsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentCollectionResponseable), nil +} +// Post create new navigation property to assignments for deviceAppManagement +func (m *MobileAppsItemGraphAndroidManagedStoreAppAssignmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphAndroidManagedStoreAppAssignmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// ToGetRequestInformation the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphAndroidManagedStoreAppAssignmentsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidManagedStoreAppAssignmentsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to assignments for deviceAppManagement +func (m *MobileAppsItemGraphAndroidManagedStoreAppAssignmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphAndroidManagedStoreAppAssignmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphAndroidManagedStoreAppAssignmentsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphAndroidManagedStoreAppAssignmentsRequestBuilder) { + return NewMobileAppsItemGraphAndroidManagedStoreAppAssignmentsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_android_managed_store_app_categories_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_android_managed_store_app_categories_count_request_builder.go new file mode 100644 index 00000000000..4b259659da8 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_android_managed_store_app_categories_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphAndroidManagedStoreAppCategoriesCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphAndroidManagedStoreAppCategoriesCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphAndroidManagedStoreAppCategoriesCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphAndroidManagedStoreAppCategoriesCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphAndroidManagedStoreAppCategoriesCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidManagedStoreAppCategoriesCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphAndroidManagedStoreAppCategoriesCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphAndroidManagedStoreAppCategoriesCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidManagedStoreAppCategoriesCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidManagedStoreAppCategoriesCountRequestBuilder) { + m := &MobileAppsItemGraphAndroidManagedStoreAppCategoriesCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidManagedStoreApp/categories/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphAndroidManagedStoreAppCategoriesCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidManagedStoreAppCategoriesCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidManagedStoreAppCategoriesCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphAndroidManagedStoreAppCategoriesCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphAndroidManagedStoreAppCategoriesCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidManagedStoreAppCategoriesCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphAndroidManagedStoreAppCategoriesCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidManagedStoreAppCategoriesCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphAndroidManagedStoreAppCategoriesCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphAndroidManagedStoreAppCategoriesCountRequestBuilder) { + return NewMobileAppsItemGraphAndroidManagedStoreAppCategoriesCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_android_managed_store_app_categories_mobile_app_category_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_android_managed_store_app_categories_mobile_app_category_item_request_builder.go new file mode 100644 index 00000000000..62a8e7c29a0 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_android_managed_store_app_categories_mobile_app_category_item_request_builder.go @@ -0,0 +1,81 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphAndroidManagedStoreAppCategoriesMobileAppCategoryItemRequestBuilder provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphAndroidManagedStoreAppCategoriesMobileAppCategoryItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphAndroidManagedStoreAppCategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters the list of categories for this app. +type MobileAppsItemGraphAndroidManagedStoreAppCategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphAndroidManagedStoreAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidManagedStoreAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphAndroidManagedStoreAppCategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphAndroidManagedStoreAppCategoriesMobileAppCategoryItemRequestBuilderInternal instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidManagedStoreAppCategoriesMobileAppCategoryItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidManagedStoreAppCategoriesMobileAppCategoryItemRequestBuilder) { + m := &MobileAppsItemGraphAndroidManagedStoreAppCategoriesMobileAppCategoryItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidManagedStoreApp/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphAndroidManagedStoreAppCategoriesMobileAppCategoryItemRequestBuilder instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidManagedStoreAppCategoriesMobileAppCategoryItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidManagedStoreAppCategoriesMobileAppCategoryItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphAndroidManagedStoreAppCategoriesMobileAppCategoryItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get the list of categories for this app. +func (m *MobileAppsItemGraphAndroidManagedStoreAppCategoriesMobileAppCategoryItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidManagedStoreAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppCategoryFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryable), nil +} +// ToGetRequestInformation the list of categories for this app. +func (m *MobileAppsItemGraphAndroidManagedStoreAppCategoriesMobileAppCategoryItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidManagedStoreAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphAndroidManagedStoreAppCategoriesMobileAppCategoryItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphAndroidManagedStoreAppCategoriesMobileAppCategoryItemRequestBuilder) { + return NewMobileAppsItemGraphAndroidManagedStoreAppCategoriesMobileAppCategoryItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_android_managed_store_app_categories_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_android_managed_store_app_categories_request_builder.go new file mode 100644 index 00000000000..d414f667b37 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_android_managed_store_app_categories_request_builder.go @@ -0,0 +1,108 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphAndroidManagedStoreAppCategoriesRequestBuilder provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphAndroidManagedStoreAppCategoriesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphAndroidManagedStoreAppCategoriesRequestBuilderGetQueryParameters the list of categories for this app. +type MobileAppsItemGraphAndroidManagedStoreAppCategoriesRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphAndroidManagedStoreAppCategoriesRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidManagedStoreAppCategoriesRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphAndroidManagedStoreAppCategoriesRequestBuilderGetQueryParameters +} +// ByMobileAppCategoryId provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphAndroidManagedStoreAppCategoriesRequestBuilder) ByMobileAppCategoryId(mobileAppCategoryId string)(*MobileAppsItemGraphAndroidManagedStoreAppCategoriesMobileAppCategoryItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppCategoryId != "" { + urlTplParams["mobileAppCategory%2Did"] = mobileAppCategoryId + } + return NewMobileAppsItemGraphAndroidManagedStoreAppCategoriesMobileAppCategoryItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphAndroidManagedStoreAppCategoriesRequestBuilderInternal instantiates a new CategoriesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidManagedStoreAppCategoriesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidManagedStoreAppCategoriesRequestBuilder) { + m := &MobileAppsItemGraphAndroidManagedStoreAppCategoriesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidManagedStoreApp/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphAndroidManagedStoreAppCategoriesRequestBuilder instantiates a new CategoriesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidManagedStoreAppCategoriesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidManagedStoreAppCategoriesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphAndroidManagedStoreAppCategoriesRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphAndroidManagedStoreAppCategoriesRequestBuilder) Count()(*MobileAppsItemGraphAndroidManagedStoreAppCategoriesCountRequestBuilder) { + return NewMobileAppsItemGraphAndroidManagedStoreAppCategoriesCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of categories for this app. +func (m *MobileAppsItemGraphAndroidManagedStoreAppCategoriesRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidManagedStoreAppCategoriesRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppCategoryCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryCollectionResponseable), nil +} +// ToGetRequestInformation the list of categories for this app. +func (m *MobileAppsItemGraphAndroidManagedStoreAppCategoriesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidManagedStoreAppCategoriesRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphAndroidManagedStoreAppCategoriesRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphAndroidManagedStoreAppCategoriesRequestBuilder) { + return NewMobileAppsItemGraphAndroidManagedStoreAppCategoriesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_android_managed_store_app_relationships_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_android_managed_store_app_relationships_count_request_builder.go new file mode 100644 index 00000000000..4c83d2e567b --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_android_managed_store_app_relationships_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphAndroidManagedStoreAppRelationshipsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphAndroidManagedStoreAppRelationshipsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphAndroidManagedStoreAppRelationshipsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphAndroidManagedStoreAppRelationshipsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphAndroidManagedStoreAppRelationshipsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidManagedStoreAppRelationshipsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphAndroidManagedStoreAppRelationshipsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphAndroidManagedStoreAppRelationshipsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidManagedStoreAppRelationshipsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidManagedStoreAppRelationshipsCountRequestBuilder) { + m := &MobileAppsItemGraphAndroidManagedStoreAppRelationshipsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidManagedStoreApp/relationships/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphAndroidManagedStoreAppRelationshipsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidManagedStoreAppRelationshipsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidManagedStoreAppRelationshipsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphAndroidManagedStoreAppRelationshipsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphAndroidManagedStoreAppRelationshipsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidManagedStoreAppRelationshipsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphAndroidManagedStoreAppRelationshipsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidManagedStoreAppRelationshipsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphAndroidManagedStoreAppRelationshipsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphAndroidManagedStoreAppRelationshipsCountRequestBuilder) { + return NewMobileAppsItemGraphAndroidManagedStoreAppRelationshipsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_android_managed_store_app_relationships_mobile_app_relationship_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_android_managed_store_app_relationships_mobile_app_relationship_item_request_builder.go new file mode 100644 index 00000000000..cc74a4828dc --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_android_managed_store_app_relationships_mobile_app_relationship_item_request_builder.go @@ -0,0 +1,159 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphAndroidManagedStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphAndroidManagedStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphAndroidManagedStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidManagedStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphAndroidManagedStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters list of relationships for this mobile app. +type MobileAppsItemGraphAndroidManagedStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphAndroidManagedStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidManagedStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphAndroidManagedStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphAndroidManagedStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidManagedStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphAndroidManagedStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal instantiates a new MobileAppRelationshipItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidManagedStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidManagedStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + m := &MobileAppsItemGraphAndroidManagedStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidManagedStoreApp/relationships/{mobileAppRelationship%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphAndroidManagedStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder instantiates a new MobileAppRelationshipItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidManagedStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidManagedStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphAndroidManagedStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property relationships for deviceAppManagement +func (m *MobileAppsItemGraphAndroidManagedStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidManagedStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get list of relationships for this mobile app. +func (m *MobileAppsItemGraphAndroidManagedStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidManagedStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// Patch update the navigation property relationships in deviceAppManagement +func (m *MobileAppsItemGraphAndroidManagedStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphAndroidManagedStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// ToDeleteRequestInformation delete navigation property relationships for deviceAppManagement +func (m *MobileAppsItemGraphAndroidManagedStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidManagedStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation list of relationships for this mobile app. +func (m *MobileAppsItemGraphAndroidManagedStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidManagedStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property relationships in deviceAppManagement +func (m *MobileAppsItemGraphAndroidManagedStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphAndroidManagedStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphAndroidManagedStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphAndroidManagedStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + return NewMobileAppsItemGraphAndroidManagedStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_android_managed_store_app_relationships_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_android_managed_store_app_relationships_request_builder.go new file mode 100644 index 00000000000..a80e64c168e --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_android_managed_store_app_relationships_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphAndroidManagedStoreAppRelationshipsRequestBuilder provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphAndroidManagedStoreAppRelationshipsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphAndroidManagedStoreAppRelationshipsRequestBuilderGetQueryParameters list of relationships for this mobile app. +type MobileAppsItemGraphAndroidManagedStoreAppRelationshipsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphAndroidManagedStoreAppRelationshipsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidManagedStoreAppRelationshipsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphAndroidManagedStoreAppRelationshipsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphAndroidManagedStoreAppRelationshipsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidManagedStoreAppRelationshipsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppRelationshipId provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphAndroidManagedStoreAppRelationshipsRequestBuilder) ByMobileAppRelationshipId(mobileAppRelationshipId string)(*MobileAppsItemGraphAndroidManagedStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppRelationshipId != "" { + urlTplParams["mobileAppRelationship%2Did"] = mobileAppRelationshipId + } + return NewMobileAppsItemGraphAndroidManagedStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphAndroidManagedStoreAppRelationshipsRequestBuilderInternal instantiates a new RelationshipsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidManagedStoreAppRelationshipsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidManagedStoreAppRelationshipsRequestBuilder) { + m := &MobileAppsItemGraphAndroidManagedStoreAppRelationshipsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidManagedStoreApp/relationships{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphAndroidManagedStoreAppRelationshipsRequestBuilder instantiates a new RelationshipsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidManagedStoreAppRelationshipsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidManagedStoreAppRelationshipsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphAndroidManagedStoreAppRelationshipsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphAndroidManagedStoreAppRelationshipsRequestBuilder) Count()(*MobileAppsItemGraphAndroidManagedStoreAppRelationshipsCountRequestBuilder) { + return NewMobileAppsItemGraphAndroidManagedStoreAppRelationshipsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get list of relationships for this mobile app. +func (m *MobileAppsItemGraphAndroidManagedStoreAppRelationshipsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidManagedStoreAppRelationshipsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipCollectionResponseable), nil +} +// Post create new navigation property to relationships for deviceAppManagement +func (m *MobileAppsItemGraphAndroidManagedStoreAppRelationshipsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphAndroidManagedStoreAppRelationshipsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// ToGetRequestInformation list of relationships for this mobile app. +func (m *MobileAppsItemGraphAndroidManagedStoreAppRelationshipsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidManagedStoreAppRelationshipsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to relationships for deviceAppManagement +func (m *MobileAppsItemGraphAndroidManagedStoreAppRelationshipsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphAndroidManagedStoreAppRelationshipsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphAndroidManagedStoreAppRelationshipsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphAndroidManagedStoreAppRelationshipsRequestBuilder) { + return NewMobileAppsItemGraphAndroidManagedStoreAppRelationshipsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_android_managed_store_app_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_android_managed_store_app_request_builder.go index 53ed8846ddb..1cc160f54d9 100644 --- a/deviceappmanagement/mobile_apps_item_graph_android_managed_store_app_request_builder.go +++ b/deviceappmanagement/mobile_apps_item_graph_android_managed_store_app_request_builder.go @@ -27,6 +27,14 @@ type MobileAppsItemGraphAndroidManagedStoreAppRequestBuilderGetRequestConfigurat // Request query parameters QueryParameters *MobileAppsItemGraphAndroidManagedStoreAppRequestBuilderGetQueryParameters } +// Assignments provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphAndroidManagedStoreAppRequestBuilder) Assignments()(*MobileAppsItemGraphAndroidManagedStoreAppAssignmentsRequestBuilder) { + return NewMobileAppsItemGraphAndroidManagedStoreAppAssignmentsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Categories provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphAndroidManagedStoreAppRequestBuilder) Categories()(*MobileAppsItemGraphAndroidManagedStoreAppCategoriesRequestBuilder) { + return NewMobileAppsItemGraphAndroidManagedStoreAppCategoriesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // NewMobileAppsItemGraphAndroidManagedStoreAppRequestBuilderInternal instantiates a new GraphAndroidManagedStoreAppRequestBuilder and sets the default values. func NewMobileAppsItemGraphAndroidManagedStoreAppRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidManagedStoreAppRequestBuilder) { m := &MobileAppsItemGraphAndroidManagedStoreAppRequestBuilder{ @@ -59,6 +67,10 @@ func (m *MobileAppsItemGraphAndroidManagedStoreAppRequestBuilder) Get(ctx contex } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AndroidManagedStoreAppable), nil } +// Relationships provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphAndroidManagedStoreAppRequestBuilder) Relationships()(*MobileAppsItemGraphAndroidManagedStoreAppRelationshipsRequestBuilder) { + return NewMobileAppsItemGraphAndroidManagedStoreAppRelationshipsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation get the item of type microsoft.graph.mobileApp as microsoft.graph.androidManagedStoreApp func (m *MobileAppsItemGraphAndroidManagedStoreAppRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidManagedStoreAppRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/deviceappmanagement/mobile_apps_item_graph_android_store_app_assignments_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_android_store_app_assignments_count_request_builder.go new file mode 100644 index 00000000000..5b11bcd6c83 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_android_store_app_assignments_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphAndroidStoreAppAssignmentsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphAndroidStoreAppAssignmentsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphAndroidStoreAppAssignmentsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphAndroidStoreAppAssignmentsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphAndroidStoreAppAssignmentsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidStoreAppAssignmentsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphAndroidStoreAppAssignmentsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphAndroidStoreAppAssignmentsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidStoreAppAssignmentsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidStoreAppAssignmentsCountRequestBuilder) { + m := &MobileAppsItemGraphAndroidStoreAppAssignmentsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidStoreApp/assignments/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphAndroidStoreAppAssignmentsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidStoreAppAssignmentsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidStoreAppAssignmentsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphAndroidStoreAppAssignmentsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphAndroidStoreAppAssignmentsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidStoreAppAssignmentsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphAndroidStoreAppAssignmentsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidStoreAppAssignmentsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphAndroidStoreAppAssignmentsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphAndroidStoreAppAssignmentsCountRequestBuilder) { + return NewMobileAppsItemGraphAndroidStoreAppAssignmentsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_android_store_app_assignments_mobile_app_assignment_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_android_store_app_assignments_mobile_app_assignment_item_request_builder.go new file mode 100644 index 00000000000..8837c59edec --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_android_store_app_assignments_mobile_app_assignment_item_request_builder.go @@ -0,0 +1,159 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphAndroidStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphAndroidStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphAndroidStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphAndroidStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters the list of group assignments for this mobile app. +type MobileAppsItemGraphAndroidStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphAndroidStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphAndroidStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphAndroidStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphAndroidStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + m := &MobileAppsItemGraphAndroidStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidStoreApp/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphAndroidStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphAndroidStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property assignments for deviceAppManagement +func (m *MobileAppsItemGraphAndroidStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphAndroidStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// Patch update the navigation property assignments in deviceAppManagement +func (m *MobileAppsItemGraphAndroidStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphAndroidStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// ToDeleteRequestInformation delete navigation property assignments for deviceAppManagement +func (m *MobileAppsItemGraphAndroidStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphAndroidStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property assignments in deviceAppManagement +func (m *MobileAppsItemGraphAndroidStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphAndroidStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphAndroidStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphAndroidStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + return NewMobileAppsItemGraphAndroidStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_android_store_app_assignments_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_android_store_app_assignments_request_builder.go new file mode 100644 index 00000000000..3fb658aa00e --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_android_store_app_assignments_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphAndroidStoreAppAssignmentsRequestBuilder provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphAndroidStoreAppAssignmentsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphAndroidStoreAppAssignmentsRequestBuilderGetQueryParameters the list of group assignments for this mobile app. +type MobileAppsItemGraphAndroidStoreAppAssignmentsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphAndroidStoreAppAssignmentsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidStoreAppAssignmentsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphAndroidStoreAppAssignmentsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphAndroidStoreAppAssignmentsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidStoreAppAssignmentsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppAssignmentId provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphAndroidStoreAppAssignmentsRequestBuilder) ByMobileAppAssignmentId(mobileAppAssignmentId string)(*MobileAppsItemGraphAndroidStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppAssignmentId != "" { + urlTplParams["mobileAppAssignment%2Did"] = mobileAppAssignmentId + } + return NewMobileAppsItemGraphAndroidStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphAndroidStoreAppAssignmentsRequestBuilderInternal instantiates a new AssignmentsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidStoreAppAssignmentsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidStoreAppAssignmentsRequestBuilder) { + m := &MobileAppsItemGraphAndroidStoreAppAssignmentsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidStoreApp/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphAndroidStoreAppAssignmentsRequestBuilder instantiates a new AssignmentsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidStoreAppAssignmentsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidStoreAppAssignmentsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphAndroidStoreAppAssignmentsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphAndroidStoreAppAssignmentsRequestBuilder) Count()(*MobileAppsItemGraphAndroidStoreAppAssignmentsCountRequestBuilder) { + return NewMobileAppsItemGraphAndroidStoreAppAssignmentsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphAndroidStoreAppAssignmentsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidStoreAppAssignmentsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentCollectionResponseable), nil +} +// Post create new navigation property to assignments for deviceAppManagement +func (m *MobileAppsItemGraphAndroidStoreAppAssignmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphAndroidStoreAppAssignmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// ToGetRequestInformation the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphAndroidStoreAppAssignmentsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidStoreAppAssignmentsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to assignments for deviceAppManagement +func (m *MobileAppsItemGraphAndroidStoreAppAssignmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphAndroidStoreAppAssignmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphAndroidStoreAppAssignmentsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphAndroidStoreAppAssignmentsRequestBuilder) { + return NewMobileAppsItemGraphAndroidStoreAppAssignmentsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_android_store_app_categories_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_android_store_app_categories_count_request_builder.go new file mode 100644 index 00000000000..2b5fccff7f8 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_android_store_app_categories_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphAndroidStoreAppCategoriesCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphAndroidStoreAppCategoriesCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphAndroidStoreAppCategoriesCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphAndroidStoreAppCategoriesCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphAndroidStoreAppCategoriesCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidStoreAppCategoriesCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphAndroidStoreAppCategoriesCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphAndroidStoreAppCategoriesCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidStoreAppCategoriesCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidStoreAppCategoriesCountRequestBuilder) { + m := &MobileAppsItemGraphAndroidStoreAppCategoriesCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidStoreApp/categories/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphAndroidStoreAppCategoriesCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidStoreAppCategoriesCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidStoreAppCategoriesCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphAndroidStoreAppCategoriesCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphAndroidStoreAppCategoriesCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidStoreAppCategoriesCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphAndroidStoreAppCategoriesCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidStoreAppCategoriesCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphAndroidStoreAppCategoriesCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphAndroidStoreAppCategoriesCountRequestBuilder) { + return NewMobileAppsItemGraphAndroidStoreAppCategoriesCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_android_store_app_categories_mobile_app_category_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_android_store_app_categories_mobile_app_category_item_request_builder.go new file mode 100644 index 00000000000..11dc31e63e9 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_android_store_app_categories_mobile_app_category_item_request_builder.go @@ -0,0 +1,81 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphAndroidStoreAppCategoriesMobileAppCategoryItemRequestBuilder provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphAndroidStoreAppCategoriesMobileAppCategoryItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphAndroidStoreAppCategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters the list of categories for this app. +type MobileAppsItemGraphAndroidStoreAppCategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphAndroidStoreAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidStoreAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphAndroidStoreAppCategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphAndroidStoreAppCategoriesMobileAppCategoryItemRequestBuilderInternal instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidStoreAppCategoriesMobileAppCategoryItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidStoreAppCategoriesMobileAppCategoryItemRequestBuilder) { + m := &MobileAppsItemGraphAndroidStoreAppCategoriesMobileAppCategoryItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidStoreApp/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphAndroidStoreAppCategoriesMobileAppCategoryItemRequestBuilder instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidStoreAppCategoriesMobileAppCategoryItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidStoreAppCategoriesMobileAppCategoryItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphAndroidStoreAppCategoriesMobileAppCategoryItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get the list of categories for this app. +func (m *MobileAppsItemGraphAndroidStoreAppCategoriesMobileAppCategoryItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidStoreAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppCategoryFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryable), nil +} +// ToGetRequestInformation the list of categories for this app. +func (m *MobileAppsItemGraphAndroidStoreAppCategoriesMobileAppCategoryItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidStoreAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphAndroidStoreAppCategoriesMobileAppCategoryItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphAndroidStoreAppCategoriesMobileAppCategoryItemRequestBuilder) { + return NewMobileAppsItemGraphAndroidStoreAppCategoriesMobileAppCategoryItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_android_store_app_categories_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_android_store_app_categories_request_builder.go new file mode 100644 index 00000000000..81df5eb3812 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_android_store_app_categories_request_builder.go @@ -0,0 +1,108 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphAndroidStoreAppCategoriesRequestBuilder provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphAndroidStoreAppCategoriesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphAndroidStoreAppCategoriesRequestBuilderGetQueryParameters the list of categories for this app. +type MobileAppsItemGraphAndroidStoreAppCategoriesRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphAndroidStoreAppCategoriesRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidStoreAppCategoriesRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphAndroidStoreAppCategoriesRequestBuilderGetQueryParameters +} +// ByMobileAppCategoryId provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphAndroidStoreAppCategoriesRequestBuilder) ByMobileAppCategoryId(mobileAppCategoryId string)(*MobileAppsItemGraphAndroidStoreAppCategoriesMobileAppCategoryItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppCategoryId != "" { + urlTplParams["mobileAppCategory%2Did"] = mobileAppCategoryId + } + return NewMobileAppsItemGraphAndroidStoreAppCategoriesMobileAppCategoryItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphAndroidStoreAppCategoriesRequestBuilderInternal instantiates a new CategoriesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidStoreAppCategoriesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidStoreAppCategoriesRequestBuilder) { + m := &MobileAppsItemGraphAndroidStoreAppCategoriesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidStoreApp/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphAndroidStoreAppCategoriesRequestBuilder instantiates a new CategoriesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidStoreAppCategoriesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidStoreAppCategoriesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphAndroidStoreAppCategoriesRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphAndroidStoreAppCategoriesRequestBuilder) Count()(*MobileAppsItemGraphAndroidStoreAppCategoriesCountRequestBuilder) { + return NewMobileAppsItemGraphAndroidStoreAppCategoriesCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of categories for this app. +func (m *MobileAppsItemGraphAndroidStoreAppCategoriesRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidStoreAppCategoriesRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppCategoryCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryCollectionResponseable), nil +} +// ToGetRequestInformation the list of categories for this app. +func (m *MobileAppsItemGraphAndroidStoreAppCategoriesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidStoreAppCategoriesRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphAndroidStoreAppCategoriesRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphAndroidStoreAppCategoriesRequestBuilder) { + return NewMobileAppsItemGraphAndroidStoreAppCategoriesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_android_store_app_relationships_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_android_store_app_relationships_count_request_builder.go new file mode 100644 index 00000000000..d9be5d6f9fa --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_android_store_app_relationships_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphAndroidStoreAppRelationshipsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphAndroidStoreAppRelationshipsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphAndroidStoreAppRelationshipsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphAndroidStoreAppRelationshipsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphAndroidStoreAppRelationshipsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidStoreAppRelationshipsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphAndroidStoreAppRelationshipsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphAndroidStoreAppRelationshipsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidStoreAppRelationshipsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidStoreAppRelationshipsCountRequestBuilder) { + m := &MobileAppsItemGraphAndroidStoreAppRelationshipsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidStoreApp/relationships/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphAndroidStoreAppRelationshipsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidStoreAppRelationshipsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidStoreAppRelationshipsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphAndroidStoreAppRelationshipsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphAndroidStoreAppRelationshipsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidStoreAppRelationshipsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphAndroidStoreAppRelationshipsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidStoreAppRelationshipsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphAndroidStoreAppRelationshipsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphAndroidStoreAppRelationshipsCountRequestBuilder) { + return NewMobileAppsItemGraphAndroidStoreAppRelationshipsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_android_store_app_relationships_mobile_app_relationship_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_android_store_app_relationships_mobile_app_relationship_item_request_builder.go new file mode 100644 index 00000000000..81639458c84 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_android_store_app_relationships_mobile_app_relationship_item_request_builder.go @@ -0,0 +1,159 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphAndroidStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphAndroidStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphAndroidStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphAndroidStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters list of relationships for this mobile app. +type MobileAppsItemGraphAndroidStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphAndroidStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphAndroidStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphAndroidStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphAndroidStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal instantiates a new MobileAppRelationshipItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + m := &MobileAppsItemGraphAndroidStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidStoreApp/relationships/{mobileAppRelationship%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphAndroidStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder instantiates a new MobileAppRelationshipItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphAndroidStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property relationships for deviceAppManagement +func (m *MobileAppsItemGraphAndroidStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get list of relationships for this mobile app. +func (m *MobileAppsItemGraphAndroidStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// Patch update the navigation property relationships in deviceAppManagement +func (m *MobileAppsItemGraphAndroidStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphAndroidStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// ToDeleteRequestInformation delete navigation property relationships for deviceAppManagement +func (m *MobileAppsItemGraphAndroidStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation list of relationships for this mobile app. +func (m *MobileAppsItemGraphAndroidStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property relationships in deviceAppManagement +func (m *MobileAppsItemGraphAndroidStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphAndroidStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphAndroidStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphAndroidStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + return NewMobileAppsItemGraphAndroidStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_android_store_app_relationships_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_android_store_app_relationships_request_builder.go new file mode 100644 index 00000000000..5965454e0ef --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_android_store_app_relationships_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphAndroidStoreAppRelationshipsRequestBuilder provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphAndroidStoreAppRelationshipsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphAndroidStoreAppRelationshipsRequestBuilderGetQueryParameters list of relationships for this mobile app. +type MobileAppsItemGraphAndroidStoreAppRelationshipsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphAndroidStoreAppRelationshipsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidStoreAppRelationshipsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphAndroidStoreAppRelationshipsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphAndroidStoreAppRelationshipsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphAndroidStoreAppRelationshipsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppRelationshipId provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphAndroidStoreAppRelationshipsRequestBuilder) ByMobileAppRelationshipId(mobileAppRelationshipId string)(*MobileAppsItemGraphAndroidStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppRelationshipId != "" { + urlTplParams["mobileAppRelationship%2Did"] = mobileAppRelationshipId + } + return NewMobileAppsItemGraphAndroidStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphAndroidStoreAppRelationshipsRequestBuilderInternal instantiates a new RelationshipsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidStoreAppRelationshipsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidStoreAppRelationshipsRequestBuilder) { + m := &MobileAppsItemGraphAndroidStoreAppRelationshipsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidStoreApp/relationships{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphAndroidStoreAppRelationshipsRequestBuilder instantiates a new RelationshipsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphAndroidStoreAppRelationshipsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidStoreAppRelationshipsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphAndroidStoreAppRelationshipsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphAndroidStoreAppRelationshipsRequestBuilder) Count()(*MobileAppsItemGraphAndroidStoreAppRelationshipsCountRequestBuilder) { + return NewMobileAppsItemGraphAndroidStoreAppRelationshipsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get list of relationships for this mobile app. +func (m *MobileAppsItemGraphAndroidStoreAppRelationshipsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidStoreAppRelationshipsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipCollectionResponseable), nil +} +// Post create new navigation property to relationships for deviceAppManagement +func (m *MobileAppsItemGraphAndroidStoreAppRelationshipsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphAndroidStoreAppRelationshipsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// ToGetRequestInformation list of relationships for this mobile app. +func (m *MobileAppsItemGraphAndroidStoreAppRelationshipsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidStoreAppRelationshipsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to relationships for deviceAppManagement +func (m *MobileAppsItemGraphAndroidStoreAppRelationshipsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphAndroidStoreAppRelationshipsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphAndroidStoreAppRelationshipsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphAndroidStoreAppRelationshipsRequestBuilder) { + return NewMobileAppsItemGraphAndroidStoreAppRelationshipsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_android_store_app_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_android_store_app_request_builder.go index 594851b3154..65e56678c05 100644 --- a/deviceappmanagement/mobile_apps_item_graph_android_store_app_request_builder.go +++ b/deviceappmanagement/mobile_apps_item_graph_android_store_app_request_builder.go @@ -27,6 +27,14 @@ type MobileAppsItemGraphAndroidStoreAppRequestBuilderGetRequestConfiguration str // Request query parameters QueryParameters *MobileAppsItemGraphAndroidStoreAppRequestBuilderGetQueryParameters } +// Assignments provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphAndroidStoreAppRequestBuilder) Assignments()(*MobileAppsItemGraphAndroidStoreAppAssignmentsRequestBuilder) { + return NewMobileAppsItemGraphAndroidStoreAppAssignmentsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Categories provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphAndroidStoreAppRequestBuilder) Categories()(*MobileAppsItemGraphAndroidStoreAppCategoriesRequestBuilder) { + return NewMobileAppsItemGraphAndroidStoreAppCategoriesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // NewMobileAppsItemGraphAndroidStoreAppRequestBuilderInternal instantiates a new GraphAndroidStoreAppRequestBuilder and sets the default values. func NewMobileAppsItemGraphAndroidStoreAppRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphAndroidStoreAppRequestBuilder) { m := &MobileAppsItemGraphAndroidStoreAppRequestBuilder{ @@ -59,6 +67,10 @@ func (m *MobileAppsItemGraphAndroidStoreAppRequestBuilder) Get(ctx context.Conte } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AndroidStoreAppable), nil } +// Relationships provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphAndroidStoreAppRequestBuilder) Relationships()(*MobileAppsItemGraphAndroidStoreAppRelationshipsRequestBuilder) { + return NewMobileAppsItemGraphAndroidStoreAppRelationshipsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation get the item of type microsoft.graph.mobileApp as microsoft.graph.androidStoreApp func (m *MobileAppsItemGraphAndroidStoreAppRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphAndroidStoreAppRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_assignments_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_assignments_count_request_builder.go new file mode 100644 index 00000000000..981c6540860 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_assignments_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphIosLobAppAssignmentsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphIosLobAppAssignmentsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphIosLobAppAssignmentsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphIosLobAppAssignmentsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphIosLobAppAssignmentsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosLobAppAssignmentsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphIosLobAppAssignmentsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphIosLobAppAssignmentsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosLobAppAssignmentsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosLobAppAssignmentsCountRequestBuilder) { + m := &MobileAppsItemGraphIosLobAppAssignmentsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/assignments/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphIosLobAppAssignmentsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosLobAppAssignmentsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosLobAppAssignmentsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphIosLobAppAssignmentsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphIosLobAppAssignmentsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosLobAppAssignmentsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphIosLobAppAssignmentsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosLobAppAssignmentsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphIosLobAppAssignmentsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphIosLobAppAssignmentsCountRequestBuilder) { + return NewMobileAppsItemGraphIosLobAppAssignmentsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_assignments_mobile_app_assignment_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_assignments_mobile_app_assignment_item_request_builder.go new file mode 100644 index 00000000000..8902eab4e22 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_assignments_mobile_app_assignment_item_request_builder.go @@ -0,0 +1,159 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphIosLobAppAssignmentsMobileAppAssignmentItemRequestBuilder provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphIosLobAppAssignmentsMobileAppAssignmentItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphIosLobAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosLobAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphIosLobAppAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters the list of group assignments for this mobile app. +type MobileAppsItemGraphIosLobAppAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphIosLobAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosLobAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphIosLobAppAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphIosLobAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosLobAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphIosLobAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosLobAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + m := &MobileAppsItemGraphIosLobAppAssignmentsMobileAppAssignmentItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphIosLobAppAssignmentsMobileAppAssignmentItemRequestBuilder instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosLobAppAssignmentsMobileAppAssignmentItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphIosLobAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property assignments for deviceAppManagement +func (m *MobileAppsItemGraphIosLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosLobAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphIosLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosLobAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// Patch update the navigation property assignments in deviceAppManagement +func (m *MobileAppsItemGraphIosLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphIosLobAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// ToDeleteRequestInformation delete navigation property assignments for deviceAppManagement +func (m *MobileAppsItemGraphIosLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosLobAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphIosLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosLobAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property assignments in deviceAppManagement +func (m *MobileAppsItemGraphIosLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphIosLobAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphIosLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphIosLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + return NewMobileAppsItemGraphIosLobAppAssignmentsMobileAppAssignmentItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_assignments_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_assignments_request_builder.go new file mode 100644 index 00000000000..01921a92056 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_assignments_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphIosLobAppAssignmentsRequestBuilder provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphIosLobAppAssignmentsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphIosLobAppAssignmentsRequestBuilderGetQueryParameters the list of group assignments for this mobile app. +type MobileAppsItemGraphIosLobAppAssignmentsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphIosLobAppAssignmentsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosLobAppAssignmentsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphIosLobAppAssignmentsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphIosLobAppAssignmentsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosLobAppAssignmentsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppAssignmentId provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphIosLobAppAssignmentsRequestBuilder) ByMobileAppAssignmentId(mobileAppAssignmentId string)(*MobileAppsItemGraphIosLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppAssignmentId != "" { + urlTplParams["mobileAppAssignment%2Did"] = mobileAppAssignmentId + } + return NewMobileAppsItemGraphIosLobAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphIosLobAppAssignmentsRequestBuilderInternal instantiates a new AssignmentsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosLobAppAssignmentsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosLobAppAssignmentsRequestBuilder) { + m := &MobileAppsItemGraphIosLobAppAssignmentsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphIosLobAppAssignmentsRequestBuilder instantiates a new AssignmentsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosLobAppAssignmentsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosLobAppAssignmentsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphIosLobAppAssignmentsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphIosLobAppAssignmentsRequestBuilder) Count()(*MobileAppsItemGraphIosLobAppAssignmentsCountRequestBuilder) { + return NewMobileAppsItemGraphIosLobAppAssignmentsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphIosLobAppAssignmentsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosLobAppAssignmentsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentCollectionResponseable), nil +} +// Post create new navigation property to assignments for deviceAppManagement +func (m *MobileAppsItemGraphIosLobAppAssignmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphIosLobAppAssignmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// ToGetRequestInformation the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphIosLobAppAssignmentsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosLobAppAssignmentsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to assignments for deviceAppManagement +func (m *MobileAppsItemGraphIosLobAppAssignmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphIosLobAppAssignmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphIosLobAppAssignmentsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphIosLobAppAssignmentsRequestBuilder) { + return NewMobileAppsItemGraphIosLobAppAssignmentsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_categories_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_categories_count_request_builder.go new file mode 100644 index 00000000000..9abfeb8a3d3 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_categories_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphIosLobAppCategoriesCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphIosLobAppCategoriesCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphIosLobAppCategoriesCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphIosLobAppCategoriesCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphIosLobAppCategoriesCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosLobAppCategoriesCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphIosLobAppCategoriesCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphIosLobAppCategoriesCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosLobAppCategoriesCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosLobAppCategoriesCountRequestBuilder) { + m := &MobileAppsItemGraphIosLobAppCategoriesCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/categories/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphIosLobAppCategoriesCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosLobAppCategoriesCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosLobAppCategoriesCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphIosLobAppCategoriesCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphIosLobAppCategoriesCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosLobAppCategoriesCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphIosLobAppCategoriesCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosLobAppCategoriesCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphIosLobAppCategoriesCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphIosLobAppCategoriesCountRequestBuilder) { + return NewMobileAppsItemGraphIosLobAppCategoriesCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_categories_mobile_app_category_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_categories_mobile_app_category_item_request_builder.go new file mode 100644 index 00000000000..601fa49289f --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_categories_mobile_app_category_item_request_builder.go @@ -0,0 +1,81 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphIosLobAppCategoriesMobileAppCategoryItemRequestBuilder provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphIosLobAppCategoriesMobileAppCategoryItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphIosLobAppCategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters the list of categories for this app. +type MobileAppsItemGraphIosLobAppCategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphIosLobAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosLobAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphIosLobAppCategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphIosLobAppCategoriesMobileAppCategoryItemRequestBuilderInternal instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosLobAppCategoriesMobileAppCategoryItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosLobAppCategoriesMobileAppCategoryItemRequestBuilder) { + m := &MobileAppsItemGraphIosLobAppCategoriesMobileAppCategoryItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphIosLobAppCategoriesMobileAppCategoryItemRequestBuilder instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosLobAppCategoriesMobileAppCategoryItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosLobAppCategoriesMobileAppCategoryItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphIosLobAppCategoriesMobileAppCategoryItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get the list of categories for this app. +func (m *MobileAppsItemGraphIosLobAppCategoriesMobileAppCategoryItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosLobAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppCategoryFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryable), nil +} +// ToGetRequestInformation the list of categories for this app. +func (m *MobileAppsItemGraphIosLobAppCategoriesMobileAppCategoryItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosLobAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphIosLobAppCategoriesMobileAppCategoryItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphIosLobAppCategoriesMobileAppCategoryItemRequestBuilder) { + return NewMobileAppsItemGraphIosLobAppCategoriesMobileAppCategoryItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_categories_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_categories_request_builder.go new file mode 100644 index 00000000000..7a0b7237aad --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_categories_request_builder.go @@ -0,0 +1,108 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphIosLobAppCategoriesRequestBuilder provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphIosLobAppCategoriesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphIosLobAppCategoriesRequestBuilderGetQueryParameters the list of categories for this app. +type MobileAppsItemGraphIosLobAppCategoriesRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphIosLobAppCategoriesRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosLobAppCategoriesRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphIosLobAppCategoriesRequestBuilderGetQueryParameters +} +// ByMobileAppCategoryId provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphIosLobAppCategoriesRequestBuilder) ByMobileAppCategoryId(mobileAppCategoryId string)(*MobileAppsItemGraphIosLobAppCategoriesMobileAppCategoryItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppCategoryId != "" { + urlTplParams["mobileAppCategory%2Did"] = mobileAppCategoryId + } + return NewMobileAppsItemGraphIosLobAppCategoriesMobileAppCategoryItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphIosLobAppCategoriesRequestBuilderInternal instantiates a new CategoriesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosLobAppCategoriesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosLobAppCategoriesRequestBuilder) { + m := &MobileAppsItemGraphIosLobAppCategoriesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphIosLobAppCategoriesRequestBuilder instantiates a new CategoriesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosLobAppCategoriesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosLobAppCategoriesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphIosLobAppCategoriesRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphIosLobAppCategoriesRequestBuilder) Count()(*MobileAppsItemGraphIosLobAppCategoriesCountRequestBuilder) { + return NewMobileAppsItemGraphIosLobAppCategoriesCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of categories for this app. +func (m *MobileAppsItemGraphIosLobAppCategoriesRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosLobAppCategoriesRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppCategoryCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryCollectionResponseable), nil +} +// ToGetRequestInformation the list of categories for this app. +func (m *MobileAppsItemGraphIosLobAppCategoriesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosLobAppCategoriesRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphIosLobAppCategoriesRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphIosLobAppCategoriesRequestBuilder) { + return NewMobileAppsItemGraphIosLobAppCategoriesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_content_versions_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_content_versions_count_request_builder.go new file mode 100644 index 00000000000..c66d8ec8031 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_content_versions_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphIosLobAppContentVersionsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphIosLobAppContentVersionsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphIosLobAppContentVersionsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphIosLobAppContentVersionsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphIosLobAppContentVersionsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosLobAppContentVersionsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphIosLobAppContentVersionsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphIosLobAppContentVersionsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosLobAppContentVersionsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosLobAppContentVersionsCountRequestBuilder) { + m := &MobileAppsItemGraphIosLobAppContentVersionsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/contentVersions/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphIosLobAppContentVersionsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosLobAppContentVersionsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosLobAppContentVersionsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphIosLobAppContentVersionsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphIosLobAppContentVersionsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosLobAppContentVersionsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphIosLobAppContentVersionsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosLobAppContentVersionsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphIosLobAppContentVersionsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphIosLobAppContentVersionsCountRequestBuilder) { + return NewMobileAppsItemGraphIosLobAppContentVersionsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_content_versions_item_contained_apps_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_content_versions_item_contained_apps_count_request_builder.go new file mode 100644 index 00000000000..27af83d2db0 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_content_versions_item_contained_apps_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsCountRequestBuilder) { + m := &MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/contentVersions/{mobileAppContent%2Did}/containedApps/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsCountRequestBuilder) { + return NewMobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_content_versions_item_contained_apps_mobile_contained_app_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_content_versions_item_contained_apps_mobile_contained_app_item_request_builder.go new file mode 100644 index 00000000000..5756bc73125 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_content_versions_item_contained_apps_mobile_contained_app_item_request_builder.go @@ -0,0 +1,159 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. +type MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetQueryParameters the collection of contained apps in a MobileLobApp acting as a package. +type MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderInternal instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) { + m := &MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/contentVersions/{mobileAppContent%2Did}/containedApps/{mobileContainedApp%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property containedApps for deviceAppManagement +func (m *MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get the collection of contained apps in a MobileLobApp acting as a package. +func (m *MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileContainedAppFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable), nil +} +// Patch update the navigation property containedApps in deviceAppManagement +func (m *MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, requestConfiguration *MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileContainedAppFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable), nil +} +// ToDeleteRequestInformation delete navigation property containedApps for deviceAppManagement +func (m *MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation the collection of contained apps in a MobileLobApp acting as a package. +func (m *MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property containedApps in deviceAppManagement +func (m *MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, requestConfiguration *MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) { + return NewMobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_content_versions_item_contained_apps_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_content_versions_item_contained_apps_request_builder.go new file mode 100644 index 00000000000..636ad39f482 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_content_versions_item_contained_apps_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsRequestBuilder provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. +type MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsRequestBuilderGetQueryParameters the collection of contained apps in a MobileLobApp acting as a package. +type MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileContainedAppId provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. +func (m *MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsRequestBuilder) ByMobileContainedAppId(mobileContainedAppId string)(*MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileContainedAppId != "" { + urlTplParams["mobileContainedApp%2Did"] = mobileContainedAppId + } + return NewMobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsRequestBuilderInternal instantiates a new ContainedAppsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsRequestBuilder) { + m := &MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/contentVersions/{mobileAppContent%2Did}/containedApps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsRequestBuilder instantiates a new ContainedAppsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsRequestBuilder) Count()(*MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsCountRequestBuilder) { + return NewMobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the collection of contained apps in a MobileLobApp acting as a package. +func (m *MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileContainedAppCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppCollectionResponseable), nil +} +// Post create new navigation property to containedApps for deviceAppManagement +func (m *MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, requestConfiguration *MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileContainedAppFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable), nil +} +// ToGetRequestInformation the collection of contained apps in a MobileLobApp acting as a package. +func (m *MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to containedApps for deviceAppManagement +func (m *MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, requestConfiguration *MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsRequestBuilder) { + return NewMobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_content_versions_item_files_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_content_versions_item_files_count_request_builder.go new file mode 100644 index 00000000000..f4bb20fdbda --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_content_versions_item_files_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphIosLobAppContentVersionsItemFilesCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphIosLobAppContentVersionsItemFilesCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphIosLobAppContentVersionsItemFilesCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphIosLobAppContentVersionsItemFilesCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphIosLobAppContentVersionsItemFilesCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosLobAppContentVersionsItemFilesCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphIosLobAppContentVersionsItemFilesCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphIosLobAppContentVersionsItemFilesCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosLobAppContentVersionsItemFilesCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosLobAppContentVersionsItemFilesCountRequestBuilder) { + m := &MobileAppsItemGraphIosLobAppContentVersionsItemFilesCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/contentVersions/{mobileAppContent%2Did}/files/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphIosLobAppContentVersionsItemFilesCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosLobAppContentVersionsItemFilesCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosLobAppContentVersionsItemFilesCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphIosLobAppContentVersionsItemFilesCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphIosLobAppContentVersionsItemFilesCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosLobAppContentVersionsItemFilesCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphIosLobAppContentVersionsItemFilesCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosLobAppContentVersionsItemFilesCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphIosLobAppContentVersionsItemFilesCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphIosLobAppContentVersionsItemFilesCountRequestBuilder) { + return NewMobileAppsItemGraphIosLobAppContentVersionsItemFilesCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_content_versions_item_files_item_commit_post_request_body.go b/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_content_versions_item_files_item_commit_post_request_body.go new file mode 100644 index 00000000000..0afc4170940 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_content_versions_item_files_item_commit_post_request_body.go @@ -0,0 +1,111 @@ +package deviceappmanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +// MobileAppsItemGraphIosLobAppContentVersionsItemFilesItemCommitPostRequestBody +type MobileAppsItemGraphIosLobAppContentVersionsItemFilesItemCommitPostRequestBody struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewMobileAppsItemGraphIosLobAppContentVersionsItemFilesItemCommitPostRequestBody instantiates a new MobileAppsItemGraphIosLobAppContentVersionsItemFilesItemCommitPostRequestBody and sets the default values. +func NewMobileAppsItemGraphIosLobAppContentVersionsItemFilesItemCommitPostRequestBody()(*MobileAppsItemGraphIosLobAppContentVersionsItemFilesItemCommitPostRequestBody) { + m := &MobileAppsItemGraphIosLobAppContentVersionsItemFilesItemCommitPostRequestBody{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateMobileAppsItemGraphIosLobAppContentVersionsItemFilesItemCommitPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileAppsItemGraphIosLobAppContentVersionsItemFilesItemCommitPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMobileAppsItemGraphIosLobAppContentVersionsItemFilesItemCommitPostRequestBody(), nil +} +// GetAdditionalData gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *MobileAppsItemGraphIosLobAppContentVersionsItemFilesItemCommitPostRequestBody) GetAdditionalData()(map[string]any) { + val , err := m.backingStore.Get("additionalData") + if err != nil { + panic(err) + } + if val == nil { + var value = make(map[string]any); + m.SetAdditionalData(value); + } + return val.(map[string]any) +} +// GetBackingStore gets the backingStore property value. Stores model information. +func (m *MobileAppsItemGraphIosLobAppContentVersionsItemFilesItemCommitPostRequestBody) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileAppsItemGraphIosLobAppContentVersionsItemFilesItemCommitPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["fileEncryptionInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateFileEncryptionInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetFileEncryptionInfo(val.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable)) + } + return nil + } + return res +} +// GetFileEncryptionInfo gets the fileEncryptionInfo property value. The fileEncryptionInfo property +func (m *MobileAppsItemGraphIosLobAppContentVersionsItemFilesItemCommitPostRequestBody) GetFileEncryptionInfo()(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable) { + val, err := m.GetBackingStore().Get("fileEncryptionInfo") + if err != nil { + panic(err) + } + if val != nil { + return val.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable) + } + return nil +} +// Serialize serializes information the current object +func (m *MobileAppsItemGraphIosLobAppContentVersionsItemFilesItemCommitPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("fileEncryptionInfo", m.GetFileEncryptionInfo()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *MobileAppsItemGraphIosLobAppContentVersionsItemFilesItemCommitPostRequestBody) SetAdditionalData(value map[string]any)() { + err := m.GetBackingStore().Set("additionalData", value) + if err != nil { + panic(err) + } +} +// SetBackingStore sets the backingStore property value. Stores model information. +func (m *MobileAppsItemGraphIosLobAppContentVersionsItemFilesItemCommitPostRequestBody) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetFileEncryptionInfo sets the fileEncryptionInfo property value. The fileEncryptionInfo property +func (m *MobileAppsItemGraphIosLobAppContentVersionsItemFilesItemCommitPostRequestBody) SetFileEncryptionInfo(value ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable)() { + err := m.GetBackingStore().Set("fileEncryptionInfo", value) + if err != nil { + panic(err) + } +} +// MobileAppsItemGraphIosLobAppContentVersionsItemFilesItemCommitPostRequestBodyable +type MobileAppsItemGraphIosLobAppContentVersionsItemFilesItemCommitPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetFileEncryptionInfo()(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetFileEncryptionInfo(value ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable)() +} diff --git a/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_content_versions_item_files_item_commit_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_content_versions_item_files_item_commit_request_builder.go new file mode 100644 index 00000000000..207e598da18 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_content_versions_item_files_item_commit_request_builder.go @@ -0,0 +1,68 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphIosLobAppContentVersionsItemFilesItemCommitRequestBuilder provides operations to call the commit method. +type MobileAppsItemGraphIosLobAppContentVersionsItemFilesItemCommitRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphIosLobAppContentVersionsItemFilesItemCommitRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosLobAppContentVersionsItemFilesItemCommitRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphIosLobAppContentVersionsItemFilesItemCommitRequestBuilderInternal instantiates a new CommitRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosLobAppContentVersionsItemFilesItemCommitRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosLobAppContentVersionsItemFilesItemCommitRequestBuilder) { + m := &MobileAppsItemGraphIosLobAppContentVersionsItemFilesItemCommitRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/commit", pathParameters), + } + return m +} +// NewMobileAppsItemGraphIosLobAppContentVersionsItemFilesItemCommitRequestBuilder instantiates a new CommitRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosLobAppContentVersionsItemFilesItemCommitRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosLobAppContentVersionsItemFilesItemCommitRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphIosLobAppContentVersionsItemFilesItemCommitRequestBuilderInternal(urlParams, requestAdapter) +} +// Post commits a file of a given app. +func (m *MobileAppsItemGraphIosLobAppContentVersionsItemFilesItemCommitRequestBuilder) Post(ctx context.Context, body MobileAppsItemGraphIosLobAppContentVersionsItemFilesItemCommitPostRequestBodyable, requestConfiguration *MobileAppsItemGraphIosLobAppContentVersionsItemFilesItemCommitRequestBuilderPostRequestConfiguration)(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation commits a file of a given app. +func (m *MobileAppsItemGraphIosLobAppContentVersionsItemFilesItemCommitRequestBuilder) ToPostRequestInformation(ctx context.Context, body MobileAppsItemGraphIosLobAppContentVersionsItemFilesItemCommitPostRequestBodyable, requestConfiguration *MobileAppsItemGraphIosLobAppContentVersionsItemFilesItemCommitRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphIosLobAppContentVersionsItemFilesItemCommitRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphIosLobAppContentVersionsItemFilesItemCommitRequestBuilder) { + return NewMobileAppsItemGraphIosLobAppContentVersionsItemFilesItemCommitRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_content_versions_item_files_item_renew_upload_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_content_versions_item_files_item_renew_upload_request_builder.go new file mode 100644 index 00000000000..8387e514be1 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_content_versions_item_files_item_renew_upload_request_builder.go @@ -0,0 +1,64 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphIosLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder provides operations to call the renewUpload method. +type MobileAppsItemGraphIosLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphIosLobAppContentVersionsItemFilesItemRenewUploadRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosLobAppContentVersionsItemFilesItemRenewUploadRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphIosLobAppContentVersionsItemFilesItemRenewUploadRequestBuilderInternal instantiates a new RenewUploadRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosLobAppContentVersionsItemFilesItemRenewUploadRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder) { + m := &MobileAppsItemGraphIosLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/renewUpload", pathParameters), + } + return m +} +// NewMobileAppsItemGraphIosLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder instantiates a new RenewUploadRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphIosLobAppContentVersionsItemFilesItemRenewUploadRequestBuilderInternal(urlParams, requestAdapter) +} +// Post renews the SAS URI for an application file upload. +func (m *MobileAppsItemGraphIosLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder) Post(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosLobAppContentVersionsItemFilesItemRenewUploadRequestBuilderPostRequestConfiguration)(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation renews the SAS URI for an application file upload. +func (m *MobileAppsItemGraphIosLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosLobAppContentVersionsItemFilesItemRenewUploadRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphIosLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphIosLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder) { + return NewMobileAppsItemGraphIosLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_content_versions_item_files_mobile_app_content_file_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_content_versions_item_files_mobile_app_content_file_item_request_builder.go new file mode 100644 index 00000000000..f740d4b6862 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_content_versions_item_files_mobile_app_content_file_item_request_builder.go @@ -0,0 +1,167 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphIosLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. +type MobileAppsItemGraphIosLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphIosLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphIosLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetQueryParameters the list of files for this app content version. +type MobileAppsItemGraphIosLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphIosLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphIosLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphIosLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// Commit provides operations to call the commit method. +func (m *MobileAppsItemGraphIosLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) Commit()(*MobileAppsItemGraphIosLobAppContentVersionsItemFilesItemCommitRequestBuilder) { + return NewMobileAppsItemGraphIosLobAppContentVersionsItemFilesItemCommitRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphIosLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderInternal instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) { + m := &MobileAppsItemGraphIosLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphIosLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphIosLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property files for deviceAppManagement +func (m *MobileAppsItemGraphIosLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get the list of files for this app content version. +func (m *MobileAppsItemGraphIosLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFileFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable), nil +} +// Patch update the navigation property files in deviceAppManagement +func (m *MobileAppsItemGraphIosLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, requestConfiguration *MobileAppsItemGraphIosLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFileFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable), nil +} +// RenewUpload provides operations to call the renewUpload method. +func (m *MobileAppsItemGraphIosLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) RenewUpload()(*MobileAppsItemGraphIosLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder) { + return NewMobileAppsItemGraphIosLobAppContentVersionsItemFilesItemRenewUploadRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToDeleteRequestInformation delete navigation property files for deviceAppManagement +func (m *MobileAppsItemGraphIosLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation the list of files for this app content version. +func (m *MobileAppsItemGraphIosLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property files in deviceAppManagement +func (m *MobileAppsItemGraphIosLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, requestConfiguration *MobileAppsItemGraphIosLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphIosLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphIosLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) { + return NewMobileAppsItemGraphIosLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_content_versions_item_files_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_content_versions_item_files_request_builder.go new file mode 100644 index 00000000000..d874592527d --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_content_versions_item_files_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphIosLobAppContentVersionsItemFilesRequestBuilder provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. +type MobileAppsItemGraphIosLobAppContentVersionsItemFilesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphIosLobAppContentVersionsItemFilesRequestBuilderGetQueryParameters the list of files for this app content version. +type MobileAppsItemGraphIosLobAppContentVersionsItemFilesRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphIosLobAppContentVersionsItemFilesRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosLobAppContentVersionsItemFilesRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphIosLobAppContentVersionsItemFilesRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphIosLobAppContentVersionsItemFilesRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosLobAppContentVersionsItemFilesRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppContentFileId provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. +func (m *MobileAppsItemGraphIosLobAppContentVersionsItemFilesRequestBuilder) ByMobileAppContentFileId(mobileAppContentFileId string)(*MobileAppsItemGraphIosLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppContentFileId != "" { + urlTplParams["mobileAppContentFile%2Did"] = mobileAppContentFileId + } + return NewMobileAppsItemGraphIosLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphIosLobAppContentVersionsItemFilesRequestBuilderInternal instantiates a new FilesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosLobAppContentVersionsItemFilesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosLobAppContentVersionsItemFilesRequestBuilder) { + m := &MobileAppsItemGraphIosLobAppContentVersionsItemFilesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/contentVersions/{mobileAppContent%2Did}/files{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphIosLobAppContentVersionsItemFilesRequestBuilder instantiates a new FilesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosLobAppContentVersionsItemFilesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosLobAppContentVersionsItemFilesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphIosLobAppContentVersionsItemFilesRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphIosLobAppContentVersionsItemFilesRequestBuilder) Count()(*MobileAppsItemGraphIosLobAppContentVersionsItemFilesCountRequestBuilder) { + return NewMobileAppsItemGraphIosLobAppContentVersionsItemFilesCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of files for this app content version. +func (m *MobileAppsItemGraphIosLobAppContentVersionsItemFilesRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosLobAppContentVersionsItemFilesRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFileCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileCollectionResponseable), nil +} +// Post create new navigation property to files for deviceAppManagement +func (m *MobileAppsItemGraphIosLobAppContentVersionsItemFilesRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, requestConfiguration *MobileAppsItemGraphIosLobAppContentVersionsItemFilesRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFileFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable), nil +} +// ToGetRequestInformation the list of files for this app content version. +func (m *MobileAppsItemGraphIosLobAppContentVersionsItemFilesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosLobAppContentVersionsItemFilesRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to files for deviceAppManagement +func (m *MobileAppsItemGraphIosLobAppContentVersionsItemFilesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, requestConfiguration *MobileAppsItemGraphIosLobAppContentVersionsItemFilesRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphIosLobAppContentVersionsItemFilesRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphIosLobAppContentVersionsItemFilesRequestBuilder) { + return NewMobileAppsItemGraphIosLobAppContentVersionsItemFilesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_content_versions_mobile_app_content_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_content_versions_mobile_app_content_item_request_builder.go new file mode 100644 index 00000000000..ab9c3db34c2 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_content_versions_mobile_app_content_item_request_builder.go @@ -0,0 +1,167 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphIosLobAppContentVersionsMobileAppContentItemRequestBuilder provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. +type MobileAppsItemGraphIosLobAppContentVersionsMobileAppContentItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphIosLobAppContentVersionsMobileAppContentItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosLobAppContentVersionsMobileAppContentItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphIosLobAppContentVersionsMobileAppContentItemRequestBuilderGetQueryParameters the list of content versions for this app. +type MobileAppsItemGraphIosLobAppContentVersionsMobileAppContentItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphIosLobAppContentVersionsMobileAppContentItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosLobAppContentVersionsMobileAppContentItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphIosLobAppContentVersionsMobileAppContentItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphIosLobAppContentVersionsMobileAppContentItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosLobAppContentVersionsMobileAppContentItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphIosLobAppContentVersionsMobileAppContentItemRequestBuilderInternal instantiates a new MobileAppContentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosLobAppContentVersionsMobileAppContentItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosLobAppContentVersionsMobileAppContentItemRequestBuilder) { + m := &MobileAppsItemGraphIosLobAppContentVersionsMobileAppContentItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/contentVersions/{mobileAppContent%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphIosLobAppContentVersionsMobileAppContentItemRequestBuilder instantiates a new MobileAppContentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosLobAppContentVersionsMobileAppContentItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosLobAppContentVersionsMobileAppContentItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphIosLobAppContentVersionsMobileAppContentItemRequestBuilderInternal(urlParams, requestAdapter) +} +// ContainedApps provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. +func (m *MobileAppsItemGraphIosLobAppContentVersionsMobileAppContentItemRequestBuilder) ContainedApps()(*MobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsRequestBuilder) { + return NewMobileAppsItemGraphIosLobAppContentVersionsItemContainedAppsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Delete delete navigation property contentVersions for deviceAppManagement +func (m *MobileAppsItemGraphIosLobAppContentVersionsMobileAppContentItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosLobAppContentVersionsMobileAppContentItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Files provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. +func (m *MobileAppsItemGraphIosLobAppContentVersionsMobileAppContentItemRequestBuilder) Files()(*MobileAppsItemGraphIosLobAppContentVersionsItemFilesRequestBuilder) { + return NewMobileAppsItemGraphIosLobAppContentVersionsItemFilesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of content versions for this app. +func (m *MobileAppsItemGraphIosLobAppContentVersionsMobileAppContentItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosLobAppContentVersionsMobileAppContentItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable), nil +} +// Patch update the navigation property contentVersions in deviceAppManagement +func (m *MobileAppsItemGraphIosLobAppContentVersionsMobileAppContentItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, requestConfiguration *MobileAppsItemGraphIosLobAppContentVersionsMobileAppContentItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable), nil +} +// ToDeleteRequestInformation delete navigation property contentVersions for deviceAppManagement +func (m *MobileAppsItemGraphIosLobAppContentVersionsMobileAppContentItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosLobAppContentVersionsMobileAppContentItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation the list of content versions for this app. +func (m *MobileAppsItemGraphIosLobAppContentVersionsMobileAppContentItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosLobAppContentVersionsMobileAppContentItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property contentVersions in deviceAppManagement +func (m *MobileAppsItemGraphIosLobAppContentVersionsMobileAppContentItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, requestConfiguration *MobileAppsItemGraphIosLobAppContentVersionsMobileAppContentItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphIosLobAppContentVersionsMobileAppContentItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphIosLobAppContentVersionsMobileAppContentItemRequestBuilder) { + return NewMobileAppsItemGraphIosLobAppContentVersionsMobileAppContentItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_content_versions_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_content_versions_request_builder.go new file mode 100644 index 00000000000..f91468d8a5d --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_content_versions_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphIosLobAppContentVersionsRequestBuilder provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. +type MobileAppsItemGraphIosLobAppContentVersionsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphIosLobAppContentVersionsRequestBuilderGetQueryParameters the list of content versions for this app. +type MobileAppsItemGraphIosLobAppContentVersionsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphIosLobAppContentVersionsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosLobAppContentVersionsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphIosLobAppContentVersionsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphIosLobAppContentVersionsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosLobAppContentVersionsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppContentId provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. +func (m *MobileAppsItemGraphIosLobAppContentVersionsRequestBuilder) ByMobileAppContentId(mobileAppContentId string)(*MobileAppsItemGraphIosLobAppContentVersionsMobileAppContentItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppContentId != "" { + urlTplParams["mobileAppContent%2Did"] = mobileAppContentId + } + return NewMobileAppsItemGraphIosLobAppContentVersionsMobileAppContentItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphIosLobAppContentVersionsRequestBuilderInternal instantiates a new ContentVersionsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosLobAppContentVersionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosLobAppContentVersionsRequestBuilder) { + m := &MobileAppsItemGraphIosLobAppContentVersionsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/contentVersions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphIosLobAppContentVersionsRequestBuilder instantiates a new ContentVersionsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosLobAppContentVersionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosLobAppContentVersionsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphIosLobAppContentVersionsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphIosLobAppContentVersionsRequestBuilder) Count()(*MobileAppsItemGraphIosLobAppContentVersionsCountRequestBuilder) { + return NewMobileAppsItemGraphIosLobAppContentVersionsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of content versions for this app. +func (m *MobileAppsItemGraphIosLobAppContentVersionsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosLobAppContentVersionsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentCollectionResponseable), nil +} +// Post create new navigation property to contentVersions for deviceAppManagement +func (m *MobileAppsItemGraphIosLobAppContentVersionsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, requestConfiguration *MobileAppsItemGraphIosLobAppContentVersionsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable), nil +} +// ToGetRequestInformation the list of content versions for this app. +func (m *MobileAppsItemGraphIosLobAppContentVersionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosLobAppContentVersionsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to contentVersions for deviceAppManagement +func (m *MobileAppsItemGraphIosLobAppContentVersionsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, requestConfiguration *MobileAppsItemGraphIosLobAppContentVersionsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphIosLobAppContentVersionsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphIosLobAppContentVersionsRequestBuilder) { + return NewMobileAppsItemGraphIosLobAppContentVersionsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_relationships_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_relationships_count_request_builder.go new file mode 100644 index 00000000000..ecf82224eff --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_relationships_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphIosLobAppRelationshipsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphIosLobAppRelationshipsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphIosLobAppRelationshipsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphIosLobAppRelationshipsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphIosLobAppRelationshipsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosLobAppRelationshipsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphIosLobAppRelationshipsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphIosLobAppRelationshipsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosLobAppRelationshipsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosLobAppRelationshipsCountRequestBuilder) { + m := &MobileAppsItemGraphIosLobAppRelationshipsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/relationships/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphIosLobAppRelationshipsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosLobAppRelationshipsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosLobAppRelationshipsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphIosLobAppRelationshipsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphIosLobAppRelationshipsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosLobAppRelationshipsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphIosLobAppRelationshipsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosLobAppRelationshipsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphIosLobAppRelationshipsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphIosLobAppRelationshipsCountRequestBuilder) { + return NewMobileAppsItemGraphIosLobAppRelationshipsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_relationships_mobile_app_relationship_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_relationships_mobile_app_relationship_item_request_builder.go new file mode 100644 index 00000000000..3a02ede21ba --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_relationships_mobile_app_relationship_item_request_builder.go @@ -0,0 +1,159 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphIosLobAppRelationshipsMobileAppRelationshipItemRequestBuilder provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphIosLobAppRelationshipsMobileAppRelationshipItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphIosLobAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosLobAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphIosLobAppRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters list of relationships for this mobile app. +type MobileAppsItemGraphIosLobAppRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphIosLobAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosLobAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphIosLobAppRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphIosLobAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosLobAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphIosLobAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal instantiates a new MobileAppRelationshipItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosLobAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + m := &MobileAppsItemGraphIosLobAppRelationshipsMobileAppRelationshipItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/relationships/{mobileAppRelationship%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphIosLobAppRelationshipsMobileAppRelationshipItemRequestBuilder instantiates a new MobileAppRelationshipItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosLobAppRelationshipsMobileAppRelationshipItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphIosLobAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property relationships for deviceAppManagement +func (m *MobileAppsItemGraphIosLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosLobAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get list of relationships for this mobile app. +func (m *MobileAppsItemGraphIosLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosLobAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// Patch update the navigation property relationships in deviceAppManagement +func (m *MobileAppsItemGraphIosLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphIosLobAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// ToDeleteRequestInformation delete navigation property relationships for deviceAppManagement +func (m *MobileAppsItemGraphIosLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosLobAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation list of relationships for this mobile app. +func (m *MobileAppsItemGraphIosLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosLobAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property relationships in deviceAppManagement +func (m *MobileAppsItemGraphIosLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphIosLobAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphIosLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphIosLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + return NewMobileAppsItemGraphIosLobAppRelationshipsMobileAppRelationshipItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_relationships_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_relationships_request_builder.go new file mode 100644 index 00000000000..1ff6c554a37 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_relationships_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphIosLobAppRelationshipsRequestBuilder provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphIosLobAppRelationshipsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphIosLobAppRelationshipsRequestBuilderGetQueryParameters list of relationships for this mobile app. +type MobileAppsItemGraphIosLobAppRelationshipsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphIosLobAppRelationshipsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosLobAppRelationshipsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphIosLobAppRelationshipsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphIosLobAppRelationshipsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosLobAppRelationshipsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppRelationshipId provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphIosLobAppRelationshipsRequestBuilder) ByMobileAppRelationshipId(mobileAppRelationshipId string)(*MobileAppsItemGraphIosLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppRelationshipId != "" { + urlTplParams["mobileAppRelationship%2Did"] = mobileAppRelationshipId + } + return NewMobileAppsItemGraphIosLobAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphIosLobAppRelationshipsRequestBuilderInternal instantiates a new RelationshipsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosLobAppRelationshipsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosLobAppRelationshipsRequestBuilder) { + m := &MobileAppsItemGraphIosLobAppRelationshipsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/relationships{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphIosLobAppRelationshipsRequestBuilder instantiates a new RelationshipsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosLobAppRelationshipsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosLobAppRelationshipsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphIosLobAppRelationshipsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphIosLobAppRelationshipsRequestBuilder) Count()(*MobileAppsItemGraphIosLobAppRelationshipsCountRequestBuilder) { + return NewMobileAppsItemGraphIosLobAppRelationshipsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get list of relationships for this mobile app. +func (m *MobileAppsItemGraphIosLobAppRelationshipsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosLobAppRelationshipsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipCollectionResponseable), nil +} +// Post create new navigation property to relationships for deviceAppManagement +func (m *MobileAppsItemGraphIosLobAppRelationshipsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphIosLobAppRelationshipsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// ToGetRequestInformation list of relationships for this mobile app. +func (m *MobileAppsItemGraphIosLobAppRelationshipsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosLobAppRelationshipsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to relationships for deviceAppManagement +func (m *MobileAppsItemGraphIosLobAppRelationshipsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphIosLobAppRelationshipsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphIosLobAppRelationshipsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphIosLobAppRelationshipsRequestBuilder) { + return NewMobileAppsItemGraphIosLobAppRelationshipsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_request_builder.go index e6e87cf573c..b623147dc3b 100644 --- a/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_request_builder.go +++ b/deviceappmanagement/mobile_apps_item_graph_ios_lob_app_request_builder.go @@ -27,6 +27,14 @@ type MobileAppsItemGraphIosLobAppRequestBuilderGetRequestConfiguration struct { // Request query parameters QueryParameters *MobileAppsItemGraphIosLobAppRequestBuilderGetQueryParameters } +// Assignments provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphIosLobAppRequestBuilder) Assignments()(*MobileAppsItemGraphIosLobAppAssignmentsRequestBuilder) { + return NewMobileAppsItemGraphIosLobAppAssignmentsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Categories provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphIosLobAppRequestBuilder) Categories()(*MobileAppsItemGraphIosLobAppCategoriesRequestBuilder) { + return NewMobileAppsItemGraphIosLobAppCategoriesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // NewMobileAppsItemGraphIosLobAppRequestBuilderInternal instantiates a new GraphIosLobAppRequestBuilder and sets the default values. func NewMobileAppsItemGraphIosLobAppRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosLobAppRequestBuilder) { m := &MobileAppsItemGraphIosLobAppRequestBuilder{ @@ -40,6 +48,10 @@ func NewMobileAppsItemGraphIosLobAppRequestBuilder(rawUrl string, requestAdapter urlParams["request-raw-url"] = rawUrl return NewMobileAppsItemGraphIosLobAppRequestBuilderInternal(urlParams, requestAdapter) } +// ContentVersions provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. +func (m *MobileAppsItemGraphIosLobAppRequestBuilder) ContentVersions()(*MobileAppsItemGraphIosLobAppContentVersionsRequestBuilder) { + return NewMobileAppsItemGraphIosLobAppContentVersionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // Get get the item of type microsoft.graph.mobileApp as microsoft.graph.iosLobApp func (m *MobileAppsItemGraphIosLobAppRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosLobAppRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.IosLobAppable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); @@ -59,6 +71,10 @@ func (m *MobileAppsItemGraphIosLobAppRequestBuilder) Get(ctx context.Context, re } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.IosLobAppable), nil } +// Relationships provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphIosLobAppRequestBuilder) Relationships()(*MobileAppsItemGraphIosLobAppRelationshipsRequestBuilder) { + return NewMobileAppsItemGraphIosLobAppRelationshipsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation get the item of type microsoft.graph.mobileApp as microsoft.graph.iosLobApp func (m *MobileAppsItemGraphIosLobAppRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosLobAppRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/deviceappmanagement/mobile_apps_item_graph_ios_store_app_assignments_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_ios_store_app_assignments_count_request_builder.go new file mode 100644 index 00000000000..c24ba0871ab --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_ios_store_app_assignments_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphIosStoreAppAssignmentsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphIosStoreAppAssignmentsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphIosStoreAppAssignmentsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphIosStoreAppAssignmentsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphIosStoreAppAssignmentsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosStoreAppAssignmentsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphIosStoreAppAssignmentsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphIosStoreAppAssignmentsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosStoreAppAssignmentsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosStoreAppAssignmentsCountRequestBuilder) { + m := &MobileAppsItemGraphIosStoreAppAssignmentsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosStoreApp/assignments/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphIosStoreAppAssignmentsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosStoreAppAssignmentsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosStoreAppAssignmentsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphIosStoreAppAssignmentsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphIosStoreAppAssignmentsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosStoreAppAssignmentsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphIosStoreAppAssignmentsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosStoreAppAssignmentsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphIosStoreAppAssignmentsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphIosStoreAppAssignmentsCountRequestBuilder) { + return NewMobileAppsItemGraphIosStoreAppAssignmentsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_ios_store_app_assignments_mobile_app_assignment_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_ios_store_app_assignments_mobile_app_assignment_item_request_builder.go new file mode 100644 index 00000000000..69df3ead224 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_ios_store_app_assignments_mobile_app_assignment_item_request_builder.go @@ -0,0 +1,159 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphIosStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphIosStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphIosStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphIosStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters the list of group assignments for this mobile app. +type MobileAppsItemGraphIosStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphIosStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphIosStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphIosStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphIosStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + m := &MobileAppsItemGraphIosStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosStoreApp/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphIosStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphIosStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property assignments for deviceAppManagement +func (m *MobileAppsItemGraphIosStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphIosStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// Patch update the navigation property assignments in deviceAppManagement +func (m *MobileAppsItemGraphIosStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphIosStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// ToDeleteRequestInformation delete navigation property assignments for deviceAppManagement +func (m *MobileAppsItemGraphIosStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphIosStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property assignments in deviceAppManagement +func (m *MobileAppsItemGraphIosStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphIosStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphIosStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphIosStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + return NewMobileAppsItemGraphIosStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_ios_store_app_assignments_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_ios_store_app_assignments_request_builder.go new file mode 100644 index 00000000000..3d74bd35ad7 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_ios_store_app_assignments_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphIosStoreAppAssignmentsRequestBuilder provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphIosStoreAppAssignmentsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphIosStoreAppAssignmentsRequestBuilderGetQueryParameters the list of group assignments for this mobile app. +type MobileAppsItemGraphIosStoreAppAssignmentsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphIosStoreAppAssignmentsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosStoreAppAssignmentsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphIosStoreAppAssignmentsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphIosStoreAppAssignmentsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosStoreAppAssignmentsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppAssignmentId provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphIosStoreAppAssignmentsRequestBuilder) ByMobileAppAssignmentId(mobileAppAssignmentId string)(*MobileAppsItemGraphIosStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppAssignmentId != "" { + urlTplParams["mobileAppAssignment%2Did"] = mobileAppAssignmentId + } + return NewMobileAppsItemGraphIosStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphIosStoreAppAssignmentsRequestBuilderInternal instantiates a new AssignmentsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosStoreAppAssignmentsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosStoreAppAssignmentsRequestBuilder) { + m := &MobileAppsItemGraphIosStoreAppAssignmentsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosStoreApp/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphIosStoreAppAssignmentsRequestBuilder instantiates a new AssignmentsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosStoreAppAssignmentsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosStoreAppAssignmentsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphIosStoreAppAssignmentsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphIosStoreAppAssignmentsRequestBuilder) Count()(*MobileAppsItemGraphIosStoreAppAssignmentsCountRequestBuilder) { + return NewMobileAppsItemGraphIosStoreAppAssignmentsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphIosStoreAppAssignmentsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosStoreAppAssignmentsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentCollectionResponseable), nil +} +// Post create new navigation property to assignments for deviceAppManagement +func (m *MobileAppsItemGraphIosStoreAppAssignmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphIosStoreAppAssignmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// ToGetRequestInformation the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphIosStoreAppAssignmentsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosStoreAppAssignmentsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to assignments for deviceAppManagement +func (m *MobileAppsItemGraphIosStoreAppAssignmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphIosStoreAppAssignmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphIosStoreAppAssignmentsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphIosStoreAppAssignmentsRequestBuilder) { + return NewMobileAppsItemGraphIosStoreAppAssignmentsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_ios_store_app_categories_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_ios_store_app_categories_count_request_builder.go new file mode 100644 index 00000000000..619bc1ca2bf --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_ios_store_app_categories_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphIosStoreAppCategoriesCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphIosStoreAppCategoriesCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphIosStoreAppCategoriesCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphIosStoreAppCategoriesCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphIosStoreAppCategoriesCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosStoreAppCategoriesCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphIosStoreAppCategoriesCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphIosStoreAppCategoriesCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosStoreAppCategoriesCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosStoreAppCategoriesCountRequestBuilder) { + m := &MobileAppsItemGraphIosStoreAppCategoriesCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosStoreApp/categories/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphIosStoreAppCategoriesCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosStoreAppCategoriesCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosStoreAppCategoriesCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphIosStoreAppCategoriesCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphIosStoreAppCategoriesCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosStoreAppCategoriesCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphIosStoreAppCategoriesCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosStoreAppCategoriesCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphIosStoreAppCategoriesCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphIosStoreAppCategoriesCountRequestBuilder) { + return NewMobileAppsItemGraphIosStoreAppCategoriesCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_ios_store_app_categories_mobile_app_category_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_ios_store_app_categories_mobile_app_category_item_request_builder.go new file mode 100644 index 00000000000..fab8df4096e --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_ios_store_app_categories_mobile_app_category_item_request_builder.go @@ -0,0 +1,81 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphIosStoreAppCategoriesMobileAppCategoryItemRequestBuilder provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphIosStoreAppCategoriesMobileAppCategoryItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphIosStoreAppCategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters the list of categories for this app. +type MobileAppsItemGraphIosStoreAppCategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphIosStoreAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosStoreAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphIosStoreAppCategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphIosStoreAppCategoriesMobileAppCategoryItemRequestBuilderInternal instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosStoreAppCategoriesMobileAppCategoryItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosStoreAppCategoriesMobileAppCategoryItemRequestBuilder) { + m := &MobileAppsItemGraphIosStoreAppCategoriesMobileAppCategoryItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosStoreApp/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphIosStoreAppCategoriesMobileAppCategoryItemRequestBuilder instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosStoreAppCategoriesMobileAppCategoryItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosStoreAppCategoriesMobileAppCategoryItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphIosStoreAppCategoriesMobileAppCategoryItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get the list of categories for this app. +func (m *MobileAppsItemGraphIosStoreAppCategoriesMobileAppCategoryItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosStoreAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppCategoryFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryable), nil +} +// ToGetRequestInformation the list of categories for this app. +func (m *MobileAppsItemGraphIosStoreAppCategoriesMobileAppCategoryItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosStoreAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphIosStoreAppCategoriesMobileAppCategoryItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphIosStoreAppCategoriesMobileAppCategoryItemRequestBuilder) { + return NewMobileAppsItemGraphIosStoreAppCategoriesMobileAppCategoryItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_ios_store_app_categories_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_ios_store_app_categories_request_builder.go new file mode 100644 index 00000000000..8e327eb2644 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_ios_store_app_categories_request_builder.go @@ -0,0 +1,108 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphIosStoreAppCategoriesRequestBuilder provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphIosStoreAppCategoriesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphIosStoreAppCategoriesRequestBuilderGetQueryParameters the list of categories for this app. +type MobileAppsItemGraphIosStoreAppCategoriesRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphIosStoreAppCategoriesRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosStoreAppCategoriesRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphIosStoreAppCategoriesRequestBuilderGetQueryParameters +} +// ByMobileAppCategoryId provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphIosStoreAppCategoriesRequestBuilder) ByMobileAppCategoryId(mobileAppCategoryId string)(*MobileAppsItemGraphIosStoreAppCategoriesMobileAppCategoryItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppCategoryId != "" { + urlTplParams["mobileAppCategory%2Did"] = mobileAppCategoryId + } + return NewMobileAppsItemGraphIosStoreAppCategoriesMobileAppCategoryItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphIosStoreAppCategoriesRequestBuilderInternal instantiates a new CategoriesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosStoreAppCategoriesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosStoreAppCategoriesRequestBuilder) { + m := &MobileAppsItemGraphIosStoreAppCategoriesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosStoreApp/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphIosStoreAppCategoriesRequestBuilder instantiates a new CategoriesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosStoreAppCategoriesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosStoreAppCategoriesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphIosStoreAppCategoriesRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphIosStoreAppCategoriesRequestBuilder) Count()(*MobileAppsItemGraphIosStoreAppCategoriesCountRequestBuilder) { + return NewMobileAppsItemGraphIosStoreAppCategoriesCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of categories for this app. +func (m *MobileAppsItemGraphIosStoreAppCategoriesRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosStoreAppCategoriesRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppCategoryCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryCollectionResponseable), nil +} +// ToGetRequestInformation the list of categories for this app. +func (m *MobileAppsItemGraphIosStoreAppCategoriesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosStoreAppCategoriesRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphIosStoreAppCategoriesRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphIosStoreAppCategoriesRequestBuilder) { + return NewMobileAppsItemGraphIosStoreAppCategoriesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_ios_store_app_relationships_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_ios_store_app_relationships_count_request_builder.go new file mode 100644 index 00000000000..887e8a03de1 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_ios_store_app_relationships_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphIosStoreAppRelationshipsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphIosStoreAppRelationshipsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphIosStoreAppRelationshipsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphIosStoreAppRelationshipsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphIosStoreAppRelationshipsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosStoreAppRelationshipsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphIosStoreAppRelationshipsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphIosStoreAppRelationshipsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosStoreAppRelationshipsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosStoreAppRelationshipsCountRequestBuilder) { + m := &MobileAppsItemGraphIosStoreAppRelationshipsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosStoreApp/relationships/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphIosStoreAppRelationshipsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosStoreAppRelationshipsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosStoreAppRelationshipsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphIosStoreAppRelationshipsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphIosStoreAppRelationshipsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosStoreAppRelationshipsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphIosStoreAppRelationshipsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosStoreAppRelationshipsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphIosStoreAppRelationshipsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphIosStoreAppRelationshipsCountRequestBuilder) { + return NewMobileAppsItemGraphIosStoreAppRelationshipsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_ios_store_app_relationships_mobile_app_relationship_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_ios_store_app_relationships_mobile_app_relationship_item_request_builder.go new file mode 100644 index 00000000000..4786069cd1d --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_ios_store_app_relationships_mobile_app_relationship_item_request_builder.go @@ -0,0 +1,159 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphIosStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphIosStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphIosStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphIosStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters list of relationships for this mobile app. +type MobileAppsItemGraphIosStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphIosStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphIosStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphIosStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphIosStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal instantiates a new MobileAppRelationshipItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + m := &MobileAppsItemGraphIosStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosStoreApp/relationships/{mobileAppRelationship%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphIosStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder instantiates a new MobileAppRelationshipItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphIosStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property relationships for deviceAppManagement +func (m *MobileAppsItemGraphIosStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get list of relationships for this mobile app. +func (m *MobileAppsItemGraphIosStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// Patch update the navigation property relationships in deviceAppManagement +func (m *MobileAppsItemGraphIosStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphIosStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// ToDeleteRequestInformation delete navigation property relationships for deviceAppManagement +func (m *MobileAppsItemGraphIosStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation list of relationships for this mobile app. +func (m *MobileAppsItemGraphIosStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property relationships in deviceAppManagement +func (m *MobileAppsItemGraphIosStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphIosStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphIosStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphIosStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + return NewMobileAppsItemGraphIosStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_ios_store_app_relationships_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_ios_store_app_relationships_request_builder.go new file mode 100644 index 00000000000..a01badd0cfe --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_ios_store_app_relationships_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphIosStoreAppRelationshipsRequestBuilder provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphIosStoreAppRelationshipsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphIosStoreAppRelationshipsRequestBuilderGetQueryParameters list of relationships for this mobile app. +type MobileAppsItemGraphIosStoreAppRelationshipsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphIosStoreAppRelationshipsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosStoreAppRelationshipsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphIosStoreAppRelationshipsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphIosStoreAppRelationshipsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosStoreAppRelationshipsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppRelationshipId provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphIosStoreAppRelationshipsRequestBuilder) ByMobileAppRelationshipId(mobileAppRelationshipId string)(*MobileAppsItemGraphIosStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppRelationshipId != "" { + urlTplParams["mobileAppRelationship%2Did"] = mobileAppRelationshipId + } + return NewMobileAppsItemGraphIosStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphIosStoreAppRelationshipsRequestBuilderInternal instantiates a new RelationshipsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosStoreAppRelationshipsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosStoreAppRelationshipsRequestBuilder) { + m := &MobileAppsItemGraphIosStoreAppRelationshipsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosStoreApp/relationships{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphIosStoreAppRelationshipsRequestBuilder instantiates a new RelationshipsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosStoreAppRelationshipsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosStoreAppRelationshipsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphIosStoreAppRelationshipsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphIosStoreAppRelationshipsRequestBuilder) Count()(*MobileAppsItemGraphIosStoreAppRelationshipsCountRequestBuilder) { + return NewMobileAppsItemGraphIosStoreAppRelationshipsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get list of relationships for this mobile app. +func (m *MobileAppsItemGraphIosStoreAppRelationshipsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosStoreAppRelationshipsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipCollectionResponseable), nil +} +// Post create new navigation property to relationships for deviceAppManagement +func (m *MobileAppsItemGraphIosStoreAppRelationshipsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphIosStoreAppRelationshipsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// ToGetRequestInformation list of relationships for this mobile app. +func (m *MobileAppsItemGraphIosStoreAppRelationshipsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosStoreAppRelationshipsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to relationships for deviceAppManagement +func (m *MobileAppsItemGraphIosStoreAppRelationshipsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphIosStoreAppRelationshipsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphIosStoreAppRelationshipsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphIosStoreAppRelationshipsRequestBuilder) { + return NewMobileAppsItemGraphIosStoreAppRelationshipsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_ios_store_app_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_ios_store_app_request_builder.go index e3ad29abb92..0cfbca296bb 100644 --- a/deviceappmanagement/mobile_apps_item_graph_ios_store_app_request_builder.go +++ b/deviceappmanagement/mobile_apps_item_graph_ios_store_app_request_builder.go @@ -27,6 +27,14 @@ type MobileAppsItemGraphIosStoreAppRequestBuilderGetRequestConfiguration struct // Request query parameters QueryParameters *MobileAppsItemGraphIosStoreAppRequestBuilderGetQueryParameters } +// Assignments provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphIosStoreAppRequestBuilder) Assignments()(*MobileAppsItemGraphIosStoreAppAssignmentsRequestBuilder) { + return NewMobileAppsItemGraphIosStoreAppAssignmentsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Categories provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphIosStoreAppRequestBuilder) Categories()(*MobileAppsItemGraphIosStoreAppCategoriesRequestBuilder) { + return NewMobileAppsItemGraphIosStoreAppCategoriesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // NewMobileAppsItemGraphIosStoreAppRequestBuilderInternal instantiates a new GraphIosStoreAppRequestBuilder and sets the default values. func NewMobileAppsItemGraphIosStoreAppRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosStoreAppRequestBuilder) { m := &MobileAppsItemGraphIosStoreAppRequestBuilder{ @@ -59,6 +67,10 @@ func (m *MobileAppsItemGraphIosStoreAppRequestBuilder) Get(ctx context.Context, } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.IosStoreAppable), nil } +// Relationships provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphIosStoreAppRequestBuilder) Relationships()(*MobileAppsItemGraphIosStoreAppRelationshipsRequestBuilder) { + return NewMobileAppsItemGraphIosStoreAppRelationshipsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation get the item of type microsoft.graph.mobileApp as microsoft.graph.iosStoreApp func (m *MobileAppsItemGraphIosStoreAppRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosStoreAppRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/deviceappmanagement/mobile_apps_item_graph_ios_vpp_app_assigned_licenses_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_ios_vpp_app_assigned_licenses_count_request_builder.go new file mode 100644 index 00000000000..1c9abebbfa7 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_ios_vpp_app_assigned_licenses_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphIosVppAppAssignedLicensesCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphIosVppAppAssignedLicensesCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphIosVppAppAssignedLicensesCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphIosVppAppAssignedLicensesCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphIosVppAppAssignedLicensesCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosVppAppAssignedLicensesCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphIosVppAppAssignedLicensesCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphIosVppAppAssignedLicensesCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosVppAppAssignedLicensesCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosVppAppAssignedLicensesCountRequestBuilder) { + m := &MobileAppsItemGraphIosVppAppAssignedLicensesCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosVppApp/assignedLicenses/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphIosVppAppAssignedLicensesCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosVppAppAssignedLicensesCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosVppAppAssignedLicensesCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphIosVppAppAssignedLicensesCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphIosVppAppAssignedLicensesCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosVppAppAssignedLicensesCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphIosVppAppAssignedLicensesCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosVppAppAssignedLicensesCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphIosVppAppAssignedLicensesCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphIosVppAppAssignedLicensesCountRequestBuilder) { + return NewMobileAppsItemGraphIosVppAppAssignedLicensesCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_ios_vpp_app_assigned_licenses_ios_vpp_app_assigned_license_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_ios_vpp_app_assigned_licenses_ios_vpp_app_assigned_license_item_request_builder.go new file mode 100644 index 00000000000..2e95136b387 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_ios_vpp_app_assigned_licenses_ios_vpp_app_assigned_license_item_request_builder.go @@ -0,0 +1,159 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphIosVppAppAssignedLicensesIosVppAppAssignedLicenseItemRequestBuilder provides operations to manage the assignedLicenses property of the microsoft.graph.iosVppApp entity. +type MobileAppsItemGraphIosVppAppAssignedLicensesIosVppAppAssignedLicenseItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphIosVppAppAssignedLicensesIosVppAppAssignedLicenseItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosVppAppAssignedLicensesIosVppAppAssignedLicenseItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphIosVppAppAssignedLicensesIosVppAppAssignedLicenseItemRequestBuilderGetQueryParameters the licenses assigned to this app. +type MobileAppsItemGraphIosVppAppAssignedLicensesIosVppAppAssignedLicenseItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphIosVppAppAssignedLicensesIosVppAppAssignedLicenseItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosVppAppAssignedLicensesIosVppAppAssignedLicenseItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphIosVppAppAssignedLicensesIosVppAppAssignedLicenseItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphIosVppAppAssignedLicensesIosVppAppAssignedLicenseItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosVppAppAssignedLicensesIosVppAppAssignedLicenseItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphIosVppAppAssignedLicensesIosVppAppAssignedLicenseItemRequestBuilderInternal instantiates a new IosVppAppAssignedLicenseItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosVppAppAssignedLicensesIosVppAppAssignedLicenseItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosVppAppAssignedLicensesIosVppAppAssignedLicenseItemRequestBuilder) { + m := &MobileAppsItemGraphIosVppAppAssignedLicensesIosVppAppAssignedLicenseItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosVppApp/assignedLicenses/{iosVppAppAssignedLicense%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphIosVppAppAssignedLicensesIosVppAppAssignedLicenseItemRequestBuilder instantiates a new IosVppAppAssignedLicenseItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosVppAppAssignedLicensesIosVppAppAssignedLicenseItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosVppAppAssignedLicensesIosVppAppAssignedLicenseItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphIosVppAppAssignedLicensesIosVppAppAssignedLicenseItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property assignedLicenses for deviceAppManagement +func (m *MobileAppsItemGraphIosVppAppAssignedLicensesIosVppAppAssignedLicenseItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosVppAppAssignedLicensesIosVppAppAssignedLicenseItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get the licenses assigned to this app. +func (m *MobileAppsItemGraphIosVppAppAssignedLicensesIosVppAppAssignedLicenseItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosVppAppAssignedLicensesIosVppAppAssignedLicenseItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.IosVppAppAssignedLicenseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateIosVppAppAssignedLicenseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.IosVppAppAssignedLicenseable), nil +} +// Patch update the navigation property assignedLicenses in deviceAppManagement +func (m *MobileAppsItemGraphIosVppAppAssignedLicensesIosVppAppAssignedLicenseItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.IosVppAppAssignedLicenseable, requestConfiguration *MobileAppsItemGraphIosVppAppAssignedLicensesIosVppAppAssignedLicenseItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.IosVppAppAssignedLicenseable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateIosVppAppAssignedLicenseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.IosVppAppAssignedLicenseable), nil +} +// ToDeleteRequestInformation delete navigation property assignedLicenses for deviceAppManagement +func (m *MobileAppsItemGraphIosVppAppAssignedLicensesIosVppAppAssignedLicenseItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosVppAppAssignedLicensesIosVppAppAssignedLicenseItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation the licenses assigned to this app. +func (m *MobileAppsItemGraphIosVppAppAssignedLicensesIosVppAppAssignedLicenseItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosVppAppAssignedLicensesIosVppAppAssignedLicenseItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property assignedLicenses in deviceAppManagement +func (m *MobileAppsItemGraphIosVppAppAssignedLicensesIosVppAppAssignedLicenseItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.IosVppAppAssignedLicenseable, requestConfiguration *MobileAppsItemGraphIosVppAppAssignedLicensesIosVppAppAssignedLicenseItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphIosVppAppAssignedLicensesIosVppAppAssignedLicenseItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphIosVppAppAssignedLicensesIosVppAppAssignedLicenseItemRequestBuilder) { + return NewMobileAppsItemGraphIosVppAppAssignedLicensesIosVppAppAssignedLicenseItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_ios_vpp_app_assigned_licenses_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_ios_vpp_app_assigned_licenses_request_builder.go new file mode 100644 index 00000000000..939097bd486 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_ios_vpp_app_assigned_licenses_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphIosVppAppAssignedLicensesRequestBuilder provides operations to manage the assignedLicenses property of the microsoft.graph.iosVppApp entity. +type MobileAppsItemGraphIosVppAppAssignedLicensesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphIosVppAppAssignedLicensesRequestBuilderGetQueryParameters the licenses assigned to this app. +type MobileAppsItemGraphIosVppAppAssignedLicensesRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphIosVppAppAssignedLicensesRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosVppAppAssignedLicensesRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphIosVppAppAssignedLicensesRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphIosVppAppAssignedLicensesRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosVppAppAssignedLicensesRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByIosVppAppAssignedLicenseId provides operations to manage the assignedLicenses property of the microsoft.graph.iosVppApp entity. +func (m *MobileAppsItemGraphIosVppAppAssignedLicensesRequestBuilder) ByIosVppAppAssignedLicenseId(iosVppAppAssignedLicenseId string)(*MobileAppsItemGraphIosVppAppAssignedLicensesIosVppAppAssignedLicenseItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if iosVppAppAssignedLicenseId != "" { + urlTplParams["iosVppAppAssignedLicense%2Did"] = iosVppAppAssignedLicenseId + } + return NewMobileAppsItemGraphIosVppAppAssignedLicensesIosVppAppAssignedLicenseItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphIosVppAppAssignedLicensesRequestBuilderInternal instantiates a new AssignedLicensesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosVppAppAssignedLicensesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosVppAppAssignedLicensesRequestBuilder) { + m := &MobileAppsItemGraphIosVppAppAssignedLicensesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosVppApp/assignedLicenses{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphIosVppAppAssignedLicensesRequestBuilder instantiates a new AssignedLicensesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosVppAppAssignedLicensesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosVppAppAssignedLicensesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphIosVppAppAssignedLicensesRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphIosVppAppAssignedLicensesRequestBuilder) Count()(*MobileAppsItemGraphIosVppAppAssignedLicensesCountRequestBuilder) { + return NewMobileAppsItemGraphIosVppAppAssignedLicensesCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the licenses assigned to this app. +func (m *MobileAppsItemGraphIosVppAppAssignedLicensesRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosVppAppAssignedLicensesRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.IosVppAppAssignedLicenseCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateIosVppAppAssignedLicenseCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.IosVppAppAssignedLicenseCollectionResponseable), nil +} +// Post create new navigation property to assignedLicenses for deviceAppManagement +func (m *MobileAppsItemGraphIosVppAppAssignedLicensesRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.IosVppAppAssignedLicenseable, requestConfiguration *MobileAppsItemGraphIosVppAppAssignedLicensesRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.IosVppAppAssignedLicenseable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateIosVppAppAssignedLicenseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.IosVppAppAssignedLicenseable), nil +} +// ToGetRequestInformation the licenses assigned to this app. +func (m *MobileAppsItemGraphIosVppAppAssignedLicensesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosVppAppAssignedLicensesRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to assignedLicenses for deviceAppManagement +func (m *MobileAppsItemGraphIosVppAppAssignedLicensesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.IosVppAppAssignedLicenseable, requestConfiguration *MobileAppsItemGraphIosVppAppAssignedLicensesRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphIosVppAppAssignedLicensesRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphIosVppAppAssignedLicensesRequestBuilder) { + return NewMobileAppsItemGraphIosVppAppAssignedLicensesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_ios_vpp_app_assignments_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_ios_vpp_app_assignments_count_request_builder.go new file mode 100644 index 00000000000..9fbaa23d670 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_ios_vpp_app_assignments_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphIosVppAppAssignmentsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphIosVppAppAssignmentsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphIosVppAppAssignmentsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphIosVppAppAssignmentsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphIosVppAppAssignmentsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosVppAppAssignmentsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphIosVppAppAssignmentsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphIosVppAppAssignmentsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosVppAppAssignmentsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosVppAppAssignmentsCountRequestBuilder) { + m := &MobileAppsItemGraphIosVppAppAssignmentsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosVppApp/assignments/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphIosVppAppAssignmentsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosVppAppAssignmentsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosVppAppAssignmentsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphIosVppAppAssignmentsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphIosVppAppAssignmentsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosVppAppAssignmentsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphIosVppAppAssignmentsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosVppAppAssignmentsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphIosVppAppAssignmentsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphIosVppAppAssignmentsCountRequestBuilder) { + return NewMobileAppsItemGraphIosVppAppAssignmentsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_ios_vpp_app_assignments_mobile_app_assignment_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_ios_vpp_app_assignments_mobile_app_assignment_item_request_builder.go new file mode 100644 index 00000000000..42551228f19 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_ios_vpp_app_assignments_mobile_app_assignment_item_request_builder.go @@ -0,0 +1,159 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphIosVppAppAssignmentsMobileAppAssignmentItemRequestBuilder provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphIosVppAppAssignmentsMobileAppAssignmentItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphIosVppAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosVppAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphIosVppAppAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters the list of group assignments for this mobile app. +type MobileAppsItemGraphIosVppAppAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphIosVppAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosVppAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphIosVppAppAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphIosVppAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosVppAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphIosVppAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosVppAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosVppAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + m := &MobileAppsItemGraphIosVppAppAssignmentsMobileAppAssignmentItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosVppApp/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphIosVppAppAssignmentsMobileAppAssignmentItemRequestBuilder instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosVppAppAssignmentsMobileAppAssignmentItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosVppAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphIosVppAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property assignments for deviceAppManagement +func (m *MobileAppsItemGraphIosVppAppAssignmentsMobileAppAssignmentItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosVppAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphIosVppAppAssignmentsMobileAppAssignmentItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosVppAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// Patch update the navigation property assignments in deviceAppManagement +func (m *MobileAppsItemGraphIosVppAppAssignmentsMobileAppAssignmentItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphIosVppAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// ToDeleteRequestInformation delete navigation property assignments for deviceAppManagement +func (m *MobileAppsItemGraphIosVppAppAssignmentsMobileAppAssignmentItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosVppAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphIosVppAppAssignmentsMobileAppAssignmentItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosVppAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property assignments in deviceAppManagement +func (m *MobileAppsItemGraphIosVppAppAssignmentsMobileAppAssignmentItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphIosVppAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphIosVppAppAssignmentsMobileAppAssignmentItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphIosVppAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + return NewMobileAppsItemGraphIosVppAppAssignmentsMobileAppAssignmentItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_ios_vpp_app_assignments_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_ios_vpp_app_assignments_request_builder.go new file mode 100644 index 00000000000..66f539c34cb --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_ios_vpp_app_assignments_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphIosVppAppAssignmentsRequestBuilder provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphIosVppAppAssignmentsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphIosVppAppAssignmentsRequestBuilderGetQueryParameters the list of group assignments for this mobile app. +type MobileAppsItemGraphIosVppAppAssignmentsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphIosVppAppAssignmentsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosVppAppAssignmentsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphIosVppAppAssignmentsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphIosVppAppAssignmentsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosVppAppAssignmentsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppAssignmentId provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphIosVppAppAssignmentsRequestBuilder) ByMobileAppAssignmentId(mobileAppAssignmentId string)(*MobileAppsItemGraphIosVppAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppAssignmentId != "" { + urlTplParams["mobileAppAssignment%2Did"] = mobileAppAssignmentId + } + return NewMobileAppsItemGraphIosVppAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphIosVppAppAssignmentsRequestBuilderInternal instantiates a new AssignmentsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosVppAppAssignmentsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosVppAppAssignmentsRequestBuilder) { + m := &MobileAppsItemGraphIosVppAppAssignmentsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosVppApp/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphIosVppAppAssignmentsRequestBuilder instantiates a new AssignmentsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosVppAppAssignmentsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosVppAppAssignmentsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphIosVppAppAssignmentsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphIosVppAppAssignmentsRequestBuilder) Count()(*MobileAppsItemGraphIosVppAppAssignmentsCountRequestBuilder) { + return NewMobileAppsItemGraphIosVppAppAssignmentsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphIosVppAppAssignmentsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosVppAppAssignmentsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentCollectionResponseable), nil +} +// Post create new navigation property to assignments for deviceAppManagement +func (m *MobileAppsItemGraphIosVppAppAssignmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphIosVppAppAssignmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// ToGetRequestInformation the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphIosVppAppAssignmentsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosVppAppAssignmentsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to assignments for deviceAppManagement +func (m *MobileAppsItemGraphIosVppAppAssignmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphIosVppAppAssignmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphIosVppAppAssignmentsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphIosVppAppAssignmentsRequestBuilder) { + return NewMobileAppsItemGraphIosVppAppAssignmentsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_ios_vpp_app_categories_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_ios_vpp_app_categories_count_request_builder.go new file mode 100644 index 00000000000..353fc35841f --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_ios_vpp_app_categories_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphIosVppAppCategoriesCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphIosVppAppCategoriesCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphIosVppAppCategoriesCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphIosVppAppCategoriesCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphIosVppAppCategoriesCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosVppAppCategoriesCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphIosVppAppCategoriesCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphIosVppAppCategoriesCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosVppAppCategoriesCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosVppAppCategoriesCountRequestBuilder) { + m := &MobileAppsItemGraphIosVppAppCategoriesCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosVppApp/categories/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphIosVppAppCategoriesCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosVppAppCategoriesCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosVppAppCategoriesCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphIosVppAppCategoriesCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphIosVppAppCategoriesCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosVppAppCategoriesCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphIosVppAppCategoriesCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosVppAppCategoriesCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphIosVppAppCategoriesCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphIosVppAppCategoriesCountRequestBuilder) { + return NewMobileAppsItemGraphIosVppAppCategoriesCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_ios_vpp_app_categories_mobile_app_category_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_ios_vpp_app_categories_mobile_app_category_item_request_builder.go new file mode 100644 index 00000000000..6f4c07d1f3b --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_ios_vpp_app_categories_mobile_app_category_item_request_builder.go @@ -0,0 +1,81 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphIosVppAppCategoriesMobileAppCategoryItemRequestBuilder provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphIosVppAppCategoriesMobileAppCategoryItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphIosVppAppCategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters the list of categories for this app. +type MobileAppsItemGraphIosVppAppCategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphIosVppAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosVppAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphIosVppAppCategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphIosVppAppCategoriesMobileAppCategoryItemRequestBuilderInternal instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosVppAppCategoriesMobileAppCategoryItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosVppAppCategoriesMobileAppCategoryItemRequestBuilder) { + m := &MobileAppsItemGraphIosVppAppCategoriesMobileAppCategoryItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosVppApp/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphIosVppAppCategoriesMobileAppCategoryItemRequestBuilder instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosVppAppCategoriesMobileAppCategoryItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosVppAppCategoriesMobileAppCategoryItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphIosVppAppCategoriesMobileAppCategoryItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get the list of categories for this app. +func (m *MobileAppsItemGraphIosVppAppCategoriesMobileAppCategoryItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosVppAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppCategoryFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryable), nil +} +// ToGetRequestInformation the list of categories for this app. +func (m *MobileAppsItemGraphIosVppAppCategoriesMobileAppCategoryItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosVppAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphIosVppAppCategoriesMobileAppCategoryItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphIosVppAppCategoriesMobileAppCategoryItemRequestBuilder) { + return NewMobileAppsItemGraphIosVppAppCategoriesMobileAppCategoryItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_ios_vpp_app_categories_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_ios_vpp_app_categories_request_builder.go new file mode 100644 index 00000000000..5296a261f7c --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_ios_vpp_app_categories_request_builder.go @@ -0,0 +1,108 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphIosVppAppCategoriesRequestBuilder provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphIosVppAppCategoriesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphIosVppAppCategoriesRequestBuilderGetQueryParameters the list of categories for this app. +type MobileAppsItemGraphIosVppAppCategoriesRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphIosVppAppCategoriesRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosVppAppCategoriesRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphIosVppAppCategoriesRequestBuilderGetQueryParameters +} +// ByMobileAppCategoryId provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphIosVppAppCategoriesRequestBuilder) ByMobileAppCategoryId(mobileAppCategoryId string)(*MobileAppsItemGraphIosVppAppCategoriesMobileAppCategoryItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppCategoryId != "" { + urlTplParams["mobileAppCategory%2Did"] = mobileAppCategoryId + } + return NewMobileAppsItemGraphIosVppAppCategoriesMobileAppCategoryItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphIosVppAppCategoriesRequestBuilderInternal instantiates a new CategoriesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosVppAppCategoriesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosVppAppCategoriesRequestBuilder) { + m := &MobileAppsItemGraphIosVppAppCategoriesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosVppApp/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphIosVppAppCategoriesRequestBuilder instantiates a new CategoriesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosVppAppCategoriesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosVppAppCategoriesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphIosVppAppCategoriesRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphIosVppAppCategoriesRequestBuilder) Count()(*MobileAppsItemGraphIosVppAppCategoriesCountRequestBuilder) { + return NewMobileAppsItemGraphIosVppAppCategoriesCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of categories for this app. +func (m *MobileAppsItemGraphIosVppAppCategoriesRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosVppAppCategoriesRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppCategoryCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryCollectionResponseable), nil +} +// ToGetRequestInformation the list of categories for this app. +func (m *MobileAppsItemGraphIosVppAppCategoriesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosVppAppCategoriesRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphIosVppAppCategoriesRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphIosVppAppCategoriesRequestBuilder) { + return NewMobileAppsItemGraphIosVppAppCategoriesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_ios_vpp_app_relationships_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_ios_vpp_app_relationships_count_request_builder.go new file mode 100644 index 00000000000..97a048e95a6 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_ios_vpp_app_relationships_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphIosVppAppRelationshipsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphIosVppAppRelationshipsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphIosVppAppRelationshipsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphIosVppAppRelationshipsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphIosVppAppRelationshipsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosVppAppRelationshipsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphIosVppAppRelationshipsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphIosVppAppRelationshipsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosVppAppRelationshipsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosVppAppRelationshipsCountRequestBuilder) { + m := &MobileAppsItemGraphIosVppAppRelationshipsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosVppApp/relationships/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphIosVppAppRelationshipsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosVppAppRelationshipsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosVppAppRelationshipsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphIosVppAppRelationshipsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphIosVppAppRelationshipsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosVppAppRelationshipsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphIosVppAppRelationshipsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosVppAppRelationshipsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphIosVppAppRelationshipsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphIosVppAppRelationshipsCountRequestBuilder) { + return NewMobileAppsItemGraphIosVppAppRelationshipsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_ios_vpp_app_relationships_mobile_app_relationship_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_ios_vpp_app_relationships_mobile_app_relationship_item_request_builder.go new file mode 100644 index 00000000000..52d3a241b03 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_ios_vpp_app_relationships_mobile_app_relationship_item_request_builder.go @@ -0,0 +1,159 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphIosVppAppRelationshipsMobileAppRelationshipItemRequestBuilder provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphIosVppAppRelationshipsMobileAppRelationshipItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphIosVppAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosVppAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphIosVppAppRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters list of relationships for this mobile app. +type MobileAppsItemGraphIosVppAppRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphIosVppAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosVppAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphIosVppAppRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphIosVppAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosVppAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphIosVppAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal instantiates a new MobileAppRelationshipItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosVppAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosVppAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + m := &MobileAppsItemGraphIosVppAppRelationshipsMobileAppRelationshipItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosVppApp/relationships/{mobileAppRelationship%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphIosVppAppRelationshipsMobileAppRelationshipItemRequestBuilder instantiates a new MobileAppRelationshipItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosVppAppRelationshipsMobileAppRelationshipItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosVppAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphIosVppAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property relationships for deviceAppManagement +func (m *MobileAppsItemGraphIosVppAppRelationshipsMobileAppRelationshipItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosVppAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get list of relationships for this mobile app. +func (m *MobileAppsItemGraphIosVppAppRelationshipsMobileAppRelationshipItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosVppAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// Patch update the navigation property relationships in deviceAppManagement +func (m *MobileAppsItemGraphIosVppAppRelationshipsMobileAppRelationshipItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphIosVppAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// ToDeleteRequestInformation delete navigation property relationships for deviceAppManagement +func (m *MobileAppsItemGraphIosVppAppRelationshipsMobileAppRelationshipItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosVppAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation list of relationships for this mobile app. +func (m *MobileAppsItemGraphIosVppAppRelationshipsMobileAppRelationshipItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosVppAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property relationships in deviceAppManagement +func (m *MobileAppsItemGraphIosVppAppRelationshipsMobileAppRelationshipItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphIosVppAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphIosVppAppRelationshipsMobileAppRelationshipItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphIosVppAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + return NewMobileAppsItemGraphIosVppAppRelationshipsMobileAppRelationshipItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_ios_vpp_app_relationships_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_ios_vpp_app_relationships_request_builder.go new file mode 100644 index 00000000000..51742fb6a55 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_ios_vpp_app_relationships_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphIosVppAppRelationshipsRequestBuilder provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphIosVppAppRelationshipsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphIosVppAppRelationshipsRequestBuilderGetQueryParameters list of relationships for this mobile app. +type MobileAppsItemGraphIosVppAppRelationshipsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphIosVppAppRelationshipsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosVppAppRelationshipsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphIosVppAppRelationshipsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphIosVppAppRelationshipsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphIosVppAppRelationshipsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppRelationshipId provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphIosVppAppRelationshipsRequestBuilder) ByMobileAppRelationshipId(mobileAppRelationshipId string)(*MobileAppsItemGraphIosVppAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppRelationshipId != "" { + urlTplParams["mobileAppRelationship%2Did"] = mobileAppRelationshipId + } + return NewMobileAppsItemGraphIosVppAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphIosVppAppRelationshipsRequestBuilderInternal instantiates a new RelationshipsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosVppAppRelationshipsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosVppAppRelationshipsRequestBuilder) { + m := &MobileAppsItemGraphIosVppAppRelationshipsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosVppApp/relationships{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphIosVppAppRelationshipsRequestBuilder instantiates a new RelationshipsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphIosVppAppRelationshipsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosVppAppRelationshipsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphIosVppAppRelationshipsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphIosVppAppRelationshipsRequestBuilder) Count()(*MobileAppsItemGraphIosVppAppRelationshipsCountRequestBuilder) { + return NewMobileAppsItemGraphIosVppAppRelationshipsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get list of relationships for this mobile app. +func (m *MobileAppsItemGraphIosVppAppRelationshipsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosVppAppRelationshipsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipCollectionResponseable), nil +} +// Post create new navigation property to relationships for deviceAppManagement +func (m *MobileAppsItemGraphIosVppAppRelationshipsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphIosVppAppRelationshipsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// ToGetRequestInformation list of relationships for this mobile app. +func (m *MobileAppsItemGraphIosVppAppRelationshipsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosVppAppRelationshipsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to relationships for deviceAppManagement +func (m *MobileAppsItemGraphIosVppAppRelationshipsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphIosVppAppRelationshipsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphIosVppAppRelationshipsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphIosVppAppRelationshipsRequestBuilder) { + return NewMobileAppsItemGraphIosVppAppRelationshipsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_ios_vpp_app_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_ios_vpp_app_request_builder.go index fd511666f4c..d2a4d86be39 100644 --- a/deviceappmanagement/mobile_apps_item_graph_ios_vpp_app_request_builder.go +++ b/deviceappmanagement/mobile_apps_item_graph_ios_vpp_app_request_builder.go @@ -27,6 +27,18 @@ type MobileAppsItemGraphIosVppAppRequestBuilderGetRequestConfiguration struct { // Request query parameters QueryParameters *MobileAppsItemGraphIosVppAppRequestBuilderGetQueryParameters } +// AssignedLicenses provides operations to manage the assignedLicenses property of the microsoft.graph.iosVppApp entity. +func (m *MobileAppsItemGraphIosVppAppRequestBuilder) AssignedLicenses()(*MobileAppsItemGraphIosVppAppAssignedLicensesRequestBuilder) { + return NewMobileAppsItemGraphIosVppAppAssignedLicensesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Assignments provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphIosVppAppRequestBuilder) Assignments()(*MobileAppsItemGraphIosVppAppAssignmentsRequestBuilder) { + return NewMobileAppsItemGraphIosVppAppAssignmentsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Categories provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphIosVppAppRequestBuilder) Categories()(*MobileAppsItemGraphIosVppAppCategoriesRequestBuilder) { + return NewMobileAppsItemGraphIosVppAppCategoriesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // NewMobileAppsItemGraphIosVppAppRequestBuilderInternal instantiates a new GraphIosVppAppRequestBuilder and sets the default values. func NewMobileAppsItemGraphIosVppAppRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphIosVppAppRequestBuilder) { m := &MobileAppsItemGraphIosVppAppRequestBuilder{ @@ -59,6 +71,10 @@ func (m *MobileAppsItemGraphIosVppAppRequestBuilder) Get(ctx context.Context, re } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.IosVppAppable), nil } +// Relationships provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphIosVppAppRequestBuilder) Relationships()(*MobileAppsItemGraphIosVppAppRelationshipsRequestBuilder) { + return NewMobileAppsItemGraphIosVppAppRelationshipsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation get the item of type microsoft.graph.mobileApp as microsoft.graph.iosVppApp func (m *MobileAppsItemGraphIosVppAppRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphIosVppAppRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_assignments_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_assignments_count_request_builder.go new file mode 100644 index 00000000000..c9eb47fc572 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_assignments_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMacOSDmgAppAssignmentsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphMacOSDmgAppAssignmentsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMacOSDmgAppAssignmentsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphMacOSDmgAppAssignmentsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphMacOSDmgAppAssignmentsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSDmgAppAssignmentsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMacOSDmgAppAssignmentsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphMacOSDmgAppAssignmentsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSDmgAppAssignmentsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSDmgAppAssignmentsCountRequestBuilder) { + m := &MobileAppsItemGraphMacOSDmgAppAssignmentsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/assignments/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMacOSDmgAppAssignmentsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSDmgAppAssignmentsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSDmgAppAssignmentsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMacOSDmgAppAssignmentsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphMacOSDmgAppAssignmentsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSDmgAppAssignmentsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphMacOSDmgAppAssignmentsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSDmgAppAssignmentsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMacOSDmgAppAssignmentsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMacOSDmgAppAssignmentsCountRequestBuilder) { + return NewMobileAppsItemGraphMacOSDmgAppAssignmentsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_assignments_mobile_app_assignment_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_assignments_mobile_app_assignment_item_request_builder.go new file mode 100644 index 00000000000..36279309a8d --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_assignments_mobile_app_assignment_item_request_builder.go @@ -0,0 +1,159 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMacOSDmgAppAssignmentsMobileAppAssignmentItemRequestBuilder provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphMacOSDmgAppAssignmentsMobileAppAssignmentItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMacOSDmgAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSDmgAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphMacOSDmgAppAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters the list of group assignments for this mobile app. +type MobileAppsItemGraphMacOSDmgAppAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphMacOSDmgAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSDmgAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMacOSDmgAppAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphMacOSDmgAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSDmgAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphMacOSDmgAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSDmgAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSDmgAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + m := &MobileAppsItemGraphMacOSDmgAppAssignmentsMobileAppAssignmentItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMacOSDmgAppAssignmentsMobileAppAssignmentItemRequestBuilder instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSDmgAppAssignmentsMobileAppAssignmentItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSDmgAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMacOSDmgAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property assignments for deviceAppManagement +func (m *MobileAppsItemGraphMacOSDmgAppAssignmentsMobileAppAssignmentItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSDmgAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphMacOSDmgAppAssignmentsMobileAppAssignmentItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSDmgAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// Patch update the navigation property assignments in deviceAppManagement +func (m *MobileAppsItemGraphMacOSDmgAppAssignmentsMobileAppAssignmentItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphMacOSDmgAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// ToDeleteRequestInformation delete navigation property assignments for deviceAppManagement +func (m *MobileAppsItemGraphMacOSDmgAppAssignmentsMobileAppAssignmentItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSDmgAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphMacOSDmgAppAssignmentsMobileAppAssignmentItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSDmgAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property assignments in deviceAppManagement +func (m *MobileAppsItemGraphMacOSDmgAppAssignmentsMobileAppAssignmentItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphMacOSDmgAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMacOSDmgAppAssignmentsMobileAppAssignmentItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMacOSDmgAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + return NewMobileAppsItemGraphMacOSDmgAppAssignmentsMobileAppAssignmentItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_assignments_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_assignments_request_builder.go new file mode 100644 index 00000000000..f433f0e9fee --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_assignments_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMacOSDmgAppAssignmentsRequestBuilder provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphMacOSDmgAppAssignmentsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMacOSDmgAppAssignmentsRequestBuilderGetQueryParameters the list of group assignments for this mobile app. +type MobileAppsItemGraphMacOSDmgAppAssignmentsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphMacOSDmgAppAssignmentsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSDmgAppAssignmentsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMacOSDmgAppAssignmentsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphMacOSDmgAppAssignmentsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSDmgAppAssignmentsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppAssignmentId provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphMacOSDmgAppAssignmentsRequestBuilder) ByMobileAppAssignmentId(mobileAppAssignmentId string)(*MobileAppsItemGraphMacOSDmgAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppAssignmentId != "" { + urlTplParams["mobileAppAssignment%2Did"] = mobileAppAssignmentId + } + return NewMobileAppsItemGraphMacOSDmgAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphMacOSDmgAppAssignmentsRequestBuilderInternal instantiates a new AssignmentsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSDmgAppAssignmentsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSDmgAppAssignmentsRequestBuilder) { + m := &MobileAppsItemGraphMacOSDmgAppAssignmentsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMacOSDmgAppAssignmentsRequestBuilder instantiates a new AssignmentsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSDmgAppAssignmentsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSDmgAppAssignmentsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMacOSDmgAppAssignmentsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphMacOSDmgAppAssignmentsRequestBuilder) Count()(*MobileAppsItemGraphMacOSDmgAppAssignmentsCountRequestBuilder) { + return NewMobileAppsItemGraphMacOSDmgAppAssignmentsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphMacOSDmgAppAssignmentsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSDmgAppAssignmentsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentCollectionResponseable), nil +} +// Post create new navigation property to assignments for deviceAppManagement +func (m *MobileAppsItemGraphMacOSDmgAppAssignmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphMacOSDmgAppAssignmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// ToGetRequestInformation the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphMacOSDmgAppAssignmentsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSDmgAppAssignmentsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to assignments for deviceAppManagement +func (m *MobileAppsItemGraphMacOSDmgAppAssignmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphMacOSDmgAppAssignmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMacOSDmgAppAssignmentsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMacOSDmgAppAssignmentsRequestBuilder) { + return NewMobileAppsItemGraphMacOSDmgAppAssignmentsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_categories_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_categories_count_request_builder.go new file mode 100644 index 00000000000..2e84a4a1802 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_categories_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMacOSDmgAppCategoriesCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphMacOSDmgAppCategoriesCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMacOSDmgAppCategoriesCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphMacOSDmgAppCategoriesCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphMacOSDmgAppCategoriesCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSDmgAppCategoriesCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMacOSDmgAppCategoriesCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphMacOSDmgAppCategoriesCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSDmgAppCategoriesCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSDmgAppCategoriesCountRequestBuilder) { + m := &MobileAppsItemGraphMacOSDmgAppCategoriesCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/categories/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMacOSDmgAppCategoriesCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSDmgAppCategoriesCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSDmgAppCategoriesCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMacOSDmgAppCategoriesCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphMacOSDmgAppCategoriesCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSDmgAppCategoriesCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphMacOSDmgAppCategoriesCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSDmgAppCategoriesCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMacOSDmgAppCategoriesCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMacOSDmgAppCategoriesCountRequestBuilder) { + return NewMobileAppsItemGraphMacOSDmgAppCategoriesCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_categories_mobile_app_category_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_categories_mobile_app_category_item_request_builder.go new file mode 100644 index 00000000000..ba6230e1981 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_categories_mobile_app_category_item_request_builder.go @@ -0,0 +1,81 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMacOSDmgAppCategoriesMobileAppCategoryItemRequestBuilder provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphMacOSDmgAppCategoriesMobileAppCategoryItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMacOSDmgAppCategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters the list of categories for this app. +type MobileAppsItemGraphMacOSDmgAppCategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphMacOSDmgAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSDmgAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMacOSDmgAppCategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphMacOSDmgAppCategoriesMobileAppCategoryItemRequestBuilderInternal instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSDmgAppCategoriesMobileAppCategoryItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSDmgAppCategoriesMobileAppCategoryItemRequestBuilder) { + m := &MobileAppsItemGraphMacOSDmgAppCategoriesMobileAppCategoryItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMacOSDmgAppCategoriesMobileAppCategoryItemRequestBuilder instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSDmgAppCategoriesMobileAppCategoryItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSDmgAppCategoriesMobileAppCategoryItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMacOSDmgAppCategoriesMobileAppCategoryItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get the list of categories for this app. +func (m *MobileAppsItemGraphMacOSDmgAppCategoriesMobileAppCategoryItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSDmgAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppCategoryFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryable), nil +} +// ToGetRequestInformation the list of categories for this app. +func (m *MobileAppsItemGraphMacOSDmgAppCategoriesMobileAppCategoryItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSDmgAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMacOSDmgAppCategoriesMobileAppCategoryItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMacOSDmgAppCategoriesMobileAppCategoryItemRequestBuilder) { + return NewMobileAppsItemGraphMacOSDmgAppCategoriesMobileAppCategoryItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_categories_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_categories_request_builder.go new file mode 100644 index 00000000000..e629ac3df27 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_categories_request_builder.go @@ -0,0 +1,108 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMacOSDmgAppCategoriesRequestBuilder provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphMacOSDmgAppCategoriesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMacOSDmgAppCategoriesRequestBuilderGetQueryParameters the list of categories for this app. +type MobileAppsItemGraphMacOSDmgAppCategoriesRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphMacOSDmgAppCategoriesRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSDmgAppCategoriesRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMacOSDmgAppCategoriesRequestBuilderGetQueryParameters +} +// ByMobileAppCategoryId provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphMacOSDmgAppCategoriesRequestBuilder) ByMobileAppCategoryId(mobileAppCategoryId string)(*MobileAppsItemGraphMacOSDmgAppCategoriesMobileAppCategoryItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppCategoryId != "" { + urlTplParams["mobileAppCategory%2Did"] = mobileAppCategoryId + } + return NewMobileAppsItemGraphMacOSDmgAppCategoriesMobileAppCategoryItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphMacOSDmgAppCategoriesRequestBuilderInternal instantiates a new CategoriesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSDmgAppCategoriesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSDmgAppCategoriesRequestBuilder) { + m := &MobileAppsItemGraphMacOSDmgAppCategoriesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMacOSDmgAppCategoriesRequestBuilder instantiates a new CategoriesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSDmgAppCategoriesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSDmgAppCategoriesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMacOSDmgAppCategoriesRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphMacOSDmgAppCategoriesRequestBuilder) Count()(*MobileAppsItemGraphMacOSDmgAppCategoriesCountRequestBuilder) { + return NewMobileAppsItemGraphMacOSDmgAppCategoriesCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of categories for this app. +func (m *MobileAppsItemGraphMacOSDmgAppCategoriesRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSDmgAppCategoriesRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppCategoryCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryCollectionResponseable), nil +} +// ToGetRequestInformation the list of categories for this app. +func (m *MobileAppsItemGraphMacOSDmgAppCategoriesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSDmgAppCategoriesRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMacOSDmgAppCategoriesRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMacOSDmgAppCategoriesRequestBuilder) { + return NewMobileAppsItemGraphMacOSDmgAppCategoriesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_content_versions_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_content_versions_count_request_builder.go new file mode 100644 index 00000000000..8fdfce7d461 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_content_versions_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMacOSDmgAppContentVersionsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphMacOSDmgAppContentVersionsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMacOSDmgAppContentVersionsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphMacOSDmgAppContentVersionsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphMacOSDmgAppContentVersionsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSDmgAppContentVersionsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMacOSDmgAppContentVersionsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphMacOSDmgAppContentVersionsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSDmgAppContentVersionsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSDmgAppContentVersionsCountRequestBuilder) { + m := &MobileAppsItemGraphMacOSDmgAppContentVersionsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/contentVersions/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMacOSDmgAppContentVersionsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSDmgAppContentVersionsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSDmgAppContentVersionsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMacOSDmgAppContentVersionsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSDmgAppContentVersionsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSDmgAppContentVersionsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMacOSDmgAppContentVersionsCountRequestBuilder) { + return NewMobileAppsItemGraphMacOSDmgAppContentVersionsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_content_versions_item_contained_apps_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_content_versions_item_contained_apps_count_request_builder.go new file mode 100644 index 00000000000..18aa7222699 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_content_versions_item_contained_apps_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsCountRequestBuilder) { + m := &MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/contentVersions/{mobileAppContent%2Did}/containedApps/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsCountRequestBuilder) { + return NewMobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_content_versions_item_contained_apps_mobile_contained_app_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_content_versions_item_contained_apps_mobile_contained_app_item_request_builder.go new file mode 100644 index 00000000000..5eead7888ab --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_content_versions_item_contained_apps_mobile_contained_app_item_request_builder.go @@ -0,0 +1,159 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. +type MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetQueryParameters the collection of contained apps in a MobileLobApp acting as a package. +type MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderInternal instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) { + m := &MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/contentVersions/{mobileAppContent%2Did}/containedApps/{mobileContainedApp%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property containedApps for deviceAppManagement +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get the collection of contained apps in a MobileLobApp acting as a package. +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileContainedAppFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable), nil +} +// Patch update the navigation property containedApps in deviceAppManagement +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, requestConfiguration *MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileContainedAppFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable), nil +} +// ToDeleteRequestInformation delete navigation property containedApps for deviceAppManagement +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation the collection of contained apps in a MobileLobApp acting as a package. +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property containedApps in deviceAppManagement +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, requestConfiguration *MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) { + return NewMobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_content_versions_item_contained_apps_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_content_versions_item_contained_apps_request_builder.go new file mode 100644 index 00000000000..0b6de2a87d5 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_content_versions_item_contained_apps_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsRequestBuilder provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. +type MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsRequestBuilderGetQueryParameters the collection of contained apps in a MobileLobApp acting as a package. +type MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileContainedAppId provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsRequestBuilder) ByMobileContainedAppId(mobileContainedAppId string)(*MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileContainedAppId != "" { + urlTplParams["mobileContainedApp%2Did"] = mobileContainedAppId + } + return NewMobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsRequestBuilderInternal instantiates a new ContainedAppsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsRequestBuilder) { + m := &MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/contentVersions/{mobileAppContent%2Did}/containedApps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsRequestBuilder instantiates a new ContainedAppsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsRequestBuilder) Count()(*MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsCountRequestBuilder) { + return NewMobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the collection of contained apps in a MobileLobApp acting as a package. +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileContainedAppCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppCollectionResponseable), nil +} +// Post create new navigation property to containedApps for deviceAppManagement +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, requestConfiguration *MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileContainedAppFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable), nil +} +// ToGetRequestInformation the collection of contained apps in a MobileLobApp acting as a package. +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to containedApps for deviceAppManagement +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, requestConfiguration *MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsRequestBuilder) { + return NewMobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_content_versions_item_files_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_content_versions_item_files_count_request_builder.go new file mode 100644 index 00000000000..de0e3094102 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_content_versions_item_files_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesCountRequestBuilder) { + m := &MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/contentVersions/{mobileAppContent%2Did}/files/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesCountRequestBuilder) { + return NewMobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_content_versions_item_files_item_commit_post_request_body.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_content_versions_item_files_item_commit_post_request_body.go new file mode 100644 index 00000000000..da9f6fe6b37 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_content_versions_item_files_item_commit_post_request_body.go @@ -0,0 +1,111 @@ +package deviceappmanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +// MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemCommitPostRequestBody +type MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemCommitPostRequestBody struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewMobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemCommitPostRequestBody instantiates a new MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemCommitPostRequestBody and sets the default values. +func NewMobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemCommitPostRequestBody()(*MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemCommitPostRequestBody) { + m := &MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemCommitPostRequestBody{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateMobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemCommitPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemCommitPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemCommitPostRequestBody(), nil +} +// GetAdditionalData gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemCommitPostRequestBody) GetAdditionalData()(map[string]any) { + val , err := m.backingStore.Get("additionalData") + if err != nil { + panic(err) + } + if val == nil { + var value = make(map[string]any); + m.SetAdditionalData(value); + } + return val.(map[string]any) +} +// GetBackingStore gets the backingStore property value. Stores model information. +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemCommitPostRequestBody) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemCommitPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["fileEncryptionInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateFileEncryptionInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetFileEncryptionInfo(val.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable)) + } + return nil + } + return res +} +// GetFileEncryptionInfo gets the fileEncryptionInfo property value. The fileEncryptionInfo property +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemCommitPostRequestBody) GetFileEncryptionInfo()(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable) { + val, err := m.GetBackingStore().Get("fileEncryptionInfo") + if err != nil { + panic(err) + } + if val != nil { + return val.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable) + } + return nil +} +// Serialize serializes information the current object +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemCommitPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("fileEncryptionInfo", m.GetFileEncryptionInfo()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemCommitPostRequestBody) SetAdditionalData(value map[string]any)() { + err := m.GetBackingStore().Set("additionalData", value) + if err != nil { + panic(err) + } +} +// SetBackingStore sets the backingStore property value. Stores model information. +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemCommitPostRequestBody) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetFileEncryptionInfo sets the fileEncryptionInfo property value. The fileEncryptionInfo property +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemCommitPostRequestBody) SetFileEncryptionInfo(value ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable)() { + err := m.GetBackingStore().Set("fileEncryptionInfo", value) + if err != nil { + panic(err) + } +} +// MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemCommitPostRequestBodyable +type MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemCommitPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetFileEncryptionInfo()(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetFileEncryptionInfo(value ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable)() +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_content_versions_item_files_item_commit_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_content_versions_item_files_item_commit_request_builder.go new file mode 100644 index 00000000000..0edbc2d7e76 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_content_versions_item_files_item_commit_request_builder.go @@ -0,0 +1,68 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemCommitRequestBuilder provides operations to call the commit method. +type MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemCommitRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemCommitRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemCommitRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemCommitRequestBuilderInternal instantiates a new CommitRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemCommitRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemCommitRequestBuilder) { + m := &MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemCommitRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/commit", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemCommitRequestBuilder instantiates a new CommitRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemCommitRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemCommitRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemCommitRequestBuilderInternal(urlParams, requestAdapter) +} +// Post commits a file of a given app. +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemCommitRequestBuilder) Post(ctx context.Context, body MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemCommitPostRequestBodyable, requestConfiguration *MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemCommitRequestBuilderPostRequestConfiguration)(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation commits a file of a given app. +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemCommitRequestBuilder) ToPostRequestInformation(ctx context.Context, body MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemCommitPostRequestBodyable, requestConfiguration *MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemCommitRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemCommitRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemCommitRequestBuilder) { + return NewMobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemCommitRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_content_versions_item_files_item_renew_upload_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_content_versions_item_files_item_renew_upload_request_builder.go new file mode 100644 index 00000000000..d17bfd993da --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_content_versions_item_files_item_renew_upload_request_builder.go @@ -0,0 +1,64 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemRenewUploadRequestBuilder provides operations to call the renewUpload method. +type MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemRenewUploadRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemRenewUploadRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemRenewUploadRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemRenewUploadRequestBuilderInternal instantiates a new RenewUploadRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemRenewUploadRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemRenewUploadRequestBuilder) { + m := &MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemRenewUploadRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/renewUpload", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemRenewUploadRequestBuilder instantiates a new RenewUploadRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemRenewUploadRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemRenewUploadRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemRenewUploadRequestBuilderInternal(urlParams, requestAdapter) +} +// Post renews the SAS URI for an application file upload. +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemRenewUploadRequestBuilder) Post(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemRenewUploadRequestBuilderPostRequestConfiguration)(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation renews the SAS URI for an application file upload. +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemRenewUploadRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemRenewUploadRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemRenewUploadRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemRenewUploadRequestBuilder) { + return NewMobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemRenewUploadRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_content_versions_item_files_mobile_app_content_file_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_content_versions_item_files_mobile_app_content_file_item_request_builder.go new file mode 100644 index 00000000000..ab50435fe18 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_content_versions_item_files_mobile_app_content_file_item_request_builder.go @@ -0,0 +1,167 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. +type MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetQueryParameters the list of files for this app content version. +type MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// Commit provides operations to call the commit method. +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) Commit()(*MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemCommitRequestBuilder) { + return NewMobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemCommitRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderInternal instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) { + m := &MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property files for deviceAppManagement +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get the list of files for this app content version. +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFileFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable), nil +} +// Patch update the navigation property files in deviceAppManagement +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, requestConfiguration *MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFileFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable), nil +} +// RenewUpload provides operations to call the renewUpload method. +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) RenewUpload()(*MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemRenewUploadRequestBuilder) { + return NewMobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesItemRenewUploadRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToDeleteRequestInformation delete navigation property files for deviceAppManagement +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation the list of files for this app content version. +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property files in deviceAppManagement +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, requestConfiguration *MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) { + return NewMobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_content_versions_item_files_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_content_versions_item_files_request_builder.go new file mode 100644 index 00000000000..d313728a395 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_content_versions_item_files_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesRequestBuilder provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. +type MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesRequestBuilderGetQueryParameters the list of files for this app content version. +type MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppContentFileId provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesRequestBuilder) ByMobileAppContentFileId(mobileAppContentFileId string)(*MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppContentFileId != "" { + urlTplParams["mobileAppContentFile%2Did"] = mobileAppContentFileId + } + return NewMobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesRequestBuilderInternal instantiates a new FilesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesRequestBuilder) { + m := &MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/contentVersions/{mobileAppContent%2Did}/files{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesRequestBuilder instantiates a new FilesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesRequestBuilder) Count()(*MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesCountRequestBuilder) { + return NewMobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of files for this app content version. +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFileCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileCollectionResponseable), nil +} +// Post create new navigation property to files for deviceAppManagement +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, requestConfiguration *MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFileFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable), nil +} +// ToGetRequestInformation the list of files for this app content version. +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to files for deviceAppManagement +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, requestConfiguration *MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesRequestBuilder) { + return NewMobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_content_versions_mobile_app_content_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_content_versions_mobile_app_content_item_request_builder.go new file mode 100644 index 00000000000..6153192c0d7 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_content_versions_mobile_app_content_item_request_builder.go @@ -0,0 +1,167 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMacOSDmgAppContentVersionsMobileAppContentItemRequestBuilder provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. +type MobileAppsItemGraphMacOSDmgAppContentVersionsMobileAppContentItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMacOSDmgAppContentVersionsMobileAppContentItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSDmgAppContentVersionsMobileAppContentItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphMacOSDmgAppContentVersionsMobileAppContentItemRequestBuilderGetQueryParameters the list of content versions for this app. +type MobileAppsItemGraphMacOSDmgAppContentVersionsMobileAppContentItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphMacOSDmgAppContentVersionsMobileAppContentItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSDmgAppContentVersionsMobileAppContentItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMacOSDmgAppContentVersionsMobileAppContentItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphMacOSDmgAppContentVersionsMobileAppContentItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSDmgAppContentVersionsMobileAppContentItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphMacOSDmgAppContentVersionsMobileAppContentItemRequestBuilderInternal instantiates a new MobileAppContentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSDmgAppContentVersionsMobileAppContentItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSDmgAppContentVersionsMobileAppContentItemRequestBuilder) { + m := &MobileAppsItemGraphMacOSDmgAppContentVersionsMobileAppContentItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/contentVersions/{mobileAppContent%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMacOSDmgAppContentVersionsMobileAppContentItemRequestBuilder instantiates a new MobileAppContentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSDmgAppContentVersionsMobileAppContentItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSDmgAppContentVersionsMobileAppContentItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMacOSDmgAppContentVersionsMobileAppContentItemRequestBuilderInternal(urlParams, requestAdapter) +} +// ContainedApps provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsMobileAppContentItemRequestBuilder) ContainedApps()(*MobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsRequestBuilder) { + return NewMobileAppsItemGraphMacOSDmgAppContentVersionsItemContainedAppsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Delete delete navigation property contentVersions for deviceAppManagement +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsMobileAppContentItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSDmgAppContentVersionsMobileAppContentItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Files provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsMobileAppContentItemRequestBuilder) Files()(*MobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesRequestBuilder) { + return NewMobileAppsItemGraphMacOSDmgAppContentVersionsItemFilesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of content versions for this app. +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsMobileAppContentItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSDmgAppContentVersionsMobileAppContentItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable), nil +} +// Patch update the navigation property contentVersions in deviceAppManagement +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsMobileAppContentItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, requestConfiguration *MobileAppsItemGraphMacOSDmgAppContentVersionsMobileAppContentItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable), nil +} +// ToDeleteRequestInformation delete navigation property contentVersions for deviceAppManagement +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsMobileAppContentItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSDmgAppContentVersionsMobileAppContentItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation the list of content versions for this app. +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsMobileAppContentItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSDmgAppContentVersionsMobileAppContentItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property contentVersions in deviceAppManagement +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsMobileAppContentItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, requestConfiguration *MobileAppsItemGraphMacOSDmgAppContentVersionsMobileAppContentItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsMobileAppContentItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMacOSDmgAppContentVersionsMobileAppContentItemRequestBuilder) { + return NewMobileAppsItemGraphMacOSDmgAppContentVersionsMobileAppContentItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_content_versions_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_content_versions_request_builder.go new file mode 100644 index 00000000000..55e9b21cbcb --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_content_versions_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMacOSDmgAppContentVersionsRequestBuilder provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. +type MobileAppsItemGraphMacOSDmgAppContentVersionsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMacOSDmgAppContentVersionsRequestBuilderGetQueryParameters the list of content versions for this app. +type MobileAppsItemGraphMacOSDmgAppContentVersionsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphMacOSDmgAppContentVersionsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSDmgAppContentVersionsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMacOSDmgAppContentVersionsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphMacOSDmgAppContentVersionsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSDmgAppContentVersionsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppContentId provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsRequestBuilder) ByMobileAppContentId(mobileAppContentId string)(*MobileAppsItemGraphMacOSDmgAppContentVersionsMobileAppContentItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppContentId != "" { + urlTplParams["mobileAppContent%2Did"] = mobileAppContentId + } + return NewMobileAppsItemGraphMacOSDmgAppContentVersionsMobileAppContentItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphMacOSDmgAppContentVersionsRequestBuilderInternal instantiates a new ContentVersionsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSDmgAppContentVersionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSDmgAppContentVersionsRequestBuilder) { + m := &MobileAppsItemGraphMacOSDmgAppContentVersionsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/contentVersions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMacOSDmgAppContentVersionsRequestBuilder instantiates a new ContentVersionsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSDmgAppContentVersionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSDmgAppContentVersionsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMacOSDmgAppContentVersionsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsRequestBuilder) Count()(*MobileAppsItemGraphMacOSDmgAppContentVersionsCountRequestBuilder) { + return NewMobileAppsItemGraphMacOSDmgAppContentVersionsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of content versions for this app. +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSDmgAppContentVersionsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentCollectionResponseable), nil +} +// Post create new navigation property to contentVersions for deviceAppManagement +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, requestConfiguration *MobileAppsItemGraphMacOSDmgAppContentVersionsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable), nil +} +// ToGetRequestInformation the list of content versions for this app. +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSDmgAppContentVersionsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to contentVersions for deviceAppManagement +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, requestConfiguration *MobileAppsItemGraphMacOSDmgAppContentVersionsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMacOSDmgAppContentVersionsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMacOSDmgAppContentVersionsRequestBuilder) { + return NewMobileAppsItemGraphMacOSDmgAppContentVersionsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_relationships_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_relationships_count_request_builder.go new file mode 100644 index 00000000000..0e3cdf13c39 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_relationships_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMacOSDmgAppRelationshipsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphMacOSDmgAppRelationshipsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMacOSDmgAppRelationshipsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphMacOSDmgAppRelationshipsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphMacOSDmgAppRelationshipsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSDmgAppRelationshipsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMacOSDmgAppRelationshipsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphMacOSDmgAppRelationshipsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSDmgAppRelationshipsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSDmgAppRelationshipsCountRequestBuilder) { + m := &MobileAppsItemGraphMacOSDmgAppRelationshipsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/relationships/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMacOSDmgAppRelationshipsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSDmgAppRelationshipsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSDmgAppRelationshipsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMacOSDmgAppRelationshipsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphMacOSDmgAppRelationshipsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSDmgAppRelationshipsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphMacOSDmgAppRelationshipsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSDmgAppRelationshipsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMacOSDmgAppRelationshipsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMacOSDmgAppRelationshipsCountRequestBuilder) { + return NewMobileAppsItemGraphMacOSDmgAppRelationshipsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_relationships_mobile_app_relationship_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_relationships_mobile_app_relationship_item_request_builder.go new file mode 100644 index 00000000000..9927f44615f --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_relationships_mobile_app_relationship_item_request_builder.go @@ -0,0 +1,159 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMacOSDmgAppRelationshipsMobileAppRelationshipItemRequestBuilder provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphMacOSDmgAppRelationshipsMobileAppRelationshipItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMacOSDmgAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSDmgAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphMacOSDmgAppRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters list of relationships for this mobile app. +type MobileAppsItemGraphMacOSDmgAppRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphMacOSDmgAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSDmgAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMacOSDmgAppRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphMacOSDmgAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSDmgAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphMacOSDmgAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal instantiates a new MobileAppRelationshipItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSDmgAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSDmgAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + m := &MobileAppsItemGraphMacOSDmgAppRelationshipsMobileAppRelationshipItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/relationships/{mobileAppRelationship%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMacOSDmgAppRelationshipsMobileAppRelationshipItemRequestBuilder instantiates a new MobileAppRelationshipItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSDmgAppRelationshipsMobileAppRelationshipItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSDmgAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMacOSDmgAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property relationships for deviceAppManagement +func (m *MobileAppsItemGraphMacOSDmgAppRelationshipsMobileAppRelationshipItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSDmgAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get list of relationships for this mobile app. +func (m *MobileAppsItemGraphMacOSDmgAppRelationshipsMobileAppRelationshipItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSDmgAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// Patch update the navigation property relationships in deviceAppManagement +func (m *MobileAppsItemGraphMacOSDmgAppRelationshipsMobileAppRelationshipItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphMacOSDmgAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// ToDeleteRequestInformation delete navigation property relationships for deviceAppManagement +func (m *MobileAppsItemGraphMacOSDmgAppRelationshipsMobileAppRelationshipItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSDmgAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation list of relationships for this mobile app. +func (m *MobileAppsItemGraphMacOSDmgAppRelationshipsMobileAppRelationshipItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSDmgAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property relationships in deviceAppManagement +func (m *MobileAppsItemGraphMacOSDmgAppRelationshipsMobileAppRelationshipItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphMacOSDmgAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMacOSDmgAppRelationshipsMobileAppRelationshipItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMacOSDmgAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + return NewMobileAppsItemGraphMacOSDmgAppRelationshipsMobileAppRelationshipItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_relationships_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_relationships_request_builder.go new file mode 100644 index 00000000000..aa609e99150 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_relationships_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMacOSDmgAppRelationshipsRequestBuilder provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphMacOSDmgAppRelationshipsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMacOSDmgAppRelationshipsRequestBuilderGetQueryParameters list of relationships for this mobile app. +type MobileAppsItemGraphMacOSDmgAppRelationshipsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphMacOSDmgAppRelationshipsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSDmgAppRelationshipsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMacOSDmgAppRelationshipsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphMacOSDmgAppRelationshipsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSDmgAppRelationshipsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppRelationshipId provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphMacOSDmgAppRelationshipsRequestBuilder) ByMobileAppRelationshipId(mobileAppRelationshipId string)(*MobileAppsItemGraphMacOSDmgAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppRelationshipId != "" { + urlTplParams["mobileAppRelationship%2Did"] = mobileAppRelationshipId + } + return NewMobileAppsItemGraphMacOSDmgAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphMacOSDmgAppRelationshipsRequestBuilderInternal instantiates a new RelationshipsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSDmgAppRelationshipsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSDmgAppRelationshipsRequestBuilder) { + m := &MobileAppsItemGraphMacOSDmgAppRelationshipsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/relationships{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMacOSDmgAppRelationshipsRequestBuilder instantiates a new RelationshipsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSDmgAppRelationshipsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSDmgAppRelationshipsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMacOSDmgAppRelationshipsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphMacOSDmgAppRelationshipsRequestBuilder) Count()(*MobileAppsItemGraphMacOSDmgAppRelationshipsCountRequestBuilder) { + return NewMobileAppsItemGraphMacOSDmgAppRelationshipsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get list of relationships for this mobile app. +func (m *MobileAppsItemGraphMacOSDmgAppRelationshipsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSDmgAppRelationshipsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipCollectionResponseable), nil +} +// Post create new navigation property to relationships for deviceAppManagement +func (m *MobileAppsItemGraphMacOSDmgAppRelationshipsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphMacOSDmgAppRelationshipsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// ToGetRequestInformation list of relationships for this mobile app. +func (m *MobileAppsItemGraphMacOSDmgAppRelationshipsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSDmgAppRelationshipsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to relationships for deviceAppManagement +func (m *MobileAppsItemGraphMacOSDmgAppRelationshipsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphMacOSDmgAppRelationshipsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMacOSDmgAppRelationshipsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMacOSDmgAppRelationshipsRequestBuilder) { + return NewMobileAppsItemGraphMacOSDmgAppRelationshipsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_request_builder.go index 157b04ff765..2115421a513 100644 --- a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_request_builder.go +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_dmg_app_request_builder.go @@ -27,6 +27,14 @@ type MobileAppsItemGraphMacOSDmgAppRequestBuilderGetRequestConfiguration struct // Request query parameters QueryParameters *MobileAppsItemGraphMacOSDmgAppRequestBuilderGetQueryParameters } +// Assignments provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphMacOSDmgAppRequestBuilder) Assignments()(*MobileAppsItemGraphMacOSDmgAppAssignmentsRequestBuilder) { + return NewMobileAppsItemGraphMacOSDmgAppAssignmentsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Categories provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphMacOSDmgAppRequestBuilder) Categories()(*MobileAppsItemGraphMacOSDmgAppCategoriesRequestBuilder) { + return NewMobileAppsItemGraphMacOSDmgAppCategoriesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // NewMobileAppsItemGraphMacOSDmgAppRequestBuilderInternal instantiates a new GraphMacOSDmgAppRequestBuilder and sets the default values. func NewMobileAppsItemGraphMacOSDmgAppRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSDmgAppRequestBuilder) { m := &MobileAppsItemGraphMacOSDmgAppRequestBuilder{ @@ -40,6 +48,10 @@ func NewMobileAppsItemGraphMacOSDmgAppRequestBuilder(rawUrl string, requestAdapt urlParams["request-raw-url"] = rawUrl return NewMobileAppsItemGraphMacOSDmgAppRequestBuilderInternal(urlParams, requestAdapter) } +// ContentVersions provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. +func (m *MobileAppsItemGraphMacOSDmgAppRequestBuilder) ContentVersions()(*MobileAppsItemGraphMacOSDmgAppContentVersionsRequestBuilder) { + return NewMobileAppsItemGraphMacOSDmgAppContentVersionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // Get get the item of type microsoft.graph.mobileApp as microsoft.graph.macOSDmgApp func (m *MobileAppsItemGraphMacOSDmgAppRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSDmgAppRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MacOSDmgAppable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); @@ -59,6 +71,10 @@ func (m *MobileAppsItemGraphMacOSDmgAppRequestBuilder) Get(ctx context.Context, } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MacOSDmgAppable), nil } +// Relationships provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphMacOSDmgAppRequestBuilder) Relationships()(*MobileAppsItemGraphMacOSDmgAppRelationshipsRequestBuilder) { + return NewMobileAppsItemGraphMacOSDmgAppRelationshipsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation get the item of type microsoft.graph.mobileApp as microsoft.graph.macOSDmgApp func (m *MobileAppsItemGraphMacOSDmgAppRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSDmgAppRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_assignments_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_assignments_count_request_builder.go new file mode 100644 index 00000000000..cc3b58cb8fd --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_assignments_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMacOSLobAppAssignmentsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphMacOSLobAppAssignmentsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMacOSLobAppAssignmentsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphMacOSLobAppAssignmentsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphMacOSLobAppAssignmentsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSLobAppAssignmentsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMacOSLobAppAssignmentsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphMacOSLobAppAssignmentsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSLobAppAssignmentsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSLobAppAssignmentsCountRequestBuilder) { + m := &MobileAppsItemGraphMacOSLobAppAssignmentsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/assignments/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMacOSLobAppAssignmentsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSLobAppAssignmentsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSLobAppAssignmentsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMacOSLobAppAssignmentsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphMacOSLobAppAssignmentsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSLobAppAssignmentsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphMacOSLobAppAssignmentsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSLobAppAssignmentsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMacOSLobAppAssignmentsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMacOSLobAppAssignmentsCountRequestBuilder) { + return NewMobileAppsItemGraphMacOSLobAppAssignmentsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_assignments_mobile_app_assignment_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_assignments_mobile_app_assignment_item_request_builder.go new file mode 100644 index 00000000000..6519fa345d8 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_assignments_mobile_app_assignment_item_request_builder.go @@ -0,0 +1,159 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMacOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilder provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphMacOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMacOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphMacOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters the list of group assignments for this mobile app. +type MobileAppsItemGraphMacOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphMacOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMacOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphMacOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphMacOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + m := &MobileAppsItemGraphMacOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMacOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilder instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMacOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property assignments for deviceAppManagement +func (m *MobileAppsItemGraphMacOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphMacOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// Patch update the navigation property assignments in deviceAppManagement +func (m *MobileAppsItemGraphMacOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphMacOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// ToDeleteRequestInformation delete navigation property assignments for deviceAppManagement +func (m *MobileAppsItemGraphMacOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphMacOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property assignments in deviceAppManagement +func (m *MobileAppsItemGraphMacOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphMacOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMacOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMacOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + return NewMobileAppsItemGraphMacOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_assignments_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_assignments_request_builder.go new file mode 100644 index 00000000000..9f9fb4dbe0d --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_assignments_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMacOSLobAppAssignmentsRequestBuilder provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphMacOSLobAppAssignmentsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMacOSLobAppAssignmentsRequestBuilderGetQueryParameters the list of group assignments for this mobile app. +type MobileAppsItemGraphMacOSLobAppAssignmentsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphMacOSLobAppAssignmentsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSLobAppAssignmentsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMacOSLobAppAssignmentsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphMacOSLobAppAssignmentsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSLobAppAssignmentsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppAssignmentId provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphMacOSLobAppAssignmentsRequestBuilder) ByMobileAppAssignmentId(mobileAppAssignmentId string)(*MobileAppsItemGraphMacOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppAssignmentId != "" { + urlTplParams["mobileAppAssignment%2Did"] = mobileAppAssignmentId + } + return NewMobileAppsItemGraphMacOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphMacOSLobAppAssignmentsRequestBuilderInternal instantiates a new AssignmentsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSLobAppAssignmentsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSLobAppAssignmentsRequestBuilder) { + m := &MobileAppsItemGraphMacOSLobAppAssignmentsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMacOSLobAppAssignmentsRequestBuilder instantiates a new AssignmentsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSLobAppAssignmentsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSLobAppAssignmentsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMacOSLobAppAssignmentsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphMacOSLobAppAssignmentsRequestBuilder) Count()(*MobileAppsItemGraphMacOSLobAppAssignmentsCountRequestBuilder) { + return NewMobileAppsItemGraphMacOSLobAppAssignmentsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphMacOSLobAppAssignmentsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSLobAppAssignmentsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentCollectionResponseable), nil +} +// Post create new navigation property to assignments for deviceAppManagement +func (m *MobileAppsItemGraphMacOSLobAppAssignmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphMacOSLobAppAssignmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// ToGetRequestInformation the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphMacOSLobAppAssignmentsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSLobAppAssignmentsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to assignments for deviceAppManagement +func (m *MobileAppsItemGraphMacOSLobAppAssignmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphMacOSLobAppAssignmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMacOSLobAppAssignmentsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMacOSLobAppAssignmentsRequestBuilder) { + return NewMobileAppsItemGraphMacOSLobAppAssignmentsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_categories_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_categories_count_request_builder.go new file mode 100644 index 00000000000..c70898a56f7 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_categories_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMacOSLobAppCategoriesCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphMacOSLobAppCategoriesCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMacOSLobAppCategoriesCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphMacOSLobAppCategoriesCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphMacOSLobAppCategoriesCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSLobAppCategoriesCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMacOSLobAppCategoriesCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphMacOSLobAppCategoriesCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSLobAppCategoriesCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSLobAppCategoriesCountRequestBuilder) { + m := &MobileAppsItemGraphMacOSLobAppCategoriesCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/categories/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMacOSLobAppCategoriesCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSLobAppCategoriesCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSLobAppCategoriesCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMacOSLobAppCategoriesCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphMacOSLobAppCategoriesCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSLobAppCategoriesCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphMacOSLobAppCategoriesCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSLobAppCategoriesCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMacOSLobAppCategoriesCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMacOSLobAppCategoriesCountRequestBuilder) { + return NewMobileAppsItemGraphMacOSLobAppCategoriesCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_categories_mobile_app_category_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_categories_mobile_app_category_item_request_builder.go new file mode 100644 index 00000000000..4bc91a63f57 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_categories_mobile_app_category_item_request_builder.go @@ -0,0 +1,81 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMacOSLobAppCategoriesMobileAppCategoryItemRequestBuilder provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphMacOSLobAppCategoriesMobileAppCategoryItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMacOSLobAppCategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters the list of categories for this app. +type MobileAppsItemGraphMacOSLobAppCategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphMacOSLobAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSLobAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMacOSLobAppCategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphMacOSLobAppCategoriesMobileAppCategoryItemRequestBuilderInternal instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSLobAppCategoriesMobileAppCategoryItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSLobAppCategoriesMobileAppCategoryItemRequestBuilder) { + m := &MobileAppsItemGraphMacOSLobAppCategoriesMobileAppCategoryItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMacOSLobAppCategoriesMobileAppCategoryItemRequestBuilder instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSLobAppCategoriesMobileAppCategoryItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSLobAppCategoriesMobileAppCategoryItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMacOSLobAppCategoriesMobileAppCategoryItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get the list of categories for this app. +func (m *MobileAppsItemGraphMacOSLobAppCategoriesMobileAppCategoryItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSLobAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppCategoryFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryable), nil +} +// ToGetRequestInformation the list of categories for this app. +func (m *MobileAppsItemGraphMacOSLobAppCategoriesMobileAppCategoryItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSLobAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMacOSLobAppCategoriesMobileAppCategoryItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMacOSLobAppCategoriesMobileAppCategoryItemRequestBuilder) { + return NewMobileAppsItemGraphMacOSLobAppCategoriesMobileAppCategoryItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_categories_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_categories_request_builder.go new file mode 100644 index 00000000000..aab9170e225 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_categories_request_builder.go @@ -0,0 +1,108 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMacOSLobAppCategoriesRequestBuilder provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphMacOSLobAppCategoriesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMacOSLobAppCategoriesRequestBuilderGetQueryParameters the list of categories for this app. +type MobileAppsItemGraphMacOSLobAppCategoriesRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphMacOSLobAppCategoriesRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSLobAppCategoriesRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMacOSLobAppCategoriesRequestBuilderGetQueryParameters +} +// ByMobileAppCategoryId provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphMacOSLobAppCategoriesRequestBuilder) ByMobileAppCategoryId(mobileAppCategoryId string)(*MobileAppsItemGraphMacOSLobAppCategoriesMobileAppCategoryItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppCategoryId != "" { + urlTplParams["mobileAppCategory%2Did"] = mobileAppCategoryId + } + return NewMobileAppsItemGraphMacOSLobAppCategoriesMobileAppCategoryItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphMacOSLobAppCategoriesRequestBuilderInternal instantiates a new CategoriesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSLobAppCategoriesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSLobAppCategoriesRequestBuilder) { + m := &MobileAppsItemGraphMacOSLobAppCategoriesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMacOSLobAppCategoriesRequestBuilder instantiates a new CategoriesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSLobAppCategoriesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSLobAppCategoriesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMacOSLobAppCategoriesRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphMacOSLobAppCategoriesRequestBuilder) Count()(*MobileAppsItemGraphMacOSLobAppCategoriesCountRequestBuilder) { + return NewMobileAppsItemGraphMacOSLobAppCategoriesCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of categories for this app. +func (m *MobileAppsItemGraphMacOSLobAppCategoriesRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSLobAppCategoriesRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppCategoryCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryCollectionResponseable), nil +} +// ToGetRequestInformation the list of categories for this app. +func (m *MobileAppsItemGraphMacOSLobAppCategoriesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSLobAppCategoriesRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMacOSLobAppCategoriesRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMacOSLobAppCategoriesRequestBuilder) { + return NewMobileAppsItemGraphMacOSLobAppCategoriesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_content_versions_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_content_versions_count_request_builder.go new file mode 100644 index 00000000000..d228478d3d8 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_content_versions_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMacOSLobAppContentVersionsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphMacOSLobAppContentVersionsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMacOSLobAppContentVersionsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphMacOSLobAppContentVersionsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphMacOSLobAppContentVersionsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSLobAppContentVersionsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMacOSLobAppContentVersionsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphMacOSLobAppContentVersionsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSLobAppContentVersionsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSLobAppContentVersionsCountRequestBuilder) { + m := &MobileAppsItemGraphMacOSLobAppContentVersionsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/contentVersions/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMacOSLobAppContentVersionsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSLobAppContentVersionsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSLobAppContentVersionsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMacOSLobAppContentVersionsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSLobAppContentVersionsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSLobAppContentVersionsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMacOSLobAppContentVersionsCountRequestBuilder) { + return NewMobileAppsItemGraphMacOSLobAppContentVersionsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_content_versions_item_contained_apps_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_content_versions_item_contained_apps_count_request_builder.go new file mode 100644 index 00000000000..3a95c25f6a8 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_content_versions_item_contained_apps_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsCountRequestBuilder) { + m := &MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/contentVersions/{mobileAppContent%2Did}/containedApps/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsCountRequestBuilder) { + return NewMobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_content_versions_item_contained_apps_mobile_contained_app_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_content_versions_item_contained_apps_mobile_contained_app_item_request_builder.go new file mode 100644 index 00000000000..4e8630673c2 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_content_versions_item_contained_apps_mobile_contained_app_item_request_builder.go @@ -0,0 +1,159 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. +type MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetQueryParameters the collection of contained apps in a MobileLobApp acting as a package. +type MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderInternal instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) { + m := &MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/contentVersions/{mobileAppContent%2Did}/containedApps/{mobileContainedApp%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property containedApps for deviceAppManagement +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get the collection of contained apps in a MobileLobApp acting as a package. +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileContainedAppFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable), nil +} +// Patch update the navigation property containedApps in deviceAppManagement +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, requestConfiguration *MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileContainedAppFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable), nil +} +// ToDeleteRequestInformation delete navigation property containedApps for deviceAppManagement +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation the collection of contained apps in a MobileLobApp acting as a package. +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property containedApps in deviceAppManagement +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, requestConfiguration *MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) { + return NewMobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_content_versions_item_contained_apps_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_content_versions_item_contained_apps_request_builder.go new file mode 100644 index 00000000000..b4bb696ed15 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_content_versions_item_contained_apps_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsRequestBuilder provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. +type MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsRequestBuilderGetQueryParameters the collection of contained apps in a MobileLobApp acting as a package. +type MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileContainedAppId provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsRequestBuilder) ByMobileContainedAppId(mobileContainedAppId string)(*MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileContainedAppId != "" { + urlTplParams["mobileContainedApp%2Did"] = mobileContainedAppId + } + return NewMobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsRequestBuilderInternal instantiates a new ContainedAppsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsRequestBuilder) { + m := &MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/contentVersions/{mobileAppContent%2Did}/containedApps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsRequestBuilder instantiates a new ContainedAppsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsRequestBuilder) Count()(*MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsCountRequestBuilder) { + return NewMobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the collection of contained apps in a MobileLobApp acting as a package. +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileContainedAppCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppCollectionResponseable), nil +} +// Post create new navigation property to containedApps for deviceAppManagement +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, requestConfiguration *MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileContainedAppFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable), nil +} +// ToGetRequestInformation the collection of contained apps in a MobileLobApp acting as a package. +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to containedApps for deviceAppManagement +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, requestConfiguration *MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsRequestBuilder) { + return NewMobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_content_versions_item_files_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_content_versions_item_files_count_request_builder.go new file mode 100644 index 00000000000..ed90a82d94c --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_content_versions_item_files_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphMacOSLobAppContentVersionsItemFilesCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSLobAppContentVersionsItemFilesCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesCountRequestBuilder) { + m := &MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/contentVersions/{mobileAppContent%2Did}/files/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMacOSLobAppContentVersionsItemFilesCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSLobAppContentVersionsItemFilesCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMacOSLobAppContentVersionsItemFilesCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesCountRequestBuilder) { + return NewMobileAppsItemGraphMacOSLobAppContentVersionsItemFilesCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_content_versions_item_files_item_commit_post_request_body.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_content_versions_item_files_item_commit_post_request_body.go new file mode 100644 index 00000000000..2695bb83656 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_content_versions_item_files_item_commit_post_request_body.go @@ -0,0 +1,111 @@ +package deviceappmanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +// MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemCommitPostRequestBody +type MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemCommitPostRequestBody struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewMobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemCommitPostRequestBody instantiates a new MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemCommitPostRequestBody and sets the default values. +func NewMobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemCommitPostRequestBody()(*MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemCommitPostRequestBody) { + m := &MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemCommitPostRequestBody{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateMobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemCommitPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemCommitPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemCommitPostRequestBody(), nil +} +// GetAdditionalData gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemCommitPostRequestBody) GetAdditionalData()(map[string]any) { + val , err := m.backingStore.Get("additionalData") + if err != nil { + panic(err) + } + if val == nil { + var value = make(map[string]any); + m.SetAdditionalData(value); + } + return val.(map[string]any) +} +// GetBackingStore gets the backingStore property value. Stores model information. +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemCommitPostRequestBody) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemCommitPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["fileEncryptionInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateFileEncryptionInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetFileEncryptionInfo(val.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable)) + } + return nil + } + return res +} +// GetFileEncryptionInfo gets the fileEncryptionInfo property value. The fileEncryptionInfo property +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemCommitPostRequestBody) GetFileEncryptionInfo()(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable) { + val, err := m.GetBackingStore().Get("fileEncryptionInfo") + if err != nil { + panic(err) + } + if val != nil { + return val.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable) + } + return nil +} +// Serialize serializes information the current object +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemCommitPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("fileEncryptionInfo", m.GetFileEncryptionInfo()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemCommitPostRequestBody) SetAdditionalData(value map[string]any)() { + err := m.GetBackingStore().Set("additionalData", value) + if err != nil { + panic(err) + } +} +// SetBackingStore sets the backingStore property value. Stores model information. +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemCommitPostRequestBody) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetFileEncryptionInfo sets the fileEncryptionInfo property value. The fileEncryptionInfo property +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemCommitPostRequestBody) SetFileEncryptionInfo(value ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable)() { + err := m.GetBackingStore().Set("fileEncryptionInfo", value) + if err != nil { + panic(err) + } +} +// MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemCommitPostRequestBodyable +type MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemCommitPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetFileEncryptionInfo()(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetFileEncryptionInfo(value ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable)() +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_content_versions_item_files_item_commit_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_content_versions_item_files_item_commit_request_builder.go new file mode 100644 index 00000000000..acd8c1a0f9e --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_content_versions_item_files_item_commit_request_builder.go @@ -0,0 +1,68 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemCommitRequestBuilder provides operations to call the commit method. +type MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemCommitRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemCommitRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemCommitRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemCommitRequestBuilderInternal instantiates a new CommitRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemCommitRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemCommitRequestBuilder) { + m := &MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemCommitRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/commit", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemCommitRequestBuilder instantiates a new CommitRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemCommitRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemCommitRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemCommitRequestBuilderInternal(urlParams, requestAdapter) +} +// Post commits a file of a given app. +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemCommitRequestBuilder) Post(ctx context.Context, body MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemCommitPostRequestBodyable, requestConfiguration *MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemCommitRequestBuilderPostRequestConfiguration)(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation commits a file of a given app. +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemCommitRequestBuilder) ToPostRequestInformation(ctx context.Context, body MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemCommitPostRequestBodyable, requestConfiguration *MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemCommitRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemCommitRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemCommitRequestBuilder) { + return NewMobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemCommitRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_content_versions_item_files_item_renew_upload_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_content_versions_item_files_item_renew_upload_request_builder.go new file mode 100644 index 00000000000..3dc1269ed7e --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_content_versions_item_files_item_renew_upload_request_builder.go @@ -0,0 +1,64 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder provides operations to call the renewUpload method. +type MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemRenewUploadRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemRenewUploadRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemRenewUploadRequestBuilderInternal instantiates a new RenewUploadRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemRenewUploadRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder) { + m := &MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/renewUpload", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder instantiates a new RenewUploadRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemRenewUploadRequestBuilderInternal(urlParams, requestAdapter) +} +// Post renews the SAS URI for an application file upload. +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder) Post(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemRenewUploadRequestBuilderPostRequestConfiguration)(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation renews the SAS URI for an application file upload. +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemRenewUploadRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder) { + return NewMobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_content_versions_item_files_mobile_app_content_file_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_content_versions_item_files_mobile_app_content_file_item_request_builder.go new file mode 100644 index 00000000000..9762f18fe12 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_content_versions_item_files_mobile_app_content_file_item_request_builder.go @@ -0,0 +1,167 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. +type MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetQueryParameters the list of files for this app content version. +type MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// Commit provides operations to call the commit method. +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) Commit()(*MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemCommitRequestBuilder) { + return NewMobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemCommitRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphMacOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderInternal instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) { + m := &MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMacOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMacOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property files for deviceAppManagement +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get the list of files for this app content version. +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFileFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable), nil +} +// Patch update the navigation property files in deviceAppManagement +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, requestConfiguration *MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFileFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable), nil +} +// RenewUpload provides operations to call the renewUpload method. +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) RenewUpload()(*MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder) { + return NewMobileAppsItemGraphMacOSLobAppContentVersionsItemFilesItemRenewUploadRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToDeleteRequestInformation delete navigation property files for deviceAppManagement +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation the list of files for this app content version. +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property files in deviceAppManagement +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, requestConfiguration *MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) { + return NewMobileAppsItemGraphMacOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_content_versions_item_files_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_content_versions_item_files_request_builder.go new file mode 100644 index 00000000000..df703d2d932 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_content_versions_item_files_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesRequestBuilder provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. +type MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesRequestBuilderGetQueryParameters the list of files for this app content version. +type MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppContentFileId provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesRequestBuilder) ByMobileAppContentFileId(mobileAppContentFileId string)(*MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppContentFileId != "" { + urlTplParams["mobileAppContentFile%2Did"] = mobileAppContentFileId + } + return NewMobileAppsItemGraphMacOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphMacOSLobAppContentVersionsItemFilesRequestBuilderInternal instantiates a new FilesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSLobAppContentVersionsItemFilesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesRequestBuilder) { + m := &MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/contentVersions/{mobileAppContent%2Did}/files{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMacOSLobAppContentVersionsItemFilesRequestBuilder instantiates a new FilesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSLobAppContentVersionsItemFilesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMacOSLobAppContentVersionsItemFilesRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesRequestBuilder) Count()(*MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesCountRequestBuilder) { + return NewMobileAppsItemGraphMacOSLobAppContentVersionsItemFilesCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of files for this app content version. +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFileCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileCollectionResponseable), nil +} +// Post create new navigation property to files for deviceAppManagement +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, requestConfiguration *MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFileFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable), nil +} +// ToGetRequestInformation the list of files for this app content version. +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to files for deviceAppManagement +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, requestConfiguration *MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesRequestBuilder) { + return NewMobileAppsItemGraphMacOSLobAppContentVersionsItemFilesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_content_versions_mobile_app_content_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_content_versions_mobile_app_content_item_request_builder.go new file mode 100644 index 00000000000..e0437d53f6b --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_content_versions_mobile_app_content_item_request_builder.go @@ -0,0 +1,167 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMacOSLobAppContentVersionsMobileAppContentItemRequestBuilder provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. +type MobileAppsItemGraphMacOSLobAppContentVersionsMobileAppContentItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMacOSLobAppContentVersionsMobileAppContentItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSLobAppContentVersionsMobileAppContentItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphMacOSLobAppContentVersionsMobileAppContentItemRequestBuilderGetQueryParameters the list of content versions for this app. +type MobileAppsItemGraphMacOSLobAppContentVersionsMobileAppContentItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphMacOSLobAppContentVersionsMobileAppContentItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSLobAppContentVersionsMobileAppContentItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMacOSLobAppContentVersionsMobileAppContentItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphMacOSLobAppContentVersionsMobileAppContentItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSLobAppContentVersionsMobileAppContentItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphMacOSLobAppContentVersionsMobileAppContentItemRequestBuilderInternal instantiates a new MobileAppContentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSLobAppContentVersionsMobileAppContentItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSLobAppContentVersionsMobileAppContentItemRequestBuilder) { + m := &MobileAppsItemGraphMacOSLobAppContentVersionsMobileAppContentItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/contentVersions/{mobileAppContent%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMacOSLobAppContentVersionsMobileAppContentItemRequestBuilder instantiates a new MobileAppContentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSLobAppContentVersionsMobileAppContentItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSLobAppContentVersionsMobileAppContentItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMacOSLobAppContentVersionsMobileAppContentItemRequestBuilderInternal(urlParams, requestAdapter) +} +// ContainedApps provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsMobileAppContentItemRequestBuilder) ContainedApps()(*MobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsRequestBuilder) { + return NewMobileAppsItemGraphMacOSLobAppContentVersionsItemContainedAppsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Delete delete navigation property contentVersions for deviceAppManagement +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsMobileAppContentItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSLobAppContentVersionsMobileAppContentItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Files provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsMobileAppContentItemRequestBuilder) Files()(*MobileAppsItemGraphMacOSLobAppContentVersionsItemFilesRequestBuilder) { + return NewMobileAppsItemGraphMacOSLobAppContentVersionsItemFilesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of content versions for this app. +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsMobileAppContentItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSLobAppContentVersionsMobileAppContentItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable), nil +} +// Patch update the navigation property contentVersions in deviceAppManagement +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsMobileAppContentItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, requestConfiguration *MobileAppsItemGraphMacOSLobAppContentVersionsMobileAppContentItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable), nil +} +// ToDeleteRequestInformation delete navigation property contentVersions for deviceAppManagement +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsMobileAppContentItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSLobAppContentVersionsMobileAppContentItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation the list of content versions for this app. +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsMobileAppContentItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSLobAppContentVersionsMobileAppContentItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property contentVersions in deviceAppManagement +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsMobileAppContentItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, requestConfiguration *MobileAppsItemGraphMacOSLobAppContentVersionsMobileAppContentItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsMobileAppContentItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMacOSLobAppContentVersionsMobileAppContentItemRequestBuilder) { + return NewMobileAppsItemGraphMacOSLobAppContentVersionsMobileAppContentItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_content_versions_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_content_versions_request_builder.go new file mode 100644 index 00000000000..a260497f019 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_content_versions_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMacOSLobAppContentVersionsRequestBuilder provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. +type MobileAppsItemGraphMacOSLobAppContentVersionsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMacOSLobAppContentVersionsRequestBuilderGetQueryParameters the list of content versions for this app. +type MobileAppsItemGraphMacOSLobAppContentVersionsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphMacOSLobAppContentVersionsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSLobAppContentVersionsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMacOSLobAppContentVersionsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphMacOSLobAppContentVersionsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSLobAppContentVersionsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppContentId provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsRequestBuilder) ByMobileAppContentId(mobileAppContentId string)(*MobileAppsItemGraphMacOSLobAppContentVersionsMobileAppContentItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppContentId != "" { + urlTplParams["mobileAppContent%2Did"] = mobileAppContentId + } + return NewMobileAppsItemGraphMacOSLobAppContentVersionsMobileAppContentItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphMacOSLobAppContentVersionsRequestBuilderInternal instantiates a new ContentVersionsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSLobAppContentVersionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSLobAppContentVersionsRequestBuilder) { + m := &MobileAppsItemGraphMacOSLobAppContentVersionsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/contentVersions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMacOSLobAppContentVersionsRequestBuilder instantiates a new ContentVersionsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSLobAppContentVersionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSLobAppContentVersionsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMacOSLobAppContentVersionsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsRequestBuilder) Count()(*MobileAppsItemGraphMacOSLobAppContentVersionsCountRequestBuilder) { + return NewMobileAppsItemGraphMacOSLobAppContentVersionsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of content versions for this app. +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSLobAppContentVersionsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentCollectionResponseable), nil +} +// Post create new navigation property to contentVersions for deviceAppManagement +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, requestConfiguration *MobileAppsItemGraphMacOSLobAppContentVersionsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable), nil +} +// ToGetRequestInformation the list of content versions for this app. +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSLobAppContentVersionsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to contentVersions for deviceAppManagement +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, requestConfiguration *MobileAppsItemGraphMacOSLobAppContentVersionsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMacOSLobAppContentVersionsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMacOSLobAppContentVersionsRequestBuilder) { + return NewMobileAppsItemGraphMacOSLobAppContentVersionsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_relationships_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_relationships_count_request_builder.go new file mode 100644 index 00000000000..fbdb0ded8b5 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_relationships_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMacOSLobAppRelationshipsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphMacOSLobAppRelationshipsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMacOSLobAppRelationshipsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphMacOSLobAppRelationshipsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphMacOSLobAppRelationshipsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSLobAppRelationshipsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMacOSLobAppRelationshipsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphMacOSLobAppRelationshipsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSLobAppRelationshipsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSLobAppRelationshipsCountRequestBuilder) { + m := &MobileAppsItemGraphMacOSLobAppRelationshipsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/relationships/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMacOSLobAppRelationshipsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSLobAppRelationshipsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSLobAppRelationshipsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMacOSLobAppRelationshipsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphMacOSLobAppRelationshipsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSLobAppRelationshipsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphMacOSLobAppRelationshipsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSLobAppRelationshipsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMacOSLobAppRelationshipsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMacOSLobAppRelationshipsCountRequestBuilder) { + return NewMobileAppsItemGraphMacOSLobAppRelationshipsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_relationships_mobile_app_relationship_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_relationships_mobile_app_relationship_item_request_builder.go new file mode 100644 index 00000000000..fb84d30d7b8 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_relationships_mobile_app_relationship_item_request_builder.go @@ -0,0 +1,159 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMacOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilder provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphMacOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMacOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphMacOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters list of relationships for this mobile app. +type MobileAppsItemGraphMacOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphMacOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMacOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphMacOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphMacOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal instantiates a new MobileAppRelationshipItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + m := &MobileAppsItemGraphMacOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/relationships/{mobileAppRelationship%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMacOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilder instantiates a new MobileAppRelationshipItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMacOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property relationships for deviceAppManagement +func (m *MobileAppsItemGraphMacOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get list of relationships for this mobile app. +func (m *MobileAppsItemGraphMacOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// Patch update the navigation property relationships in deviceAppManagement +func (m *MobileAppsItemGraphMacOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphMacOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// ToDeleteRequestInformation delete navigation property relationships for deviceAppManagement +func (m *MobileAppsItemGraphMacOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation list of relationships for this mobile app. +func (m *MobileAppsItemGraphMacOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property relationships in deviceAppManagement +func (m *MobileAppsItemGraphMacOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphMacOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMacOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMacOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + return NewMobileAppsItemGraphMacOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_relationships_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_relationships_request_builder.go new file mode 100644 index 00000000000..bf443baa110 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_relationships_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMacOSLobAppRelationshipsRequestBuilder provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphMacOSLobAppRelationshipsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMacOSLobAppRelationshipsRequestBuilderGetQueryParameters list of relationships for this mobile app. +type MobileAppsItemGraphMacOSLobAppRelationshipsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphMacOSLobAppRelationshipsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSLobAppRelationshipsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMacOSLobAppRelationshipsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphMacOSLobAppRelationshipsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSLobAppRelationshipsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppRelationshipId provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphMacOSLobAppRelationshipsRequestBuilder) ByMobileAppRelationshipId(mobileAppRelationshipId string)(*MobileAppsItemGraphMacOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppRelationshipId != "" { + urlTplParams["mobileAppRelationship%2Did"] = mobileAppRelationshipId + } + return NewMobileAppsItemGraphMacOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphMacOSLobAppRelationshipsRequestBuilderInternal instantiates a new RelationshipsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSLobAppRelationshipsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSLobAppRelationshipsRequestBuilder) { + m := &MobileAppsItemGraphMacOSLobAppRelationshipsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/relationships{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMacOSLobAppRelationshipsRequestBuilder instantiates a new RelationshipsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSLobAppRelationshipsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSLobAppRelationshipsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMacOSLobAppRelationshipsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphMacOSLobAppRelationshipsRequestBuilder) Count()(*MobileAppsItemGraphMacOSLobAppRelationshipsCountRequestBuilder) { + return NewMobileAppsItemGraphMacOSLobAppRelationshipsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get list of relationships for this mobile app. +func (m *MobileAppsItemGraphMacOSLobAppRelationshipsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSLobAppRelationshipsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipCollectionResponseable), nil +} +// Post create new navigation property to relationships for deviceAppManagement +func (m *MobileAppsItemGraphMacOSLobAppRelationshipsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphMacOSLobAppRelationshipsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// ToGetRequestInformation list of relationships for this mobile app. +func (m *MobileAppsItemGraphMacOSLobAppRelationshipsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSLobAppRelationshipsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to relationships for deviceAppManagement +func (m *MobileAppsItemGraphMacOSLobAppRelationshipsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphMacOSLobAppRelationshipsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMacOSLobAppRelationshipsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMacOSLobAppRelationshipsRequestBuilder) { + return NewMobileAppsItemGraphMacOSLobAppRelationshipsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_request_builder.go index 2a94fc88e5a..edaa336df7c 100644 --- a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_request_builder.go +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_lob_app_request_builder.go @@ -27,6 +27,14 @@ type MobileAppsItemGraphMacOSLobAppRequestBuilderGetRequestConfiguration struct // Request query parameters QueryParameters *MobileAppsItemGraphMacOSLobAppRequestBuilderGetQueryParameters } +// Assignments provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphMacOSLobAppRequestBuilder) Assignments()(*MobileAppsItemGraphMacOSLobAppAssignmentsRequestBuilder) { + return NewMobileAppsItemGraphMacOSLobAppAssignmentsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Categories provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphMacOSLobAppRequestBuilder) Categories()(*MobileAppsItemGraphMacOSLobAppCategoriesRequestBuilder) { + return NewMobileAppsItemGraphMacOSLobAppCategoriesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // NewMobileAppsItemGraphMacOSLobAppRequestBuilderInternal instantiates a new GraphMacOSLobAppRequestBuilder and sets the default values. func NewMobileAppsItemGraphMacOSLobAppRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSLobAppRequestBuilder) { m := &MobileAppsItemGraphMacOSLobAppRequestBuilder{ @@ -40,6 +48,10 @@ func NewMobileAppsItemGraphMacOSLobAppRequestBuilder(rawUrl string, requestAdapt urlParams["request-raw-url"] = rawUrl return NewMobileAppsItemGraphMacOSLobAppRequestBuilderInternal(urlParams, requestAdapter) } +// ContentVersions provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. +func (m *MobileAppsItemGraphMacOSLobAppRequestBuilder) ContentVersions()(*MobileAppsItemGraphMacOSLobAppContentVersionsRequestBuilder) { + return NewMobileAppsItemGraphMacOSLobAppContentVersionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // Get get the item of type microsoft.graph.mobileApp as microsoft.graph.macOSLobApp func (m *MobileAppsItemGraphMacOSLobAppRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSLobAppRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MacOSLobAppable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); @@ -59,6 +71,10 @@ func (m *MobileAppsItemGraphMacOSLobAppRequestBuilder) Get(ctx context.Context, } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MacOSLobAppable), nil } +// Relationships provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphMacOSLobAppRequestBuilder) Relationships()(*MobileAppsItemGraphMacOSLobAppRelationshipsRequestBuilder) { + return NewMobileAppsItemGraphMacOSLobAppRelationshipsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation get the item of type microsoft.graph.mobileApp as microsoft.graph.macOSLobApp func (m *MobileAppsItemGraphMacOSLobAppRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSLobAppRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_assignments_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_assignments_count_request_builder.go new file mode 100644 index 00000000000..a092abedb91 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_assignments_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMacOSPkgAppAssignmentsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphMacOSPkgAppAssignmentsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMacOSPkgAppAssignmentsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphMacOSPkgAppAssignmentsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphMacOSPkgAppAssignmentsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSPkgAppAssignmentsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMacOSPkgAppAssignmentsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphMacOSPkgAppAssignmentsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSPkgAppAssignmentsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSPkgAppAssignmentsCountRequestBuilder) { + m := &MobileAppsItemGraphMacOSPkgAppAssignmentsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSPkgApp/assignments/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMacOSPkgAppAssignmentsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSPkgAppAssignmentsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSPkgAppAssignmentsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMacOSPkgAppAssignmentsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphMacOSPkgAppAssignmentsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSPkgAppAssignmentsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphMacOSPkgAppAssignmentsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSPkgAppAssignmentsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMacOSPkgAppAssignmentsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMacOSPkgAppAssignmentsCountRequestBuilder) { + return NewMobileAppsItemGraphMacOSPkgAppAssignmentsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_assignments_mobile_app_assignment_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_assignments_mobile_app_assignment_item_request_builder.go new file mode 100644 index 00000000000..c6a90694e7e --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_assignments_mobile_app_assignment_item_request_builder.go @@ -0,0 +1,159 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMacOSPkgAppAssignmentsMobileAppAssignmentItemRequestBuilder provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphMacOSPkgAppAssignmentsMobileAppAssignmentItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMacOSPkgAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSPkgAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphMacOSPkgAppAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters the list of group assignments for this mobile app. +type MobileAppsItemGraphMacOSPkgAppAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphMacOSPkgAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSPkgAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMacOSPkgAppAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphMacOSPkgAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSPkgAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphMacOSPkgAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSPkgAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSPkgAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + m := &MobileAppsItemGraphMacOSPkgAppAssignmentsMobileAppAssignmentItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSPkgApp/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMacOSPkgAppAssignmentsMobileAppAssignmentItemRequestBuilder instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSPkgAppAssignmentsMobileAppAssignmentItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSPkgAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMacOSPkgAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property assignments for deviceAppManagement +func (m *MobileAppsItemGraphMacOSPkgAppAssignmentsMobileAppAssignmentItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSPkgAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphMacOSPkgAppAssignmentsMobileAppAssignmentItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSPkgAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// Patch update the navigation property assignments in deviceAppManagement +func (m *MobileAppsItemGraphMacOSPkgAppAssignmentsMobileAppAssignmentItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphMacOSPkgAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// ToDeleteRequestInformation delete navigation property assignments for deviceAppManagement +func (m *MobileAppsItemGraphMacOSPkgAppAssignmentsMobileAppAssignmentItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSPkgAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphMacOSPkgAppAssignmentsMobileAppAssignmentItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSPkgAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property assignments in deviceAppManagement +func (m *MobileAppsItemGraphMacOSPkgAppAssignmentsMobileAppAssignmentItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphMacOSPkgAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMacOSPkgAppAssignmentsMobileAppAssignmentItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMacOSPkgAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + return NewMobileAppsItemGraphMacOSPkgAppAssignmentsMobileAppAssignmentItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_assignments_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_assignments_request_builder.go new file mode 100644 index 00000000000..19eed1479c1 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_assignments_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMacOSPkgAppAssignmentsRequestBuilder provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphMacOSPkgAppAssignmentsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMacOSPkgAppAssignmentsRequestBuilderGetQueryParameters the list of group assignments for this mobile app. +type MobileAppsItemGraphMacOSPkgAppAssignmentsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphMacOSPkgAppAssignmentsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSPkgAppAssignmentsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMacOSPkgAppAssignmentsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphMacOSPkgAppAssignmentsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSPkgAppAssignmentsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppAssignmentId provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphMacOSPkgAppAssignmentsRequestBuilder) ByMobileAppAssignmentId(mobileAppAssignmentId string)(*MobileAppsItemGraphMacOSPkgAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppAssignmentId != "" { + urlTplParams["mobileAppAssignment%2Did"] = mobileAppAssignmentId + } + return NewMobileAppsItemGraphMacOSPkgAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphMacOSPkgAppAssignmentsRequestBuilderInternal instantiates a new AssignmentsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSPkgAppAssignmentsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSPkgAppAssignmentsRequestBuilder) { + m := &MobileAppsItemGraphMacOSPkgAppAssignmentsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSPkgApp/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMacOSPkgAppAssignmentsRequestBuilder instantiates a new AssignmentsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSPkgAppAssignmentsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSPkgAppAssignmentsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMacOSPkgAppAssignmentsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphMacOSPkgAppAssignmentsRequestBuilder) Count()(*MobileAppsItemGraphMacOSPkgAppAssignmentsCountRequestBuilder) { + return NewMobileAppsItemGraphMacOSPkgAppAssignmentsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphMacOSPkgAppAssignmentsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSPkgAppAssignmentsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentCollectionResponseable), nil +} +// Post create new navigation property to assignments for deviceAppManagement +func (m *MobileAppsItemGraphMacOSPkgAppAssignmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphMacOSPkgAppAssignmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// ToGetRequestInformation the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphMacOSPkgAppAssignmentsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSPkgAppAssignmentsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to assignments for deviceAppManagement +func (m *MobileAppsItemGraphMacOSPkgAppAssignmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphMacOSPkgAppAssignmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMacOSPkgAppAssignmentsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMacOSPkgAppAssignmentsRequestBuilder) { + return NewMobileAppsItemGraphMacOSPkgAppAssignmentsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_categories_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_categories_count_request_builder.go new file mode 100644 index 00000000000..202c4f969d8 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_categories_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMacOSPkgAppCategoriesCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphMacOSPkgAppCategoriesCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMacOSPkgAppCategoriesCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphMacOSPkgAppCategoriesCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphMacOSPkgAppCategoriesCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSPkgAppCategoriesCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMacOSPkgAppCategoriesCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphMacOSPkgAppCategoriesCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSPkgAppCategoriesCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSPkgAppCategoriesCountRequestBuilder) { + m := &MobileAppsItemGraphMacOSPkgAppCategoriesCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSPkgApp/categories/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMacOSPkgAppCategoriesCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSPkgAppCategoriesCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSPkgAppCategoriesCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMacOSPkgAppCategoriesCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphMacOSPkgAppCategoriesCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSPkgAppCategoriesCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphMacOSPkgAppCategoriesCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSPkgAppCategoriesCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMacOSPkgAppCategoriesCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMacOSPkgAppCategoriesCountRequestBuilder) { + return NewMobileAppsItemGraphMacOSPkgAppCategoriesCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_categories_mobile_app_category_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_categories_mobile_app_category_item_request_builder.go new file mode 100644 index 00000000000..ad8e1603ceb --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_categories_mobile_app_category_item_request_builder.go @@ -0,0 +1,81 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMacOSPkgAppCategoriesMobileAppCategoryItemRequestBuilder provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphMacOSPkgAppCategoriesMobileAppCategoryItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMacOSPkgAppCategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters the list of categories for this app. +type MobileAppsItemGraphMacOSPkgAppCategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphMacOSPkgAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSPkgAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMacOSPkgAppCategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphMacOSPkgAppCategoriesMobileAppCategoryItemRequestBuilderInternal instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSPkgAppCategoriesMobileAppCategoryItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSPkgAppCategoriesMobileAppCategoryItemRequestBuilder) { + m := &MobileAppsItemGraphMacOSPkgAppCategoriesMobileAppCategoryItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSPkgApp/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMacOSPkgAppCategoriesMobileAppCategoryItemRequestBuilder instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSPkgAppCategoriesMobileAppCategoryItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSPkgAppCategoriesMobileAppCategoryItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMacOSPkgAppCategoriesMobileAppCategoryItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get the list of categories for this app. +func (m *MobileAppsItemGraphMacOSPkgAppCategoriesMobileAppCategoryItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSPkgAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppCategoryFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryable), nil +} +// ToGetRequestInformation the list of categories for this app. +func (m *MobileAppsItemGraphMacOSPkgAppCategoriesMobileAppCategoryItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSPkgAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMacOSPkgAppCategoriesMobileAppCategoryItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMacOSPkgAppCategoriesMobileAppCategoryItemRequestBuilder) { + return NewMobileAppsItemGraphMacOSPkgAppCategoriesMobileAppCategoryItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_categories_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_categories_request_builder.go new file mode 100644 index 00000000000..42cb4edc23a --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_categories_request_builder.go @@ -0,0 +1,108 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMacOSPkgAppCategoriesRequestBuilder provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphMacOSPkgAppCategoriesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMacOSPkgAppCategoriesRequestBuilderGetQueryParameters the list of categories for this app. +type MobileAppsItemGraphMacOSPkgAppCategoriesRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphMacOSPkgAppCategoriesRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSPkgAppCategoriesRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMacOSPkgAppCategoriesRequestBuilderGetQueryParameters +} +// ByMobileAppCategoryId provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphMacOSPkgAppCategoriesRequestBuilder) ByMobileAppCategoryId(mobileAppCategoryId string)(*MobileAppsItemGraphMacOSPkgAppCategoriesMobileAppCategoryItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppCategoryId != "" { + urlTplParams["mobileAppCategory%2Did"] = mobileAppCategoryId + } + return NewMobileAppsItemGraphMacOSPkgAppCategoriesMobileAppCategoryItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphMacOSPkgAppCategoriesRequestBuilderInternal instantiates a new CategoriesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSPkgAppCategoriesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSPkgAppCategoriesRequestBuilder) { + m := &MobileAppsItemGraphMacOSPkgAppCategoriesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSPkgApp/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMacOSPkgAppCategoriesRequestBuilder instantiates a new CategoriesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSPkgAppCategoriesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSPkgAppCategoriesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMacOSPkgAppCategoriesRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphMacOSPkgAppCategoriesRequestBuilder) Count()(*MobileAppsItemGraphMacOSPkgAppCategoriesCountRequestBuilder) { + return NewMobileAppsItemGraphMacOSPkgAppCategoriesCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of categories for this app. +func (m *MobileAppsItemGraphMacOSPkgAppCategoriesRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSPkgAppCategoriesRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppCategoryCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryCollectionResponseable), nil +} +// ToGetRequestInformation the list of categories for this app. +func (m *MobileAppsItemGraphMacOSPkgAppCategoriesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSPkgAppCategoriesRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMacOSPkgAppCategoriesRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMacOSPkgAppCategoriesRequestBuilder) { + return NewMobileAppsItemGraphMacOSPkgAppCategoriesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_content_versions_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_content_versions_count_request_builder.go new file mode 100644 index 00000000000..e78023be267 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_content_versions_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMacOSPkgAppContentVersionsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphMacOSPkgAppContentVersionsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMacOSPkgAppContentVersionsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphMacOSPkgAppContentVersionsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphMacOSPkgAppContentVersionsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSPkgAppContentVersionsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMacOSPkgAppContentVersionsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphMacOSPkgAppContentVersionsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSPkgAppContentVersionsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSPkgAppContentVersionsCountRequestBuilder) { + m := &MobileAppsItemGraphMacOSPkgAppContentVersionsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSPkgApp/contentVersions/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMacOSPkgAppContentVersionsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSPkgAppContentVersionsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSPkgAppContentVersionsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMacOSPkgAppContentVersionsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSPkgAppContentVersionsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSPkgAppContentVersionsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMacOSPkgAppContentVersionsCountRequestBuilder) { + return NewMobileAppsItemGraphMacOSPkgAppContentVersionsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_content_versions_item_contained_apps_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_content_versions_item_contained_apps_count_request_builder.go new file mode 100644 index 00000000000..1d304f5b8ff --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_content_versions_item_contained_apps_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsCountRequestBuilder) { + m := &MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSPkgApp/contentVersions/{mobileAppContent%2Did}/containedApps/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsCountRequestBuilder) { + return NewMobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_content_versions_item_contained_apps_mobile_contained_app_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_content_versions_item_contained_apps_mobile_contained_app_item_request_builder.go new file mode 100644 index 00000000000..71b8afa09f5 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_content_versions_item_contained_apps_mobile_contained_app_item_request_builder.go @@ -0,0 +1,159 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. +type MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetQueryParameters the collection of contained apps in a MobileLobApp acting as a package. +type MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderInternal instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) { + m := &MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSPkgApp/contentVersions/{mobileAppContent%2Did}/containedApps/{mobileContainedApp%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property containedApps for deviceAppManagement +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get the collection of contained apps in a MobileLobApp acting as a package. +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileContainedAppFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable), nil +} +// Patch update the navigation property containedApps in deviceAppManagement +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, requestConfiguration *MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileContainedAppFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable), nil +} +// ToDeleteRequestInformation delete navigation property containedApps for deviceAppManagement +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation the collection of contained apps in a MobileLobApp acting as a package. +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property containedApps in deviceAppManagement +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, requestConfiguration *MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) { + return NewMobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_content_versions_item_contained_apps_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_content_versions_item_contained_apps_request_builder.go new file mode 100644 index 00000000000..d4bb24e4e91 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_content_versions_item_contained_apps_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsRequestBuilder provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. +type MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsRequestBuilderGetQueryParameters the collection of contained apps in a MobileLobApp acting as a package. +type MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileContainedAppId provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsRequestBuilder) ByMobileContainedAppId(mobileContainedAppId string)(*MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileContainedAppId != "" { + urlTplParams["mobileContainedApp%2Did"] = mobileContainedAppId + } + return NewMobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsRequestBuilderInternal instantiates a new ContainedAppsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsRequestBuilder) { + m := &MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSPkgApp/contentVersions/{mobileAppContent%2Did}/containedApps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsRequestBuilder instantiates a new ContainedAppsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsRequestBuilder) Count()(*MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsCountRequestBuilder) { + return NewMobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the collection of contained apps in a MobileLobApp acting as a package. +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileContainedAppCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppCollectionResponseable), nil +} +// Post create new navigation property to containedApps for deviceAppManagement +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, requestConfiguration *MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileContainedAppFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable), nil +} +// ToGetRequestInformation the collection of contained apps in a MobileLobApp acting as a package. +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to containedApps for deviceAppManagement +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, requestConfiguration *MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsRequestBuilder) { + return NewMobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_content_versions_item_files_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_content_versions_item_files_count_request_builder.go new file mode 100644 index 00000000000..d34c7c8e4dd --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_content_versions_item_files_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesCountRequestBuilder) { + m := &MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSPkgApp/contentVersions/{mobileAppContent%2Did}/files/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesCountRequestBuilder) { + return NewMobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_content_versions_item_files_item_commit_post_request_body.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_content_versions_item_files_item_commit_post_request_body.go new file mode 100644 index 00000000000..609e777fb18 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_content_versions_item_files_item_commit_post_request_body.go @@ -0,0 +1,111 @@ +package deviceappmanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +// MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemCommitPostRequestBody +type MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemCommitPostRequestBody struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewMobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemCommitPostRequestBody instantiates a new MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemCommitPostRequestBody and sets the default values. +func NewMobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemCommitPostRequestBody()(*MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemCommitPostRequestBody) { + m := &MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemCommitPostRequestBody{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateMobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemCommitPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemCommitPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemCommitPostRequestBody(), nil +} +// GetAdditionalData gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemCommitPostRequestBody) GetAdditionalData()(map[string]any) { + val , err := m.backingStore.Get("additionalData") + if err != nil { + panic(err) + } + if val == nil { + var value = make(map[string]any); + m.SetAdditionalData(value); + } + return val.(map[string]any) +} +// GetBackingStore gets the backingStore property value. Stores model information. +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemCommitPostRequestBody) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemCommitPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["fileEncryptionInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateFileEncryptionInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetFileEncryptionInfo(val.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable)) + } + return nil + } + return res +} +// GetFileEncryptionInfo gets the fileEncryptionInfo property value. The fileEncryptionInfo property +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemCommitPostRequestBody) GetFileEncryptionInfo()(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable) { + val, err := m.GetBackingStore().Get("fileEncryptionInfo") + if err != nil { + panic(err) + } + if val != nil { + return val.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable) + } + return nil +} +// Serialize serializes information the current object +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemCommitPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("fileEncryptionInfo", m.GetFileEncryptionInfo()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemCommitPostRequestBody) SetAdditionalData(value map[string]any)() { + err := m.GetBackingStore().Set("additionalData", value) + if err != nil { + panic(err) + } +} +// SetBackingStore sets the backingStore property value. Stores model information. +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemCommitPostRequestBody) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetFileEncryptionInfo sets the fileEncryptionInfo property value. The fileEncryptionInfo property +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemCommitPostRequestBody) SetFileEncryptionInfo(value ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable)() { + err := m.GetBackingStore().Set("fileEncryptionInfo", value) + if err != nil { + panic(err) + } +} +// MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemCommitPostRequestBodyable +type MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemCommitPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetFileEncryptionInfo()(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetFileEncryptionInfo(value ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable)() +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_content_versions_item_files_item_commit_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_content_versions_item_files_item_commit_request_builder.go new file mode 100644 index 00000000000..657c865dcf3 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_content_versions_item_files_item_commit_request_builder.go @@ -0,0 +1,68 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemCommitRequestBuilder provides operations to call the commit method. +type MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemCommitRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemCommitRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemCommitRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemCommitRequestBuilderInternal instantiates a new CommitRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemCommitRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemCommitRequestBuilder) { + m := &MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemCommitRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSPkgApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/commit", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemCommitRequestBuilder instantiates a new CommitRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemCommitRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemCommitRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemCommitRequestBuilderInternal(urlParams, requestAdapter) +} +// Post commits a file of a given app. +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemCommitRequestBuilder) Post(ctx context.Context, body MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemCommitPostRequestBodyable, requestConfiguration *MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemCommitRequestBuilderPostRequestConfiguration)(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation commits a file of a given app. +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemCommitRequestBuilder) ToPostRequestInformation(ctx context.Context, body MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemCommitPostRequestBodyable, requestConfiguration *MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemCommitRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemCommitRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemCommitRequestBuilder) { + return NewMobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemCommitRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_content_versions_item_files_item_renew_upload_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_content_versions_item_files_item_renew_upload_request_builder.go new file mode 100644 index 00000000000..37eb0886dd6 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_content_versions_item_files_item_renew_upload_request_builder.go @@ -0,0 +1,64 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemRenewUploadRequestBuilder provides operations to call the renewUpload method. +type MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemRenewUploadRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemRenewUploadRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemRenewUploadRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemRenewUploadRequestBuilderInternal instantiates a new RenewUploadRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemRenewUploadRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemRenewUploadRequestBuilder) { + m := &MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemRenewUploadRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSPkgApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/renewUpload", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemRenewUploadRequestBuilder instantiates a new RenewUploadRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemRenewUploadRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemRenewUploadRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemRenewUploadRequestBuilderInternal(urlParams, requestAdapter) +} +// Post renews the SAS URI for an application file upload. +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemRenewUploadRequestBuilder) Post(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemRenewUploadRequestBuilderPostRequestConfiguration)(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation renews the SAS URI for an application file upload. +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemRenewUploadRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemRenewUploadRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemRenewUploadRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemRenewUploadRequestBuilder) { + return NewMobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemRenewUploadRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_content_versions_item_files_mobile_app_content_file_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_content_versions_item_files_mobile_app_content_file_item_request_builder.go new file mode 100644 index 00000000000..a36a1a172dd --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_content_versions_item_files_mobile_app_content_file_item_request_builder.go @@ -0,0 +1,167 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. +type MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetQueryParameters the list of files for this app content version. +type MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// Commit provides operations to call the commit method. +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) Commit()(*MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemCommitRequestBuilder) { + return NewMobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemCommitRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderInternal instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) { + m := &MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSPkgApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property files for deviceAppManagement +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get the list of files for this app content version. +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFileFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable), nil +} +// Patch update the navigation property files in deviceAppManagement +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, requestConfiguration *MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFileFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable), nil +} +// RenewUpload provides operations to call the renewUpload method. +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) RenewUpload()(*MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemRenewUploadRequestBuilder) { + return NewMobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesItemRenewUploadRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToDeleteRequestInformation delete navigation property files for deviceAppManagement +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation the list of files for this app content version. +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property files in deviceAppManagement +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, requestConfiguration *MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) { + return NewMobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_content_versions_item_files_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_content_versions_item_files_request_builder.go new file mode 100644 index 00000000000..7b2ecb85857 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_content_versions_item_files_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesRequestBuilder provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. +type MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesRequestBuilderGetQueryParameters the list of files for this app content version. +type MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppContentFileId provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesRequestBuilder) ByMobileAppContentFileId(mobileAppContentFileId string)(*MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppContentFileId != "" { + urlTplParams["mobileAppContentFile%2Did"] = mobileAppContentFileId + } + return NewMobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesRequestBuilderInternal instantiates a new FilesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesRequestBuilder) { + m := &MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSPkgApp/contentVersions/{mobileAppContent%2Did}/files{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesRequestBuilder instantiates a new FilesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesRequestBuilder) Count()(*MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesCountRequestBuilder) { + return NewMobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of files for this app content version. +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFileCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileCollectionResponseable), nil +} +// Post create new navigation property to files for deviceAppManagement +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, requestConfiguration *MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFileFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable), nil +} +// ToGetRequestInformation the list of files for this app content version. +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to files for deviceAppManagement +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, requestConfiguration *MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesRequestBuilder) { + return NewMobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_content_versions_mobile_app_content_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_content_versions_mobile_app_content_item_request_builder.go new file mode 100644 index 00000000000..ee5552df5bc --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_content_versions_mobile_app_content_item_request_builder.go @@ -0,0 +1,167 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMacOSPkgAppContentVersionsMobileAppContentItemRequestBuilder provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. +type MobileAppsItemGraphMacOSPkgAppContentVersionsMobileAppContentItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMacOSPkgAppContentVersionsMobileAppContentItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSPkgAppContentVersionsMobileAppContentItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphMacOSPkgAppContentVersionsMobileAppContentItemRequestBuilderGetQueryParameters the list of content versions for this app. +type MobileAppsItemGraphMacOSPkgAppContentVersionsMobileAppContentItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphMacOSPkgAppContentVersionsMobileAppContentItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSPkgAppContentVersionsMobileAppContentItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMacOSPkgAppContentVersionsMobileAppContentItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphMacOSPkgAppContentVersionsMobileAppContentItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSPkgAppContentVersionsMobileAppContentItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphMacOSPkgAppContentVersionsMobileAppContentItemRequestBuilderInternal instantiates a new MobileAppContentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSPkgAppContentVersionsMobileAppContentItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSPkgAppContentVersionsMobileAppContentItemRequestBuilder) { + m := &MobileAppsItemGraphMacOSPkgAppContentVersionsMobileAppContentItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSPkgApp/contentVersions/{mobileAppContent%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMacOSPkgAppContentVersionsMobileAppContentItemRequestBuilder instantiates a new MobileAppContentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSPkgAppContentVersionsMobileAppContentItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSPkgAppContentVersionsMobileAppContentItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMacOSPkgAppContentVersionsMobileAppContentItemRequestBuilderInternal(urlParams, requestAdapter) +} +// ContainedApps provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsMobileAppContentItemRequestBuilder) ContainedApps()(*MobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsRequestBuilder) { + return NewMobileAppsItemGraphMacOSPkgAppContentVersionsItemContainedAppsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Delete delete navigation property contentVersions for deviceAppManagement +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsMobileAppContentItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSPkgAppContentVersionsMobileAppContentItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Files provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsMobileAppContentItemRequestBuilder) Files()(*MobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesRequestBuilder) { + return NewMobileAppsItemGraphMacOSPkgAppContentVersionsItemFilesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of content versions for this app. +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsMobileAppContentItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSPkgAppContentVersionsMobileAppContentItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable), nil +} +// Patch update the navigation property contentVersions in deviceAppManagement +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsMobileAppContentItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, requestConfiguration *MobileAppsItemGraphMacOSPkgAppContentVersionsMobileAppContentItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable), nil +} +// ToDeleteRequestInformation delete navigation property contentVersions for deviceAppManagement +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsMobileAppContentItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSPkgAppContentVersionsMobileAppContentItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation the list of content versions for this app. +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsMobileAppContentItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSPkgAppContentVersionsMobileAppContentItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property contentVersions in deviceAppManagement +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsMobileAppContentItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, requestConfiguration *MobileAppsItemGraphMacOSPkgAppContentVersionsMobileAppContentItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsMobileAppContentItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMacOSPkgAppContentVersionsMobileAppContentItemRequestBuilder) { + return NewMobileAppsItemGraphMacOSPkgAppContentVersionsMobileAppContentItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_content_versions_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_content_versions_request_builder.go new file mode 100644 index 00000000000..f7e9bd8ebe6 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_content_versions_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMacOSPkgAppContentVersionsRequestBuilder provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. +type MobileAppsItemGraphMacOSPkgAppContentVersionsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMacOSPkgAppContentVersionsRequestBuilderGetQueryParameters the list of content versions for this app. +type MobileAppsItemGraphMacOSPkgAppContentVersionsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphMacOSPkgAppContentVersionsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSPkgAppContentVersionsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMacOSPkgAppContentVersionsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphMacOSPkgAppContentVersionsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSPkgAppContentVersionsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppContentId provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsRequestBuilder) ByMobileAppContentId(mobileAppContentId string)(*MobileAppsItemGraphMacOSPkgAppContentVersionsMobileAppContentItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppContentId != "" { + urlTplParams["mobileAppContent%2Did"] = mobileAppContentId + } + return NewMobileAppsItemGraphMacOSPkgAppContentVersionsMobileAppContentItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphMacOSPkgAppContentVersionsRequestBuilderInternal instantiates a new ContentVersionsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSPkgAppContentVersionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSPkgAppContentVersionsRequestBuilder) { + m := &MobileAppsItemGraphMacOSPkgAppContentVersionsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSPkgApp/contentVersions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMacOSPkgAppContentVersionsRequestBuilder instantiates a new ContentVersionsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSPkgAppContentVersionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSPkgAppContentVersionsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMacOSPkgAppContentVersionsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsRequestBuilder) Count()(*MobileAppsItemGraphMacOSPkgAppContentVersionsCountRequestBuilder) { + return NewMobileAppsItemGraphMacOSPkgAppContentVersionsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of content versions for this app. +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSPkgAppContentVersionsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentCollectionResponseable), nil +} +// Post create new navigation property to contentVersions for deviceAppManagement +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, requestConfiguration *MobileAppsItemGraphMacOSPkgAppContentVersionsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable), nil +} +// ToGetRequestInformation the list of content versions for this app. +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSPkgAppContentVersionsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to contentVersions for deviceAppManagement +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, requestConfiguration *MobileAppsItemGraphMacOSPkgAppContentVersionsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMacOSPkgAppContentVersionsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMacOSPkgAppContentVersionsRequestBuilder) { + return NewMobileAppsItemGraphMacOSPkgAppContentVersionsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_relationships_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_relationships_count_request_builder.go new file mode 100644 index 00000000000..fc0f776ecc3 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_relationships_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMacOSPkgAppRelationshipsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphMacOSPkgAppRelationshipsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMacOSPkgAppRelationshipsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphMacOSPkgAppRelationshipsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphMacOSPkgAppRelationshipsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSPkgAppRelationshipsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMacOSPkgAppRelationshipsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphMacOSPkgAppRelationshipsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSPkgAppRelationshipsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSPkgAppRelationshipsCountRequestBuilder) { + m := &MobileAppsItemGraphMacOSPkgAppRelationshipsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSPkgApp/relationships/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMacOSPkgAppRelationshipsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSPkgAppRelationshipsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSPkgAppRelationshipsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMacOSPkgAppRelationshipsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphMacOSPkgAppRelationshipsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSPkgAppRelationshipsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphMacOSPkgAppRelationshipsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSPkgAppRelationshipsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMacOSPkgAppRelationshipsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMacOSPkgAppRelationshipsCountRequestBuilder) { + return NewMobileAppsItemGraphMacOSPkgAppRelationshipsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_relationships_mobile_app_relationship_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_relationships_mobile_app_relationship_item_request_builder.go new file mode 100644 index 00000000000..b4cb6cd9b24 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_relationships_mobile_app_relationship_item_request_builder.go @@ -0,0 +1,159 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMacOSPkgAppRelationshipsMobileAppRelationshipItemRequestBuilder provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphMacOSPkgAppRelationshipsMobileAppRelationshipItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMacOSPkgAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSPkgAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphMacOSPkgAppRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters list of relationships for this mobile app. +type MobileAppsItemGraphMacOSPkgAppRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphMacOSPkgAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSPkgAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMacOSPkgAppRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphMacOSPkgAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSPkgAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphMacOSPkgAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal instantiates a new MobileAppRelationshipItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSPkgAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSPkgAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + m := &MobileAppsItemGraphMacOSPkgAppRelationshipsMobileAppRelationshipItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSPkgApp/relationships/{mobileAppRelationship%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMacOSPkgAppRelationshipsMobileAppRelationshipItemRequestBuilder instantiates a new MobileAppRelationshipItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSPkgAppRelationshipsMobileAppRelationshipItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSPkgAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMacOSPkgAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property relationships for deviceAppManagement +func (m *MobileAppsItemGraphMacOSPkgAppRelationshipsMobileAppRelationshipItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSPkgAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get list of relationships for this mobile app. +func (m *MobileAppsItemGraphMacOSPkgAppRelationshipsMobileAppRelationshipItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSPkgAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// Patch update the navigation property relationships in deviceAppManagement +func (m *MobileAppsItemGraphMacOSPkgAppRelationshipsMobileAppRelationshipItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphMacOSPkgAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// ToDeleteRequestInformation delete navigation property relationships for deviceAppManagement +func (m *MobileAppsItemGraphMacOSPkgAppRelationshipsMobileAppRelationshipItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSPkgAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation list of relationships for this mobile app. +func (m *MobileAppsItemGraphMacOSPkgAppRelationshipsMobileAppRelationshipItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSPkgAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property relationships in deviceAppManagement +func (m *MobileAppsItemGraphMacOSPkgAppRelationshipsMobileAppRelationshipItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphMacOSPkgAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMacOSPkgAppRelationshipsMobileAppRelationshipItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMacOSPkgAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + return NewMobileAppsItemGraphMacOSPkgAppRelationshipsMobileAppRelationshipItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_relationships_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_relationships_request_builder.go new file mode 100644 index 00000000000..2c7b0ad7f98 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_relationships_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMacOSPkgAppRelationshipsRequestBuilder provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphMacOSPkgAppRelationshipsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMacOSPkgAppRelationshipsRequestBuilderGetQueryParameters list of relationships for this mobile app. +type MobileAppsItemGraphMacOSPkgAppRelationshipsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphMacOSPkgAppRelationshipsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSPkgAppRelationshipsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMacOSPkgAppRelationshipsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphMacOSPkgAppRelationshipsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMacOSPkgAppRelationshipsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppRelationshipId provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphMacOSPkgAppRelationshipsRequestBuilder) ByMobileAppRelationshipId(mobileAppRelationshipId string)(*MobileAppsItemGraphMacOSPkgAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppRelationshipId != "" { + urlTplParams["mobileAppRelationship%2Did"] = mobileAppRelationshipId + } + return NewMobileAppsItemGraphMacOSPkgAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphMacOSPkgAppRelationshipsRequestBuilderInternal instantiates a new RelationshipsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSPkgAppRelationshipsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSPkgAppRelationshipsRequestBuilder) { + m := &MobileAppsItemGraphMacOSPkgAppRelationshipsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSPkgApp/relationships{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMacOSPkgAppRelationshipsRequestBuilder instantiates a new RelationshipsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMacOSPkgAppRelationshipsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSPkgAppRelationshipsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMacOSPkgAppRelationshipsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphMacOSPkgAppRelationshipsRequestBuilder) Count()(*MobileAppsItemGraphMacOSPkgAppRelationshipsCountRequestBuilder) { + return NewMobileAppsItemGraphMacOSPkgAppRelationshipsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get list of relationships for this mobile app. +func (m *MobileAppsItemGraphMacOSPkgAppRelationshipsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSPkgAppRelationshipsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipCollectionResponseable), nil +} +// Post create new navigation property to relationships for deviceAppManagement +func (m *MobileAppsItemGraphMacOSPkgAppRelationshipsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphMacOSPkgAppRelationshipsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// ToGetRequestInformation list of relationships for this mobile app. +func (m *MobileAppsItemGraphMacOSPkgAppRelationshipsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSPkgAppRelationshipsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to relationships for deviceAppManagement +func (m *MobileAppsItemGraphMacOSPkgAppRelationshipsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphMacOSPkgAppRelationshipsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMacOSPkgAppRelationshipsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMacOSPkgAppRelationshipsRequestBuilder) { + return NewMobileAppsItemGraphMacOSPkgAppRelationshipsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_request_builder.go index 6f07d0b656d..cebdabcc810 100644 --- a/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_request_builder.go +++ b/deviceappmanagement/mobile_apps_item_graph_mac_o_s_pkg_app_request_builder.go @@ -27,6 +27,14 @@ type MobileAppsItemGraphMacOSPkgAppRequestBuilderGetRequestConfiguration struct // Request query parameters QueryParameters *MobileAppsItemGraphMacOSPkgAppRequestBuilderGetQueryParameters } +// Assignments provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphMacOSPkgAppRequestBuilder) Assignments()(*MobileAppsItemGraphMacOSPkgAppAssignmentsRequestBuilder) { + return NewMobileAppsItemGraphMacOSPkgAppAssignmentsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Categories provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphMacOSPkgAppRequestBuilder) Categories()(*MobileAppsItemGraphMacOSPkgAppCategoriesRequestBuilder) { + return NewMobileAppsItemGraphMacOSPkgAppCategoriesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // NewMobileAppsItemGraphMacOSPkgAppRequestBuilderInternal instantiates a new GraphMacOSPkgAppRequestBuilder and sets the default values. func NewMobileAppsItemGraphMacOSPkgAppRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMacOSPkgAppRequestBuilder) { m := &MobileAppsItemGraphMacOSPkgAppRequestBuilder{ @@ -40,6 +48,10 @@ func NewMobileAppsItemGraphMacOSPkgAppRequestBuilder(rawUrl string, requestAdapt urlParams["request-raw-url"] = rawUrl return NewMobileAppsItemGraphMacOSPkgAppRequestBuilderInternal(urlParams, requestAdapter) } +// ContentVersions provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. +func (m *MobileAppsItemGraphMacOSPkgAppRequestBuilder) ContentVersions()(*MobileAppsItemGraphMacOSPkgAppContentVersionsRequestBuilder) { + return NewMobileAppsItemGraphMacOSPkgAppContentVersionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // Get get the item of type microsoft.graph.mobileApp as microsoft.graph.macOSPkgApp func (m *MobileAppsItemGraphMacOSPkgAppRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSPkgAppRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MacOSPkgAppable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); @@ -59,6 +71,10 @@ func (m *MobileAppsItemGraphMacOSPkgAppRequestBuilder) Get(ctx context.Context, } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MacOSPkgAppable), nil } +// Relationships provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphMacOSPkgAppRequestBuilder) Relationships()(*MobileAppsItemGraphMacOSPkgAppRelationshipsRequestBuilder) { + return NewMobileAppsItemGraphMacOSPkgAppRelationshipsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation get the item of type microsoft.graph.mobileApp as microsoft.graph.macOSPkgApp func (m *MobileAppsItemGraphMacOSPkgAppRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMacOSPkgAppRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_assignments_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_assignments_count_request_builder.go new file mode 100644 index 00000000000..c32a7af952a --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_assignments_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphManagedAndroidLobAppAssignmentsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphManagedAndroidLobAppAssignmentsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphManagedAndroidLobAppAssignmentsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphManagedAndroidLobAppAssignmentsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphManagedAndroidLobAppAssignmentsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedAndroidLobAppAssignmentsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphManagedAndroidLobAppAssignmentsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphManagedAndroidLobAppAssignmentsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedAndroidLobAppAssignmentsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedAndroidLobAppAssignmentsCountRequestBuilder) { + m := &MobileAppsItemGraphManagedAndroidLobAppAssignmentsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/assignments/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphManagedAndroidLobAppAssignmentsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedAndroidLobAppAssignmentsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedAndroidLobAppAssignmentsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphManagedAndroidLobAppAssignmentsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphManagedAndroidLobAppAssignmentsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppAssignmentsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphManagedAndroidLobAppAssignmentsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppAssignmentsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphManagedAndroidLobAppAssignmentsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphManagedAndroidLobAppAssignmentsCountRequestBuilder) { + return NewMobileAppsItemGraphManagedAndroidLobAppAssignmentsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_assignments_mobile_app_assignment_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_assignments_mobile_app_assignment_item_request_builder.go new file mode 100644 index 00000000000..b0c613c9e64 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_assignments_mobile_app_assignment_item_request_builder.go @@ -0,0 +1,159 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphManagedAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilder provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphManagedAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphManagedAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphManagedAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters the list of group assignments for this mobile app. +type MobileAppsItemGraphManagedAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphManagedAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphManagedAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphManagedAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphManagedAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + m := &MobileAppsItemGraphManagedAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphManagedAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilder instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphManagedAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property assignments for deviceAppManagement +func (m *MobileAppsItemGraphManagedAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphManagedAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// Patch update the navigation property assignments in deviceAppManagement +func (m *MobileAppsItemGraphManagedAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// ToDeleteRequestInformation delete navigation property assignments for deviceAppManagement +func (m *MobileAppsItemGraphManagedAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphManagedAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property assignments in deviceAppManagement +func (m *MobileAppsItemGraphManagedAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphManagedAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphManagedAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + return NewMobileAppsItemGraphManagedAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_assignments_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_assignments_request_builder.go new file mode 100644 index 00000000000..536c26df194 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_assignments_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphManagedAndroidLobAppAssignmentsRequestBuilder provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphManagedAndroidLobAppAssignmentsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphManagedAndroidLobAppAssignmentsRequestBuilderGetQueryParameters the list of group assignments for this mobile app. +type MobileAppsItemGraphManagedAndroidLobAppAssignmentsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphManagedAndroidLobAppAssignmentsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedAndroidLobAppAssignmentsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphManagedAndroidLobAppAssignmentsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphManagedAndroidLobAppAssignmentsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedAndroidLobAppAssignmentsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppAssignmentId provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphManagedAndroidLobAppAssignmentsRequestBuilder) ByMobileAppAssignmentId(mobileAppAssignmentId string)(*MobileAppsItemGraphManagedAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppAssignmentId != "" { + urlTplParams["mobileAppAssignment%2Did"] = mobileAppAssignmentId + } + return NewMobileAppsItemGraphManagedAndroidLobAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphManagedAndroidLobAppAssignmentsRequestBuilderInternal instantiates a new AssignmentsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedAndroidLobAppAssignmentsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedAndroidLobAppAssignmentsRequestBuilder) { + m := &MobileAppsItemGraphManagedAndroidLobAppAssignmentsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphManagedAndroidLobAppAssignmentsRequestBuilder instantiates a new AssignmentsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedAndroidLobAppAssignmentsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedAndroidLobAppAssignmentsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphManagedAndroidLobAppAssignmentsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphManagedAndroidLobAppAssignmentsRequestBuilder) Count()(*MobileAppsItemGraphManagedAndroidLobAppAssignmentsCountRequestBuilder) { + return NewMobileAppsItemGraphManagedAndroidLobAppAssignmentsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphManagedAndroidLobAppAssignmentsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppAssignmentsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentCollectionResponseable), nil +} +// Post create new navigation property to assignments for deviceAppManagement +func (m *MobileAppsItemGraphManagedAndroidLobAppAssignmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppAssignmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// ToGetRequestInformation the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphManagedAndroidLobAppAssignmentsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppAssignmentsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to assignments for deviceAppManagement +func (m *MobileAppsItemGraphManagedAndroidLobAppAssignmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppAssignmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphManagedAndroidLobAppAssignmentsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphManagedAndroidLobAppAssignmentsRequestBuilder) { + return NewMobileAppsItemGraphManagedAndroidLobAppAssignmentsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_categories_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_categories_count_request_builder.go new file mode 100644 index 00000000000..04588e17322 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_categories_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphManagedAndroidLobAppCategoriesCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphManagedAndroidLobAppCategoriesCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphManagedAndroidLobAppCategoriesCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphManagedAndroidLobAppCategoriesCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphManagedAndroidLobAppCategoriesCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedAndroidLobAppCategoriesCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphManagedAndroidLobAppCategoriesCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphManagedAndroidLobAppCategoriesCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedAndroidLobAppCategoriesCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedAndroidLobAppCategoriesCountRequestBuilder) { + m := &MobileAppsItemGraphManagedAndroidLobAppCategoriesCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/categories/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphManagedAndroidLobAppCategoriesCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedAndroidLobAppCategoriesCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedAndroidLobAppCategoriesCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphManagedAndroidLobAppCategoriesCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphManagedAndroidLobAppCategoriesCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppCategoriesCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphManagedAndroidLobAppCategoriesCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppCategoriesCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphManagedAndroidLobAppCategoriesCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphManagedAndroidLobAppCategoriesCountRequestBuilder) { + return NewMobileAppsItemGraphManagedAndroidLobAppCategoriesCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_categories_mobile_app_category_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_categories_mobile_app_category_item_request_builder.go new file mode 100644 index 00000000000..c0660c02108 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_categories_mobile_app_category_item_request_builder.go @@ -0,0 +1,81 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphManagedAndroidLobAppCategoriesMobileAppCategoryItemRequestBuilder provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphManagedAndroidLobAppCategoriesMobileAppCategoryItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphManagedAndroidLobAppCategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters the list of categories for this app. +type MobileAppsItemGraphManagedAndroidLobAppCategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphManagedAndroidLobAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedAndroidLobAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphManagedAndroidLobAppCategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphManagedAndroidLobAppCategoriesMobileAppCategoryItemRequestBuilderInternal instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedAndroidLobAppCategoriesMobileAppCategoryItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedAndroidLobAppCategoriesMobileAppCategoryItemRequestBuilder) { + m := &MobileAppsItemGraphManagedAndroidLobAppCategoriesMobileAppCategoryItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphManagedAndroidLobAppCategoriesMobileAppCategoryItemRequestBuilder instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedAndroidLobAppCategoriesMobileAppCategoryItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedAndroidLobAppCategoriesMobileAppCategoryItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphManagedAndroidLobAppCategoriesMobileAppCategoryItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get the list of categories for this app. +func (m *MobileAppsItemGraphManagedAndroidLobAppCategoriesMobileAppCategoryItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppCategoryFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryable), nil +} +// ToGetRequestInformation the list of categories for this app. +func (m *MobileAppsItemGraphManagedAndroidLobAppCategoriesMobileAppCategoryItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphManagedAndroidLobAppCategoriesMobileAppCategoryItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphManagedAndroidLobAppCategoriesMobileAppCategoryItemRequestBuilder) { + return NewMobileAppsItemGraphManagedAndroidLobAppCategoriesMobileAppCategoryItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_categories_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_categories_request_builder.go new file mode 100644 index 00000000000..8418730eca3 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_categories_request_builder.go @@ -0,0 +1,108 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphManagedAndroidLobAppCategoriesRequestBuilder provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphManagedAndroidLobAppCategoriesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphManagedAndroidLobAppCategoriesRequestBuilderGetQueryParameters the list of categories for this app. +type MobileAppsItemGraphManagedAndroidLobAppCategoriesRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphManagedAndroidLobAppCategoriesRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedAndroidLobAppCategoriesRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphManagedAndroidLobAppCategoriesRequestBuilderGetQueryParameters +} +// ByMobileAppCategoryId provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphManagedAndroidLobAppCategoriesRequestBuilder) ByMobileAppCategoryId(mobileAppCategoryId string)(*MobileAppsItemGraphManagedAndroidLobAppCategoriesMobileAppCategoryItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppCategoryId != "" { + urlTplParams["mobileAppCategory%2Did"] = mobileAppCategoryId + } + return NewMobileAppsItemGraphManagedAndroidLobAppCategoriesMobileAppCategoryItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphManagedAndroidLobAppCategoriesRequestBuilderInternal instantiates a new CategoriesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedAndroidLobAppCategoriesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedAndroidLobAppCategoriesRequestBuilder) { + m := &MobileAppsItemGraphManagedAndroidLobAppCategoriesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphManagedAndroidLobAppCategoriesRequestBuilder instantiates a new CategoriesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedAndroidLobAppCategoriesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedAndroidLobAppCategoriesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphManagedAndroidLobAppCategoriesRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphManagedAndroidLobAppCategoriesRequestBuilder) Count()(*MobileAppsItemGraphManagedAndroidLobAppCategoriesCountRequestBuilder) { + return NewMobileAppsItemGraphManagedAndroidLobAppCategoriesCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of categories for this app. +func (m *MobileAppsItemGraphManagedAndroidLobAppCategoriesRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppCategoriesRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppCategoryCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryCollectionResponseable), nil +} +// ToGetRequestInformation the list of categories for this app. +func (m *MobileAppsItemGraphManagedAndroidLobAppCategoriesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppCategoriesRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphManagedAndroidLobAppCategoriesRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphManagedAndroidLobAppCategoriesRequestBuilder) { + return NewMobileAppsItemGraphManagedAndroidLobAppCategoriesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_content_versions_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_content_versions_count_request_builder.go new file mode 100644 index 00000000000..62701d06c2d --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_content_versions_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphManagedAndroidLobAppContentVersionsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphManagedAndroidLobAppContentVersionsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphManagedAndroidLobAppContentVersionsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphManagedAndroidLobAppContentVersionsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphManagedAndroidLobAppContentVersionsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedAndroidLobAppContentVersionsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphManagedAndroidLobAppContentVersionsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedAndroidLobAppContentVersionsCountRequestBuilder) { + m := &MobileAppsItemGraphManagedAndroidLobAppContentVersionsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/contentVersions/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedAndroidLobAppContentVersionsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppContentVersionsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppContentVersionsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphManagedAndroidLobAppContentVersionsCountRequestBuilder) { + return NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_content_versions_item_contained_apps_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_content_versions_item_contained_apps_count_request_builder.go new file mode 100644 index 00000000000..29412f7064c --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_content_versions_item_contained_apps_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsCountRequestBuilder) { + m := &MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/contentVersions/{mobileAppContent%2Did}/containedApps/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsCountRequestBuilder) { + return NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_content_versions_item_contained_apps_mobile_contained_app_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_content_versions_item_contained_apps_mobile_contained_app_item_request_builder.go new file mode 100644 index 00000000000..0c0d6609aa7 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_content_versions_item_contained_apps_mobile_contained_app_item_request_builder.go @@ -0,0 +1,159 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. +type MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetQueryParameters the collection of contained apps in a MobileLobApp acting as a package. +type MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderInternal instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) { + m := &MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/contentVersions/{mobileAppContent%2Did}/containedApps/{mobileContainedApp%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property containedApps for deviceAppManagement +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get the collection of contained apps in a MobileLobApp acting as a package. +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileContainedAppFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable), nil +} +// Patch update the navigation property containedApps in deviceAppManagement +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileContainedAppFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable), nil +} +// ToDeleteRequestInformation delete navigation property containedApps for deviceAppManagement +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation the collection of contained apps in a MobileLobApp acting as a package. +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property containedApps in deviceAppManagement +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) { + return NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_content_versions_item_contained_apps_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_content_versions_item_contained_apps_request_builder.go new file mode 100644 index 00000000000..44803ca2d63 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_content_versions_item_contained_apps_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsRequestBuilder provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. +type MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsRequestBuilderGetQueryParameters the collection of contained apps in a MobileLobApp acting as a package. +type MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileContainedAppId provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsRequestBuilder) ByMobileContainedAppId(mobileContainedAppId string)(*MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileContainedAppId != "" { + urlTplParams["mobileContainedApp%2Did"] = mobileContainedAppId + } + return NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsRequestBuilderInternal instantiates a new ContainedAppsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsRequestBuilder) { + m := &MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/contentVersions/{mobileAppContent%2Did}/containedApps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsRequestBuilder instantiates a new ContainedAppsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsRequestBuilder) Count()(*MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsCountRequestBuilder) { + return NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the collection of contained apps in a MobileLobApp acting as a package. +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileContainedAppCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppCollectionResponseable), nil +} +// Post create new navigation property to containedApps for deviceAppManagement +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileContainedAppFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable), nil +} +// ToGetRequestInformation the collection of contained apps in a MobileLobApp acting as a package. +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to containedApps for deviceAppManagement +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsRequestBuilder) { + return NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_content_versions_item_files_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_content_versions_item_files_count_request_builder.go new file mode 100644 index 00000000000..666a4d5a0a2 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_content_versions_item_files_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesCountRequestBuilder) { + m := &MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/contentVersions/{mobileAppContent%2Did}/files/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesCountRequestBuilder) { + return NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_content_versions_item_files_item_commit_post_request_body.go b/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_content_versions_item_files_item_commit_post_request_body.go new file mode 100644 index 00000000000..8009f38bd93 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_content_versions_item_files_item_commit_post_request_body.go @@ -0,0 +1,111 @@ +package deviceappmanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +// MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemCommitPostRequestBody +type MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemCommitPostRequestBody struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemCommitPostRequestBody instantiates a new MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemCommitPostRequestBody and sets the default values. +func NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemCommitPostRequestBody()(*MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemCommitPostRequestBody) { + m := &MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemCommitPostRequestBody{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateMobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemCommitPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemCommitPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemCommitPostRequestBody(), nil +} +// GetAdditionalData gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemCommitPostRequestBody) GetAdditionalData()(map[string]any) { + val , err := m.backingStore.Get("additionalData") + if err != nil { + panic(err) + } + if val == nil { + var value = make(map[string]any); + m.SetAdditionalData(value); + } + return val.(map[string]any) +} +// GetBackingStore gets the backingStore property value. Stores model information. +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemCommitPostRequestBody) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemCommitPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["fileEncryptionInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateFileEncryptionInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetFileEncryptionInfo(val.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable)) + } + return nil + } + return res +} +// GetFileEncryptionInfo gets the fileEncryptionInfo property value. The fileEncryptionInfo property +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemCommitPostRequestBody) GetFileEncryptionInfo()(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable) { + val, err := m.GetBackingStore().Get("fileEncryptionInfo") + if err != nil { + panic(err) + } + if val != nil { + return val.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable) + } + return nil +} +// Serialize serializes information the current object +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemCommitPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("fileEncryptionInfo", m.GetFileEncryptionInfo()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemCommitPostRequestBody) SetAdditionalData(value map[string]any)() { + err := m.GetBackingStore().Set("additionalData", value) + if err != nil { + panic(err) + } +} +// SetBackingStore sets the backingStore property value. Stores model information. +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemCommitPostRequestBody) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetFileEncryptionInfo sets the fileEncryptionInfo property value. The fileEncryptionInfo property +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemCommitPostRequestBody) SetFileEncryptionInfo(value ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable)() { + err := m.GetBackingStore().Set("fileEncryptionInfo", value) + if err != nil { + panic(err) + } +} +// MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemCommitPostRequestBodyable +type MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemCommitPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetFileEncryptionInfo()(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetFileEncryptionInfo(value ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable)() +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_content_versions_item_files_item_commit_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_content_versions_item_files_item_commit_request_builder.go new file mode 100644 index 00000000000..0339e094393 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_content_versions_item_files_item_commit_request_builder.go @@ -0,0 +1,68 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemCommitRequestBuilder provides operations to call the commit method. +type MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemCommitRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemCommitRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemCommitRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemCommitRequestBuilderInternal instantiates a new CommitRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemCommitRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemCommitRequestBuilder) { + m := &MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemCommitRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/commit", pathParameters), + } + return m +} +// NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemCommitRequestBuilder instantiates a new CommitRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemCommitRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemCommitRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemCommitRequestBuilderInternal(urlParams, requestAdapter) +} +// Post commits a file of a given app. +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemCommitRequestBuilder) Post(ctx context.Context, body MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemCommitPostRequestBodyable, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemCommitRequestBuilderPostRequestConfiguration)(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation commits a file of a given app. +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemCommitRequestBuilder) ToPostRequestInformation(ctx context.Context, body MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemCommitPostRequestBodyable, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemCommitRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemCommitRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemCommitRequestBuilder) { + return NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemCommitRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_content_versions_item_files_item_renew_upload_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_content_versions_item_files_item_renew_upload_request_builder.go new file mode 100644 index 00000000000..582ef644af4 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_content_versions_item_files_item_renew_upload_request_builder.go @@ -0,0 +1,64 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder provides operations to call the renewUpload method. +type MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemRenewUploadRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemRenewUploadRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemRenewUploadRequestBuilderInternal instantiates a new RenewUploadRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemRenewUploadRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder) { + m := &MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/renewUpload", pathParameters), + } + return m +} +// NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder instantiates a new RenewUploadRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemRenewUploadRequestBuilderInternal(urlParams, requestAdapter) +} +// Post renews the SAS URI for an application file upload. +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder) Post(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemRenewUploadRequestBuilderPostRequestConfiguration)(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation renews the SAS URI for an application file upload. +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemRenewUploadRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder) { + return NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_content_versions_item_files_mobile_app_content_file_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_content_versions_item_files_mobile_app_content_file_item_request_builder.go new file mode 100644 index 00000000000..876e21e0805 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_content_versions_item_files_mobile_app_content_file_item_request_builder.go @@ -0,0 +1,167 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. +type MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetQueryParameters the list of files for this app content version. +type MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// Commit provides operations to call the commit method. +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) Commit()(*MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemCommitRequestBuilder) { + return NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemCommitRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderInternal instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) { + m := &MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property files for deviceAppManagement +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get the list of files for this app content version. +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFileFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable), nil +} +// Patch update the navigation property files in deviceAppManagement +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFileFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable), nil +} +// RenewUpload provides operations to call the renewUpload method. +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) RenewUpload()(*MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder) { + return NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesItemRenewUploadRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToDeleteRequestInformation delete navigation property files for deviceAppManagement +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation the list of files for this app content version. +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property files in deviceAppManagement +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) { + return NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_content_versions_item_files_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_content_versions_item_files_request_builder.go new file mode 100644 index 00000000000..7158b24848b --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_content_versions_item_files_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesRequestBuilder provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. +type MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesRequestBuilderGetQueryParameters the list of files for this app content version. +type MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppContentFileId provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesRequestBuilder) ByMobileAppContentFileId(mobileAppContentFileId string)(*MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppContentFileId != "" { + urlTplParams["mobileAppContentFile%2Did"] = mobileAppContentFileId + } + return NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesRequestBuilderInternal instantiates a new FilesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesRequestBuilder) { + m := &MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/contentVersions/{mobileAppContent%2Did}/files{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesRequestBuilder instantiates a new FilesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesRequestBuilder) Count()(*MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesCountRequestBuilder) { + return NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of files for this app content version. +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFileCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileCollectionResponseable), nil +} +// Post create new navigation property to files for deviceAppManagement +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFileFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable), nil +} +// ToGetRequestInformation the list of files for this app content version. +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to files for deviceAppManagement +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesRequestBuilder) { + return NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_content_versions_mobile_app_content_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_content_versions_mobile_app_content_item_request_builder.go new file mode 100644 index 00000000000..776cf37791c --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_content_versions_mobile_app_content_item_request_builder.go @@ -0,0 +1,167 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphManagedAndroidLobAppContentVersionsMobileAppContentItemRequestBuilder provides operations to manage the contentVersions property of the microsoft.graph.managedMobileLobApp entity. +type MobileAppsItemGraphManagedAndroidLobAppContentVersionsMobileAppContentItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphManagedAndroidLobAppContentVersionsMobileAppContentItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedAndroidLobAppContentVersionsMobileAppContentItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphManagedAndroidLobAppContentVersionsMobileAppContentItemRequestBuilderGetQueryParameters the list of content versions for this app. +type MobileAppsItemGraphManagedAndroidLobAppContentVersionsMobileAppContentItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphManagedAndroidLobAppContentVersionsMobileAppContentItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedAndroidLobAppContentVersionsMobileAppContentItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphManagedAndroidLobAppContentVersionsMobileAppContentItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphManagedAndroidLobAppContentVersionsMobileAppContentItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedAndroidLobAppContentVersionsMobileAppContentItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsMobileAppContentItemRequestBuilderInternal instantiates a new MobileAppContentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsMobileAppContentItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedAndroidLobAppContentVersionsMobileAppContentItemRequestBuilder) { + m := &MobileAppsItemGraphManagedAndroidLobAppContentVersionsMobileAppContentItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/contentVersions/{mobileAppContent%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsMobileAppContentItemRequestBuilder instantiates a new MobileAppContentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsMobileAppContentItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedAndroidLobAppContentVersionsMobileAppContentItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsMobileAppContentItemRequestBuilderInternal(urlParams, requestAdapter) +} +// ContainedApps provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsMobileAppContentItemRequestBuilder) ContainedApps()(*MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsRequestBuilder) { + return NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsItemContainedAppsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Delete delete navigation property contentVersions for deviceAppManagement +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsMobileAppContentItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppContentVersionsMobileAppContentItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Files provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsMobileAppContentItemRequestBuilder) Files()(*MobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesRequestBuilder) { + return NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsItemFilesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of content versions for this app. +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsMobileAppContentItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppContentVersionsMobileAppContentItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable), nil +} +// Patch update the navigation property contentVersions in deviceAppManagement +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsMobileAppContentItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppContentVersionsMobileAppContentItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable), nil +} +// ToDeleteRequestInformation delete navigation property contentVersions for deviceAppManagement +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsMobileAppContentItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppContentVersionsMobileAppContentItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation the list of content versions for this app. +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsMobileAppContentItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppContentVersionsMobileAppContentItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property contentVersions in deviceAppManagement +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsMobileAppContentItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppContentVersionsMobileAppContentItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsMobileAppContentItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphManagedAndroidLobAppContentVersionsMobileAppContentItemRequestBuilder) { + return NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsMobileAppContentItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_content_versions_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_content_versions_request_builder.go new file mode 100644 index 00000000000..d534401a1e3 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_content_versions_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphManagedAndroidLobAppContentVersionsRequestBuilder provides operations to manage the contentVersions property of the microsoft.graph.managedMobileLobApp entity. +type MobileAppsItemGraphManagedAndroidLobAppContentVersionsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphManagedAndroidLobAppContentVersionsRequestBuilderGetQueryParameters the list of content versions for this app. +type MobileAppsItemGraphManagedAndroidLobAppContentVersionsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphManagedAndroidLobAppContentVersionsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedAndroidLobAppContentVersionsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphManagedAndroidLobAppContentVersionsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphManagedAndroidLobAppContentVersionsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedAndroidLobAppContentVersionsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppContentId provides operations to manage the contentVersions property of the microsoft.graph.managedMobileLobApp entity. +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsRequestBuilder) ByMobileAppContentId(mobileAppContentId string)(*MobileAppsItemGraphManagedAndroidLobAppContentVersionsMobileAppContentItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppContentId != "" { + urlTplParams["mobileAppContent%2Did"] = mobileAppContentId + } + return NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsMobileAppContentItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsRequestBuilderInternal instantiates a new ContentVersionsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedAndroidLobAppContentVersionsRequestBuilder) { + m := &MobileAppsItemGraphManagedAndroidLobAppContentVersionsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/contentVersions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsRequestBuilder instantiates a new ContentVersionsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedAndroidLobAppContentVersionsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsRequestBuilder) Count()(*MobileAppsItemGraphManagedAndroidLobAppContentVersionsCountRequestBuilder) { + return NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of content versions for this app. +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppContentVersionsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentCollectionResponseable), nil +} +// Post create new navigation property to contentVersions for deviceAppManagement +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppContentVersionsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable), nil +} +// ToGetRequestInformation the list of content versions for this app. +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppContentVersionsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to contentVersions for deviceAppManagement +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppContentVersionsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphManagedAndroidLobAppContentVersionsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphManagedAndroidLobAppContentVersionsRequestBuilder) { + return NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_relationships_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_relationships_count_request_builder.go new file mode 100644 index 00000000000..9bb061a9023 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_relationships_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphManagedAndroidLobAppRelationshipsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphManagedAndroidLobAppRelationshipsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphManagedAndroidLobAppRelationshipsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphManagedAndroidLobAppRelationshipsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphManagedAndroidLobAppRelationshipsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedAndroidLobAppRelationshipsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphManagedAndroidLobAppRelationshipsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphManagedAndroidLobAppRelationshipsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedAndroidLobAppRelationshipsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedAndroidLobAppRelationshipsCountRequestBuilder) { + m := &MobileAppsItemGraphManagedAndroidLobAppRelationshipsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/relationships/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphManagedAndroidLobAppRelationshipsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedAndroidLobAppRelationshipsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedAndroidLobAppRelationshipsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphManagedAndroidLobAppRelationshipsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphManagedAndroidLobAppRelationshipsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppRelationshipsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphManagedAndroidLobAppRelationshipsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppRelationshipsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphManagedAndroidLobAppRelationshipsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphManagedAndroidLobAppRelationshipsCountRequestBuilder) { + return NewMobileAppsItemGraphManagedAndroidLobAppRelationshipsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_relationships_mobile_app_relationship_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_relationships_mobile_app_relationship_item_request_builder.go new file mode 100644 index 00000000000..e48b540a4a4 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_relationships_mobile_app_relationship_item_request_builder.go @@ -0,0 +1,159 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphManagedAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilder provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphManagedAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphManagedAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphManagedAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters list of relationships for this mobile app. +type MobileAppsItemGraphManagedAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphManagedAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphManagedAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphManagedAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphManagedAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal instantiates a new MobileAppRelationshipItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + m := &MobileAppsItemGraphManagedAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/relationships/{mobileAppRelationship%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphManagedAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilder instantiates a new MobileAppRelationshipItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphManagedAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property relationships for deviceAppManagement +func (m *MobileAppsItemGraphManagedAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get list of relationships for this mobile app. +func (m *MobileAppsItemGraphManagedAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// Patch update the navigation property relationships in deviceAppManagement +func (m *MobileAppsItemGraphManagedAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// ToDeleteRequestInformation delete navigation property relationships for deviceAppManagement +func (m *MobileAppsItemGraphManagedAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation list of relationships for this mobile app. +func (m *MobileAppsItemGraphManagedAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property relationships in deviceAppManagement +func (m *MobileAppsItemGraphManagedAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphManagedAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphManagedAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + return NewMobileAppsItemGraphManagedAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_relationships_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_relationships_request_builder.go new file mode 100644 index 00000000000..e1497bb49cd --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_relationships_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphManagedAndroidLobAppRelationshipsRequestBuilder provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphManagedAndroidLobAppRelationshipsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphManagedAndroidLobAppRelationshipsRequestBuilderGetQueryParameters list of relationships for this mobile app. +type MobileAppsItemGraphManagedAndroidLobAppRelationshipsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphManagedAndroidLobAppRelationshipsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedAndroidLobAppRelationshipsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphManagedAndroidLobAppRelationshipsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphManagedAndroidLobAppRelationshipsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedAndroidLobAppRelationshipsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppRelationshipId provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphManagedAndroidLobAppRelationshipsRequestBuilder) ByMobileAppRelationshipId(mobileAppRelationshipId string)(*MobileAppsItemGraphManagedAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppRelationshipId != "" { + urlTplParams["mobileAppRelationship%2Did"] = mobileAppRelationshipId + } + return NewMobileAppsItemGraphManagedAndroidLobAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphManagedAndroidLobAppRelationshipsRequestBuilderInternal instantiates a new RelationshipsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedAndroidLobAppRelationshipsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedAndroidLobAppRelationshipsRequestBuilder) { + m := &MobileAppsItemGraphManagedAndroidLobAppRelationshipsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/relationships{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphManagedAndroidLobAppRelationshipsRequestBuilder instantiates a new RelationshipsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedAndroidLobAppRelationshipsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedAndroidLobAppRelationshipsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphManagedAndroidLobAppRelationshipsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphManagedAndroidLobAppRelationshipsRequestBuilder) Count()(*MobileAppsItemGraphManagedAndroidLobAppRelationshipsCountRequestBuilder) { + return NewMobileAppsItemGraphManagedAndroidLobAppRelationshipsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get list of relationships for this mobile app. +func (m *MobileAppsItemGraphManagedAndroidLobAppRelationshipsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppRelationshipsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipCollectionResponseable), nil +} +// Post create new navigation property to relationships for deviceAppManagement +func (m *MobileAppsItemGraphManagedAndroidLobAppRelationshipsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppRelationshipsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// ToGetRequestInformation list of relationships for this mobile app. +func (m *MobileAppsItemGraphManagedAndroidLobAppRelationshipsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppRelationshipsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to relationships for deviceAppManagement +func (m *MobileAppsItemGraphManagedAndroidLobAppRelationshipsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppRelationshipsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphManagedAndroidLobAppRelationshipsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphManagedAndroidLobAppRelationshipsRequestBuilder) { + return NewMobileAppsItemGraphManagedAndroidLobAppRelationshipsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_request_builder.go index 4fbd427adfc..d8c76a728e6 100644 --- a/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_request_builder.go +++ b/deviceappmanagement/mobile_apps_item_graph_managed_android_lob_app_request_builder.go @@ -27,6 +27,14 @@ type MobileAppsItemGraphManagedAndroidLobAppRequestBuilderGetRequestConfiguratio // Request query parameters QueryParameters *MobileAppsItemGraphManagedAndroidLobAppRequestBuilderGetQueryParameters } +// Assignments provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphManagedAndroidLobAppRequestBuilder) Assignments()(*MobileAppsItemGraphManagedAndroidLobAppAssignmentsRequestBuilder) { + return NewMobileAppsItemGraphManagedAndroidLobAppAssignmentsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Categories provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphManagedAndroidLobAppRequestBuilder) Categories()(*MobileAppsItemGraphManagedAndroidLobAppCategoriesRequestBuilder) { + return NewMobileAppsItemGraphManagedAndroidLobAppCategoriesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // NewMobileAppsItemGraphManagedAndroidLobAppRequestBuilderInternal instantiates a new GraphManagedAndroidLobAppRequestBuilder and sets the default values. func NewMobileAppsItemGraphManagedAndroidLobAppRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedAndroidLobAppRequestBuilder) { m := &MobileAppsItemGraphManagedAndroidLobAppRequestBuilder{ @@ -40,6 +48,10 @@ func NewMobileAppsItemGraphManagedAndroidLobAppRequestBuilder(rawUrl string, req urlParams["request-raw-url"] = rawUrl return NewMobileAppsItemGraphManagedAndroidLobAppRequestBuilderInternal(urlParams, requestAdapter) } +// ContentVersions provides operations to manage the contentVersions property of the microsoft.graph.managedMobileLobApp entity. +func (m *MobileAppsItemGraphManagedAndroidLobAppRequestBuilder) ContentVersions()(*MobileAppsItemGraphManagedAndroidLobAppContentVersionsRequestBuilder) { + return NewMobileAppsItemGraphManagedAndroidLobAppContentVersionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // Get get the item of type microsoft.graph.mobileApp as microsoft.graph.managedAndroidLobApp func (m *MobileAppsItemGraphManagedAndroidLobAppRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ManagedAndroidLobAppable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); @@ -59,6 +71,10 @@ func (m *MobileAppsItemGraphManagedAndroidLobAppRequestBuilder) Get(ctx context. } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ManagedAndroidLobAppable), nil } +// Relationships provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphManagedAndroidLobAppRequestBuilder) Relationships()(*MobileAppsItemGraphManagedAndroidLobAppRelationshipsRequestBuilder) { + return NewMobileAppsItemGraphManagedAndroidLobAppRelationshipsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation get the item of type microsoft.graph.mobileApp as microsoft.graph.managedAndroidLobApp func (m *MobileAppsItemGraphManagedAndroidLobAppRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedAndroidLobAppRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_assignments_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_assignments_count_request_builder.go new file mode 100644 index 00000000000..405fe078c92 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_assignments_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphManagedIOSLobAppAssignmentsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphManagedIOSLobAppAssignmentsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphManagedIOSLobAppAssignmentsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphManagedIOSLobAppAssignmentsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphManagedIOSLobAppAssignmentsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedIOSLobAppAssignmentsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphManagedIOSLobAppAssignmentsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphManagedIOSLobAppAssignmentsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedIOSLobAppAssignmentsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedIOSLobAppAssignmentsCountRequestBuilder) { + m := &MobileAppsItemGraphManagedIOSLobAppAssignmentsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/assignments/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphManagedIOSLobAppAssignmentsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedIOSLobAppAssignmentsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedIOSLobAppAssignmentsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphManagedIOSLobAppAssignmentsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphManagedIOSLobAppAssignmentsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppAssignmentsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphManagedIOSLobAppAssignmentsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppAssignmentsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphManagedIOSLobAppAssignmentsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphManagedIOSLobAppAssignmentsCountRequestBuilder) { + return NewMobileAppsItemGraphManagedIOSLobAppAssignmentsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_assignments_mobile_app_assignment_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_assignments_mobile_app_assignment_item_request_builder.go new file mode 100644 index 00000000000..a248513b44d --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_assignments_mobile_app_assignment_item_request_builder.go @@ -0,0 +1,159 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphManagedIOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilder provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphManagedIOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphManagedIOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedIOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphManagedIOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters the list of group assignments for this mobile app. +type MobileAppsItemGraphManagedIOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphManagedIOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedIOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphManagedIOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphManagedIOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedIOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphManagedIOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedIOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedIOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + m := &MobileAppsItemGraphManagedIOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphManagedIOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilder instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedIOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedIOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphManagedIOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property assignments for deviceAppManagement +func (m *MobileAppsItemGraphManagedIOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphManagedIOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// Patch update the navigation property assignments in deviceAppManagement +func (m *MobileAppsItemGraphManagedIOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// ToDeleteRequestInformation delete navigation property assignments for deviceAppManagement +func (m *MobileAppsItemGraphManagedIOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphManagedIOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property assignments in deviceAppManagement +func (m *MobileAppsItemGraphManagedIOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphManagedIOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphManagedIOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + return NewMobileAppsItemGraphManagedIOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_assignments_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_assignments_request_builder.go new file mode 100644 index 00000000000..35c13f6fb65 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_assignments_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphManagedIOSLobAppAssignmentsRequestBuilder provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphManagedIOSLobAppAssignmentsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphManagedIOSLobAppAssignmentsRequestBuilderGetQueryParameters the list of group assignments for this mobile app. +type MobileAppsItemGraphManagedIOSLobAppAssignmentsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphManagedIOSLobAppAssignmentsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedIOSLobAppAssignmentsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphManagedIOSLobAppAssignmentsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphManagedIOSLobAppAssignmentsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedIOSLobAppAssignmentsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppAssignmentId provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphManagedIOSLobAppAssignmentsRequestBuilder) ByMobileAppAssignmentId(mobileAppAssignmentId string)(*MobileAppsItemGraphManagedIOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppAssignmentId != "" { + urlTplParams["mobileAppAssignment%2Did"] = mobileAppAssignmentId + } + return NewMobileAppsItemGraphManagedIOSLobAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphManagedIOSLobAppAssignmentsRequestBuilderInternal instantiates a new AssignmentsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedIOSLobAppAssignmentsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedIOSLobAppAssignmentsRequestBuilder) { + m := &MobileAppsItemGraphManagedIOSLobAppAssignmentsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphManagedIOSLobAppAssignmentsRequestBuilder instantiates a new AssignmentsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedIOSLobAppAssignmentsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedIOSLobAppAssignmentsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphManagedIOSLobAppAssignmentsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphManagedIOSLobAppAssignmentsRequestBuilder) Count()(*MobileAppsItemGraphManagedIOSLobAppAssignmentsCountRequestBuilder) { + return NewMobileAppsItemGraphManagedIOSLobAppAssignmentsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphManagedIOSLobAppAssignmentsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppAssignmentsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentCollectionResponseable), nil +} +// Post create new navigation property to assignments for deviceAppManagement +func (m *MobileAppsItemGraphManagedIOSLobAppAssignmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppAssignmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// ToGetRequestInformation the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphManagedIOSLobAppAssignmentsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppAssignmentsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to assignments for deviceAppManagement +func (m *MobileAppsItemGraphManagedIOSLobAppAssignmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppAssignmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphManagedIOSLobAppAssignmentsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphManagedIOSLobAppAssignmentsRequestBuilder) { + return NewMobileAppsItemGraphManagedIOSLobAppAssignmentsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_categories_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_categories_count_request_builder.go new file mode 100644 index 00000000000..0e9330b1765 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_categories_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphManagedIOSLobAppCategoriesCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphManagedIOSLobAppCategoriesCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphManagedIOSLobAppCategoriesCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphManagedIOSLobAppCategoriesCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphManagedIOSLobAppCategoriesCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedIOSLobAppCategoriesCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphManagedIOSLobAppCategoriesCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphManagedIOSLobAppCategoriesCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedIOSLobAppCategoriesCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedIOSLobAppCategoriesCountRequestBuilder) { + m := &MobileAppsItemGraphManagedIOSLobAppCategoriesCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/categories/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphManagedIOSLobAppCategoriesCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedIOSLobAppCategoriesCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedIOSLobAppCategoriesCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphManagedIOSLobAppCategoriesCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphManagedIOSLobAppCategoriesCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppCategoriesCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphManagedIOSLobAppCategoriesCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppCategoriesCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphManagedIOSLobAppCategoriesCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphManagedIOSLobAppCategoriesCountRequestBuilder) { + return NewMobileAppsItemGraphManagedIOSLobAppCategoriesCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_categories_mobile_app_category_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_categories_mobile_app_category_item_request_builder.go new file mode 100644 index 00000000000..3ab94ed9502 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_categories_mobile_app_category_item_request_builder.go @@ -0,0 +1,81 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphManagedIOSLobAppCategoriesMobileAppCategoryItemRequestBuilder provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphManagedIOSLobAppCategoriesMobileAppCategoryItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphManagedIOSLobAppCategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters the list of categories for this app. +type MobileAppsItemGraphManagedIOSLobAppCategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphManagedIOSLobAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedIOSLobAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphManagedIOSLobAppCategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphManagedIOSLobAppCategoriesMobileAppCategoryItemRequestBuilderInternal instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedIOSLobAppCategoriesMobileAppCategoryItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedIOSLobAppCategoriesMobileAppCategoryItemRequestBuilder) { + m := &MobileAppsItemGraphManagedIOSLobAppCategoriesMobileAppCategoryItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphManagedIOSLobAppCategoriesMobileAppCategoryItemRequestBuilder instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedIOSLobAppCategoriesMobileAppCategoryItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedIOSLobAppCategoriesMobileAppCategoryItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphManagedIOSLobAppCategoriesMobileAppCategoryItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get the list of categories for this app. +func (m *MobileAppsItemGraphManagedIOSLobAppCategoriesMobileAppCategoryItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppCategoryFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryable), nil +} +// ToGetRequestInformation the list of categories for this app. +func (m *MobileAppsItemGraphManagedIOSLobAppCategoriesMobileAppCategoryItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphManagedIOSLobAppCategoriesMobileAppCategoryItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphManagedIOSLobAppCategoriesMobileAppCategoryItemRequestBuilder) { + return NewMobileAppsItemGraphManagedIOSLobAppCategoriesMobileAppCategoryItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_categories_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_categories_request_builder.go new file mode 100644 index 00000000000..fc1aa0fb2d8 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_categories_request_builder.go @@ -0,0 +1,108 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphManagedIOSLobAppCategoriesRequestBuilder provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphManagedIOSLobAppCategoriesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphManagedIOSLobAppCategoriesRequestBuilderGetQueryParameters the list of categories for this app. +type MobileAppsItemGraphManagedIOSLobAppCategoriesRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphManagedIOSLobAppCategoriesRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedIOSLobAppCategoriesRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphManagedIOSLobAppCategoriesRequestBuilderGetQueryParameters +} +// ByMobileAppCategoryId provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphManagedIOSLobAppCategoriesRequestBuilder) ByMobileAppCategoryId(mobileAppCategoryId string)(*MobileAppsItemGraphManagedIOSLobAppCategoriesMobileAppCategoryItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppCategoryId != "" { + urlTplParams["mobileAppCategory%2Did"] = mobileAppCategoryId + } + return NewMobileAppsItemGraphManagedIOSLobAppCategoriesMobileAppCategoryItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphManagedIOSLobAppCategoriesRequestBuilderInternal instantiates a new CategoriesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedIOSLobAppCategoriesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedIOSLobAppCategoriesRequestBuilder) { + m := &MobileAppsItemGraphManagedIOSLobAppCategoriesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphManagedIOSLobAppCategoriesRequestBuilder instantiates a new CategoriesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedIOSLobAppCategoriesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedIOSLobAppCategoriesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphManagedIOSLobAppCategoriesRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphManagedIOSLobAppCategoriesRequestBuilder) Count()(*MobileAppsItemGraphManagedIOSLobAppCategoriesCountRequestBuilder) { + return NewMobileAppsItemGraphManagedIOSLobAppCategoriesCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of categories for this app. +func (m *MobileAppsItemGraphManagedIOSLobAppCategoriesRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppCategoriesRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppCategoryCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryCollectionResponseable), nil +} +// ToGetRequestInformation the list of categories for this app. +func (m *MobileAppsItemGraphManagedIOSLobAppCategoriesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppCategoriesRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphManagedIOSLobAppCategoriesRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphManagedIOSLobAppCategoriesRequestBuilder) { + return NewMobileAppsItemGraphManagedIOSLobAppCategoriesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_content_versions_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_content_versions_count_request_builder.go new file mode 100644 index 00000000000..c7d335bf6ae --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_content_versions_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphManagedIOSLobAppContentVersionsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphManagedIOSLobAppContentVersionsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphManagedIOSLobAppContentVersionsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphManagedIOSLobAppContentVersionsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphManagedIOSLobAppContentVersionsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedIOSLobAppContentVersionsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphManagedIOSLobAppContentVersionsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphManagedIOSLobAppContentVersionsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedIOSLobAppContentVersionsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedIOSLobAppContentVersionsCountRequestBuilder) { + m := &MobileAppsItemGraphManagedIOSLobAppContentVersionsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/contentVersions/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphManagedIOSLobAppContentVersionsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedIOSLobAppContentVersionsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedIOSLobAppContentVersionsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphManagedIOSLobAppContentVersionsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppContentVersionsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppContentVersionsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphManagedIOSLobAppContentVersionsCountRequestBuilder) { + return NewMobileAppsItemGraphManagedIOSLobAppContentVersionsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_content_versions_item_contained_apps_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_content_versions_item_contained_apps_count_request_builder.go new file mode 100644 index 00000000000..64302585e89 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_content_versions_item_contained_apps_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsCountRequestBuilder) { + m := &MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/contentVersions/{mobileAppContent%2Did}/containedApps/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsCountRequestBuilder) { + return NewMobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_content_versions_item_contained_apps_mobile_contained_app_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_content_versions_item_contained_apps_mobile_contained_app_item_request_builder.go new file mode 100644 index 00000000000..a33510934be --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_content_versions_item_contained_apps_mobile_contained_app_item_request_builder.go @@ -0,0 +1,159 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. +type MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetQueryParameters the collection of contained apps in a MobileLobApp acting as a package. +type MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderInternal instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) { + m := &MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/contentVersions/{mobileAppContent%2Did}/containedApps/{mobileContainedApp%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property containedApps for deviceAppManagement +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get the collection of contained apps in a MobileLobApp acting as a package. +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileContainedAppFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable), nil +} +// Patch update the navigation property containedApps in deviceAppManagement +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileContainedAppFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable), nil +} +// ToDeleteRequestInformation delete navigation property containedApps for deviceAppManagement +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation the collection of contained apps in a MobileLobApp acting as a package. +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property containedApps in deviceAppManagement +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) { + return NewMobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_content_versions_item_contained_apps_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_content_versions_item_contained_apps_request_builder.go new file mode 100644 index 00000000000..29a3c231a63 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_content_versions_item_contained_apps_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsRequestBuilder provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. +type MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsRequestBuilderGetQueryParameters the collection of contained apps in a MobileLobApp acting as a package. +type MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileContainedAppId provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsRequestBuilder) ByMobileContainedAppId(mobileContainedAppId string)(*MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileContainedAppId != "" { + urlTplParams["mobileContainedApp%2Did"] = mobileContainedAppId + } + return NewMobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsRequestBuilderInternal instantiates a new ContainedAppsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsRequestBuilder) { + m := &MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/contentVersions/{mobileAppContent%2Did}/containedApps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsRequestBuilder instantiates a new ContainedAppsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsRequestBuilder) Count()(*MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsCountRequestBuilder) { + return NewMobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the collection of contained apps in a MobileLobApp acting as a package. +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileContainedAppCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppCollectionResponseable), nil +} +// Post create new navigation property to containedApps for deviceAppManagement +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileContainedAppFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable), nil +} +// ToGetRequestInformation the collection of contained apps in a MobileLobApp acting as a package. +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to containedApps for deviceAppManagement +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsRequestBuilder) { + return NewMobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_content_versions_item_files_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_content_versions_item_files_count_request_builder.go new file mode 100644 index 00000000000..667ff86ef4a --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_content_versions_item_files_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesCountRequestBuilder) { + m := &MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/contentVersions/{mobileAppContent%2Did}/files/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesCountRequestBuilder) { + return NewMobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_content_versions_item_files_item_commit_post_request_body.go b/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_content_versions_item_files_item_commit_post_request_body.go new file mode 100644 index 00000000000..c363a750831 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_content_versions_item_files_item_commit_post_request_body.go @@ -0,0 +1,111 @@ +package deviceappmanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +// MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemCommitPostRequestBody +type MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemCommitPostRequestBody struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewMobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemCommitPostRequestBody instantiates a new MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemCommitPostRequestBody and sets the default values. +func NewMobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemCommitPostRequestBody()(*MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemCommitPostRequestBody) { + m := &MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemCommitPostRequestBody{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateMobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemCommitPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemCommitPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemCommitPostRequestBody(), nil +} +// GetAdditionalData gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemCommitPostRequestBody) GetAdditionalData()(map[string]any) { + val , err := m.backingStore.Get("additionalData") + if err != nil { + panic(err) + } + if val == nil { + var value = make(map[string]any); + m.SetAdditionalData(value); + } + return val.(map[string]any) +} +// GetBackingStore gets the backingStore property value. Stores model information. +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemCommitPostRequestBody) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemCommitPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["fileEncryptionInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateFileEncryptionInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetFileEncryptionInfo(val.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable)) + } + return nil + } + return res +} +// GetFileEncryptionInfo gets the fileEncryptionInfo property value. The fileEncryptionInfo property +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemCommitPostRequestBody) GetFileEncryptionInfo()(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable) { + val, err := m.GetBackingStore().Get("fileEncryptionInfo") + if err != nil { + panic(err) + } + if val != nil { + return val.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable) + } + return nil +} +// Serialize serializes information the current object +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemCommitPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("fileEncryptionInfo", m.GetFileEncryptionInfo()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemCommitPostRequestBody) SetAdditionalData(value map[string]any)() { + err := m.GetBackingStore().Set("additionalData", value) + if err != nil { + panic(err) + } +} +// SetBackingStore sets the backingStore property value. Stores model information. +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemCommitPostRequestBody) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetFileEncryptionInfo sets the fileEncryptionInfo property value. The fileEncryptionInfo property +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemCommitPostRequestBody) SetFileEncryptionInfo(value ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable)() { + err := m.GetBackingStore().Set("fileEncryptionInfo", value) + if err != nil { + panic(err) + } +} +// MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemCommitPostRequestBodyable +type MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemCommitPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetFileEncryptionInfo()(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetFileEncryptionInfo(value ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable)() +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_content_versions_item_files_item_commit_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_content_versions_item_files_item_commit_request_builder.go new file mode 100644 index 00000000000..52ee434e458 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_content_versions_item_files_item_commit_request_builder.go @@ -0,0 +1,68 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemCommitRequestBuilder provides operations to call the commit method. +type MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemCommitRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemCommitRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemCommitRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemCommitRequestBuilderInternal instantiates a new CommitRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemCommitRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemCommitRequestBuilder) { + m := &MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemCommitRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/commit", pathParameters), + } + return m +} +// NewMobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemCommitRequestBuilder instantiates a new CommitRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemCommitRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemCommitRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemCommitRequestBuilderInternal(urlParams, requestAdapter) +} +// Post commits a file of a given app. +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemCommitRequestBuilder) Post(ctx context.Context, body MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemCommitPostRequestBodyable, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemCommitRequestBuilderPostRequestConfiguration)(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation commits a file of a given app. +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemCommitRequestBuilder) ToPostRequestInformation(ctx context.Context, body MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemCommitPostRequestBodyable, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemCommitRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemCommitRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemCommitRequestBuilder) { + return NewMobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemCommitRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_content_versions_item_files_item_renew_upload_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_content_versions_item_files_item_renew_upload_request_builder.go new file mode 100644 index 00000000000..a275f964aab --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_content_versions_item_files_item_renew_upload_request_builder.go @@ -0,0 +1,64 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder provides operations to call the renewUpload method. +type MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemRenewUploadRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemRenewUploadRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemRenewUploadRequestBuilderInternal instantiates a new RenewUploadRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemRenewUploadRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder) { + m := &MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/renewUpload", pathParameters), + } + return m +} +// NewMobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder instantiates a new RenewUploadRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemRenewUploadRequestBuilderInternal(urlParams, requestAdapter) +} +// Post renews the SAS URI for an application file upload. +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder) Post(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemRenewUploadRequestBuilderPostRequestConfiguration)(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation renews the SAS URI for an application file upload. +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemRenewUploadRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder) { + return NewMobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_content_versions_item_files_mobile_app_content_file_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_content_versions_item_files_mobile_app_content_file_item_request_builder.go new file mode 100644 index 00000000000..a4950cce9b9 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_content_versions_item_files_mobile_app_content_file_item_request_builder.go @@ -0,0 +1,167 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. +type MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetQueryParameters the list of files for this app content version. +type MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// Commit provides operations to call the commit method. +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) Commit()(*MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemCommitRequestBuilder) { + return NewMobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemCommitRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderInternal instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) { + m := &MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property files for deviceAppManagement +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get the list of files for this app content version. +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFileFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable), nil +} +// Patch update the navigation property files in deviceAppManagement +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFileFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable), nil +} +// RenewUpload provides operations to call the renewUpload method. +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) RenewUpload()(*MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder) { + return NewMobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesItemRenewUploadRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToDeleteRequestInformation delete navigation property files for deviceAppManagement +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation the list of files for this app content version. +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property files in deviceAppManagement +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) { + return NewMobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_content_versions_item_files_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_content_versions_item_files_request_builder.go new file mode 100644 index 00000000000..33b4c7607ad --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_content_versions_item_files_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesRequestBuilder provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. +type MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesRequestBuilderGetQueryParameters the list of files for this app content version. +type MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppContentFileId provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesRequestBuilder) ByMobileAppContentFileId(mobileAppContentFileId string)(*MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppContentFileId != "" { + urlTplParams["mobileAppContentFile%2Did"] = mobileAppContentFileId + } + return NewMobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesRequestBuilderInternal instantiates a new FilesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesRequestBuilder) { + m := &MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/contentVersions/{mobileAppContent%2Did}/files{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesRequestBuilder instantiates a new FilesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesRequestBuilder) Count()(*MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesCountRequestBuilder) { + return NewMobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of files for this app content version. +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFileCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileCollectionResponseable), nil +} +// Post create new navigation property to files for deviceAppManagement +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFileFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable), nil +} +// ToGetRequestInformation the list of files for this app content version. +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to files for deviceAppManagement +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesRequestBuilder) { + return NewMobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_content_versions_mobile_app_content_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_content_versions_mobile_app_content_item_request_builder.go new file mode 100644 index 00000000000..25387f62164 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_content_versions_mobile_app_content_item_request_builder.go @@ -0,0 +1,167 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphManagedIOSLobAppContentVersionsMobileAppContentItemRequestBuilder provides operations to manage the contentVersions property of the microsoft.graph.managedMobileLobApp entity. +type MobileAppsItemGraphManagedIOSLobAppContentVersionsMobileAppContentItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphManagedIOSLobAppContentVersionsMobileAppContentItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedIOSLobAppContentVersionsMobileAppContentItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphManagedIOSLobAppContentVersionsMobileAppContentItemRequestBuilderGetQueryParameters the list of content versions for this app. +type MobileAppsItemGraphManagedIOSLobAppContentVersionsMobileAppContentItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphManagedIOSLobAppContentVersionsMobileAppContentItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedIOSLobAppContentVersionsMobileAppContentItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphManagedIOSLobAppContentVersionsMobileAppContentItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphManagedIOSLobAppContentVersionsMobileAppContentItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedIOSLobAppContentVersionsMobileAppContentItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphManagedIOSLobAppContentVersionsMobileAppContentItemRequestBuilderInternal instantiates a new MobileAppContentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedIOSLobAppContentVersionsMobileAppContentItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedIOSLobAppContentVersionsMobileAppContentItemRequestBuilder) { + m := &MobileAppsItemGraphManagedIOSLobAppContentVersionsMobileAppContentItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/contentVersions/{mobileAppContent%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphManagedIOSLobAppContentVersionsMobileAppContentItemRequestBuilder instantiates a new MobileAppContentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedIOSLobAppContentVersionsMobileAppContentItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedIOSLobAppContentVersionsMobileAppContentItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphManagedIOSLobAppContentVersionsMobileAppContentItemRequestBuilderInternal(urlParams, requestAdapter) +} +// ContainedApps provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsMobileAppContentItemRequestBuilder) ContainedApps()(*MobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsRequestBuilder) { + return NewMobileAppsItemGraphManagedIOSLobAppContentVersionsItemContainedAppsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Delete delete navigation property contentVersions for deviceAppManagement +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsMobileAppContentItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppContentVersionsMobileAppContentItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Files provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsMobileAppContentItemRequestBuilder) Files()(*MobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesRequestBuilder) { + return NewMobileAppsItemGraphManagedIOSLobAppContentVersionsItemFilesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of content versions for this app. +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsMobileAppContentItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppContentVersionsMobileAppContentItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable), nil +} +// Patch update the navigation property contentVersions in deviceAppManagement +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsMobileAppContentItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppContentVersionsMobileAppContentItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable), nil +} +// ToDeleteRequestInformation delete navigation property contentVersions for deviceAppManagement +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsMobileAppContentItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppContentVersionsMobileAppContentItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation the list of content versions for this app. +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsMobileAppContentItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppContentVersionsMobileAppContentItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property contentVersions in deviceAppManagement +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsMobileAppContentItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppContentVersionsMobileAppContentItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsMobileAppContentItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphManagedIOSLobAppContentVersionsMobileAppContentItemRequestBuilder) { + return NewMobileAppsItemGraphManagedIOSLobAppContentVersionsMobileAppContentItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_content_versions_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_content_versions_request_builder.go new file mode 100644 index 00000000000..a5d17139d95 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_content_versions_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphManagedIOSLobAppContentVersionsRequestBuilder provides operations to manage the contentVersions property of the microsoft.graph.managedMobileLobApp entity. +type MobileAppsItemGraphManagedIOSLobAppContentVersionsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphManagedIOSLobAppContentVersionsRequestBuilderGetQueryParameters the list of content versions for this app. +type MobileAppsItemGraphManagedIOSLobAppContentVersionsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphManagedIOSLobAppContentVersionsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedIOSLobAppContentVersionsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphManagedIOSLobAppContentVersionsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphManagedIOSLobAppContentVersionsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedIOSLobAppContentVersionsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppContentId provides operations to manage the contentVersions property of the microsoft.graph.managedMobileLobApp entity. +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsRequestBuilder) ByMobileAppContentId(mobileAppContentId string)(*MobileAppsItemGraphManagedIOSLobAppContentVersionsMobileAppContentItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppContentId != "" { + urlTplParams["mobileAppContent%2Did"] = mobileAppContentId + } + return NewMobileAppsItemGraphManagedIOSLobAppContentVersionsMobileAppContentItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphManagedIOSLobAppContentVersionsRequestBuilderInternal instantiates a new ContentVersionsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedIOSLobAppContentVersionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedIOSLobAppContentVersionsRequestBuilder) { + m := &MobileAppsItemGraphManagedIOSLobAppContentVersionsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/contentVersions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphManagedIOSLobAppContentVersionsRequestBuilder instantiates a new ContentVersionsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedIOSLobAppContentVersionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedIOSLobAppContentVersionsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphManagedIOSLobAppContentVersionsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsRequestBuilder) Count()(*MobileAppsItemGraphManagedIOSLobAppContentVersionsCountRequestBuilder) { + return NewMobileAppsItemGraphManagedIOSLobAppContentVersionsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of content versions for this app. +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppContentVersionsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentCollectionResponseable), nil +} +// Post create new navigation property to contentVersions for deviceAppManagement +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppContentVersionsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable), nil +} +// ToGetRequestInformation the list of content versions for this app. +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppContentVersionsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to contentVersions for deviceAppManagement +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppContentVersionsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphManagedIOSLobAppContentVersionsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphManagedIOSLobAppContentVersionsRequestBuilder) { + return NewMobileAppsItemGraphManagedIOSLobAppContentVersionsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_relationships_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_relationships_count_request_builder.go new file mode 100644 index 00000000000..9682182e58e --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_relationships_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphManagedIOSLobAppRelationshipsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphManagedIOSLobAppRelationshipsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphManagedIOSLobAppRelationshipsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphManagedIOSLobAppRelationshipsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphManagedIOSLobAppRelationshipsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedIOSLobAppRelationshipsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphManagedIOSLobAppRelationshipsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphManagedIOSLobAppRelationshipsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedIOSLobAppRelationshipsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedIOSLobAppRelationshipsCountRequestBuilder) { + m := &MobileAppsItemGraphManagedIOSLobAppRelationshipsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/relationships/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphManagedIOSLobAppRelationshipsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedIOSLobAppRelationshipsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedIOSLobAppRelationshipsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphManagedIOSLobAppRelationshipsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphManagedIOSLobAppRelationshipsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppRelationshipsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphManagedIOSLobAppRelationshipsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppRelationshipsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphManagedIOSLobAppRelationshipsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphManagedIOSLobAppRelationshipsCountRequestBuilder) { + return NewMobileAppsItemGraphManagedIOSLobAppRelationshipsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_relationships_mobile_app_relationship_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_relationships_mobile_app_relationship_item_request_builder.go new file mode 100644 index 00000000000..40f16cda320 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_relationships_mobile_app_relationship_item_request_builder.go @@ -0,0 +1,159 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphManagedIOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilder provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphManagedIOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphManagedIOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedIOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphManagedIOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters list of relationships for this mobile app. +type MobileAppsItemGraphManagedIOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphManagedIOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedIOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphManagedIOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphManagedIOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedIOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphManagedIOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal instantiates a new MobileAppRelationshipItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedIOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedIOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + m := &MobileAppsItemGraphManagedIOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/relationships/{mobileAppRelationship%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphManagedIOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilder instantiates a new MobileAppRelationshipItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedIOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedIOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphManagedIOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property relationships for deviceAppManagement +func (m *MobileAppsItemGraphManagedIOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get list of relationships for this mobile app. +func (m *MobileAppsItemGraphManagedIOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// Patch update the navigation property relationships in deviceAppManagement +func (m *MobileAppsItemGraphManagedIOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// ToDeleteRequestInformation delete navigation property relationships for deviceAppManagement +func (m *MobileAppsItemGraphManagedIOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation list of relationships for this mobile app. +func (m *MobileAppsItemGraphManagedIOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property relationships in deviceAppManagement +func (m *MobileAppsItemGraphManagedIOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphManagedIOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphManagedIOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + return NewMobileAppsItemGraphManagedIOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_relationships_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_relationships_request_builder.go new file mode 100644 index 00000000000..971ecaa1acb --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_relationships_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphManagedIOSLobAppRelationshipsRequestBuilder provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphManagedIOSLobAppRelationshipsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphManagedIOSLobAppRelationshipsRequestBuilderGetQueryParameters list of relationships for this mobile app. +type MobileAppsItemGraphManagedIOSLobAppRelationshipsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphManagedIOSLobAppRelationshipsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedIOSLobAppRelationshipsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphManagedIOSLobAppRelationshipsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphManagedIOSLobAppRelationshipsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedIOSLobAppRelationshipsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppRelationshipId provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphManagedIOSLobAppRelationshipsRequestBuilder) ByMobileAppRelationshipId(mobileAppRelationshipId string)(*MobileAppsItemGraphManagedIOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppRelationshipId != "" { + urlTplParams["mobileAppRelationship%2Did"] = mobileAppRelationshipId + } + return NewMobileAppsItemGraphManagedIOSLobAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphManagedIOSLobAppRelationshipsRequestBuilderInternal instantiates a new RelationshipsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedIOSLobAppRelationshipsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedIOSLobAppRelationshipsRequestBuilder) { + m := &MobileAppsItemGraphManagedIOSLobAppRelationshipsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/relationships{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphManagedIOSLobAppRelationshipsRequestBuilder instantiates a new RelationshipsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedIOSLobAppRelationshipsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedIOSLobAppRelationshipsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphManagedIOSLobAppRelationshipsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphManagedIOSLobAppRelationshipsRequestBuilder) Count()(*MobileAppsItemGraphManagedIOSLobAppRelationshipsCountRequestBuilder) { + return NewMobileAppsItemGraphManagedIOSLobAppRelationshipsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get list of relationships for this mobile app. +func (m *MobileAppsItemGraphManagedIOSLobAppRelationshipsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppRelationshipsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipCollectionResponseable), nil +} +// Post create new navigation property to relationships for deviceAppManagement +func (m *MobileAppsItemGraphManagedIOSLobAppRelationshipsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppRelationshipsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// ToGetRequestInformation list of relationships for this mobile app. +func (m *MobileAppsItemGraphManagedIOSLobAppRelationshipsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppRelationshipsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to relationships for deviceAppManagement +func (m *MobileAppsItemGraphManagedIOSLobAppRelationshipsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppRelationshipsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphManagedIOSLobAppRelationshipsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphManagedIOSLobAppRelationshipsRequestBuilder) { + return NewMobileAppsItemGraphManagedIOSLobAppRelationshipsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_request_builder.go index d0202220bf8..2adbf453a01 100644 --- a/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_request_builder.go +++ b/deviceappmanagement/mobile_apps_item_graph_managed_i_o_s_lob_app_request_builder.go @@ -27,6 +27,14 @@ type MobileAppsItemGraphManagedIOSLobAppRequestBuilderGetRequestConfiguration st // Request query parameters QueryParameters *MobileAppsItemGraphManagedIOSLobAppRequestBuilderGetQueryParameters } +// Assignments provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphManagedIOSLobAppRequestBuilder) Assignments()(*MobileAppsItemGraphManagedIOSLobAppAssignmentsRequestBuilder) { + return NewMobileAppsItemGraphManagedIOSLobAppAssignmentsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Categories provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphManagedIOSLobAppRequestBuilder) Categories()(*MobileAppsItemGraphManagedIOSLobAppCategoriesRequestBuilder) { + return NewMobileAppsItemGraphManagedIOSLobAppCategoriesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // NewMobileAppsItemGraphManagedIOSLobAppRequestBuilderInternal instantiates a new GraphManagedIOSLobAppRequestBuilder and sets the default values. func NewMobileAppsItemGraphManagedIOSLobAppRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedIOSLobAppRequestBuilder) { m := &MobileAppsItemGraphManagedIOSLobAppRequestBuilder{ @@ -40,6 +48,10 @@ func NewMobileAppsItemGraphManagedIOSLobAppRequestBuilder(rawUrl string, request urlParams["request-raw-url"] = rawUrl return NewMobileAppsItemGraphManagedIOSLobAppRequestBuilderInternal(urlParams, requestAdapter) } +// ContentVersions provides operations to manage the contentVersions property of the microsoft.graph.managedMobileLobApp entity. +func (m *MobileAppsItemGraphManagedIOSLobAppRequestBuilder) ContentVersions()(*MobileAppsItemGraphManagedIOSLobAppContentVersionsRequestBuilder) { + return NewMobileAppsItemGraphManagedIOSLobAppContentVersionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // Get get the item of type microsoft.graph.mobileApp as microsoft.graph.managedIOSLobApp func (m *MobileAppsItemGraphManagedIOSLobAppRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ManagedIOSLobAppable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); @@ -59,6 +71,10 @@ func (m *MobileAppsItemGraphManagedIOSLobAppRequestBuilder) Get(ctx context.Cont } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ManagedIOSLobAppable), nil } +// Relationships provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphManagedIOSLobAppRequestBuilder) Relationships()(*MobileAppsItemGraphManagedIOSLobAppRelationshipsRequestBuilder) { + return NewMobileAppsItemGraphManagedIOSLobAppRelationshipsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation get the item of type microsoft.graph.mobileApp as microsoft.graph.managedIOSLobApp func (m *MobileAppsItemGraphManagedIOSLobAppRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedIOSLobAppRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_assignments_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_assignments_count_request_builder.go new file mode 100644 index 00000000000..2e01a81e1db --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_assignments_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphManagedMobileLobAppAssignmentsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphManagedMobileLobAppAssignmentsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphManagedMobileLobAppAssignmentsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphManagedMobileLobAppAssignmentsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphManagedMobileLobAppAssignmentsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedMobileLobAppAssignmentsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphManagedMobileLobAppAssignmentsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphManagedMobileLobAppAssignmentsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedMobileLobAppAssignmentsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedMobileLobAppAssignmentsCountRequestBuilder) { + m := &MobileAppsItemGraphManagedMobileLobAppAssignmentsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/assignments/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphManagedMobileLobAppAssignmentsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedMobileLobAppAssignmentsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedMobileLobAppAssignmentsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphManagedMobileLobAppAssignmentsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphManagedMobileLobAppAssignmentsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppAssignmentsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphManagedMobileLobAppAssignmentsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppAssignmentsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphManagedMobileLobAppAssignmentsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphManagedMobileLobAppAssignmentsCountRequestBuilder) { + return NewMobileAppsItemGraphManagedMobileLobAppAssignmentsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_assignments_mobile_app_assignment_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_assignments_mobile_app_assignment_item_request_builder.go new file mode 100644 index 00000000000..71b7f6e60a5 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_assignments_mobile_app_assignment_item_request_builder.go @@ -0,0 +1,159 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphManagedMobileLobAppAssignmentsMobileAppAssignmentItemRequestBuilder provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphManagedMobileLobAppAssignmentsMobileAppAssignmentItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphManagedMobileLobAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedMobileLobAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphManagedMobileLobAppAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters the list of group assignments for this mobile app. +type MobileAppsItemGraphManagedMobileLobAppAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphManagedMobileLobAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedMobileLobAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphManagedMobileLobAppAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphManagedMobileLobAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedMobileLobAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphManagedMobileLobAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedMobileLobAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedMobileLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + m := &MobileAppsItemGraphManagedMobileLobAppAssignmentsMobileAppAssignmentItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphManagedMobileLobAppAssignmentsMobileAppAssignmentItemRequestBuilder instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedMobileLobAppAssignmentsMobileAppAssignmentItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedMobileLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphManagedMobileLobAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property assignments for deviceAppManagement +func (m *MobileAppsItemGraphManagedMobileLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphManagedMobileLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// Patch update the navigation property assignments in deviceAppManagement +func (m *MobileAppsItemGraphManagedMobileLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// ToDeleteRequestInformation delete navigation property assignments for deviceAppManagement +func (m *MobileAppsItemGraphManagedMobileLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphManagedMobileLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property assignments in deviceAppManagement +func (m *MobileAppsItemGraphManagedMobileLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphManagedMobileLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphManagedMobileLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + return NewMobileAppsItemGraphManagedMobileLobAppAssignmentsMobileAppAssignmentItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_assignments_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_assignments_request_builder.go new file mode 100644 index 00000000000..ab2c86729fc --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_assignments_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphManagedMobileLobAppAssignmentsRequestBuilder provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphManagedMobileLobAppAssignmentsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphManagedMobileLobAppAssignmentsRequestBuilderGetQueryParameters the list of group assignments for this mobile app. +type MobileAppsItemGraphManagedMobileLobAppAssignmentsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphManagedMobileLobAppAssignmentsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedMobileLobAppAssignmentsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphManagedMobileLobAppAssignmentsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphManagedMobileLobAppAssignmentsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedMobileLobAppAssignmentsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppAssignmentId provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphManagedMobileLobAppAssignmentsRequestBuilder) ByMobileAppAssignmentId(mobileAppAssignmentId string)(*MobileAppsItemGraphManagedMobileLobAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppAssignmentId != "" { + urlTplParams["mobileAppAssignment%2Did"] = mobileAppAssignmentId + } + return NewMobileAppsItemGraphManagedMobileLobAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphManagedMobileLobAppAssignmentsRequestBuilderInternal instantiates a new AssignmentsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedMobileLobAppAssignmentsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedMobileLobAppAssignmentsRequestBuilder) { + m := &MobileAppsItemGraphManagedMobileLobAppAssignmentsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphManagedMobileLobAppAssignmentsRequestBuilder instantiates a new AssignmentsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedMobileLobAppAssignmentsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedMobileLobAppAssignmentsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphManagedMobileLobAppAssignmentsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphManagedMobileLobAppAssignmentsRequestBuilder) Count()(*MobileAppsItemGraphManagedMobileLobAppAssignmentsCountRequestBuilder) { + return NewMobileAppsItemGraphManagedMobileLobAppAssignmentsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphManagedMobileLobAppAssignmentsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppAssignmentsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentCollectionResponseable), nil +} +// Post create new navigation property to assignments for deviceAppManagement +func (m *MobileAppsItemGraphManagedMobileLobAppAssignmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppAssignmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// ToGetRequestInformation the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphManagedMobileLobAppAssignmentsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppAssignmentsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to assignments for deviceAppManagement +func (m *MobileAppsItemGraphManagedMobileLobAppAssignmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppAssignmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphManagedMobileLobAppAssignmentsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphManagedMobileLobAppAssignmentsRequestBuilder) { + return NewMobileAppsItemGraphManagedMobileLobAppAssignmentsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_categories_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_categories_count_request_builder.go new file mode 100644 index 00000000000..1b4600f2c61 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_categories_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphManagedMobileLobAppCategoriesCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphManagedMobileLobAppCategoriesCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphManagedMobileLobAppCategoriesCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphManagedMobileLobAppCategoriesCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphManagedMobileLobAppCategoriesCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedMobileLobAppCategoriesCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphManagedMobileLobAppCategoriesCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphManagedMobileLobAppCategoriesCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedMobileLobAppCategoriesCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedMobileLobAppCategoriesCountRequestBuilder) { + m := &MobileAppsItemGraphManagedMobileLobAppCategoriesCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/categories/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphManagedMobileLobAppCategoriesCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedMobileLobAppCategoriesCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedMobileLobAppCategoriesCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphManagedMobileLobAppCategoriesCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphManagedMobileLobAppCategoriesCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppCategoriesCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphManagedMobileLobAppCategoriesCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppCategoriesCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphManagedMobileLobAppCategoriesCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphManagedMobileLobAppCategoriesCountRequestBuilder) { + return NewMobileAppsItemGraphManagedMobileLobAppCategoriesCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_categories_mobile_app_category_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_categories_mobile_app_category_item_request_builder.go new file mode 100644 index 00000000000..07d339a94b2 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_categories_mobile_app_category_item_request_builder.go @@ -0,0 +1,81 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphManagedMobileLobAppCategoriesMobileAppCategoryItemRequestBuilder provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphManagedMobileLobAppCategoriesMobileAppCategoryItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphManagedMobileLobAppCategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters the list of categories for this app. +type MobileAppsItemGraphManagedMobileLobAppCategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphManagedMobileLobAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedMobileLobAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphManagedMobileLobAppCategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphManagedMobileLobAppCategoriesMobileAppCategoryItemRequestBuilderInternal instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedMobileLobAppCategoriesMobileAppCategoryItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedMobileLobAppCategoriesMobileAppCategoryItemRequestBuilder) { + m := &MobileAppsItemGraphManagedMobileLobAppCategoriesMobileAppCategoryItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphManagedMobileLobAppCategoriesMobileAppCategoryItemRequestBuilder instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedMobileLobAppCategoriesMobileAppCategoryItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedMobileLobAppCategoriesMobileAppCategoryItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphManagedMobileLobAppCategoriesMobileAppCategoryItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get the list of categories for this app. +func (m *MobileAppsItemGraphManagedMobileLobAppCategoriesMobileAppCategoryItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppCategoryFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryable), nil +} +// ToGetRequestInformation the list of categories for this app. +func (m *MobileAppsItemGraphManagedMobileLobAppCategoriesMobileAppCategoryItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphManagedMobileLobAppCategoriesMobileAppCategoryItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphManagedMobileLobAppCategoriesMobileAppCategoryItemRequestBuilder) { + return NewMobileAppsItemGraphManagedMobileLobAppCategoriesMobileAppCategoryItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_categories_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_categories_request_builder.go new file mode 100644 index 00000000000..1bfe2be844d --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_categories_request_builder.go @@ -0,0 +1,108 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphManagedMobileLobAppCategoriesRequestBuilder provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphManagedMobileLobAppCategoriesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphManagedMobileLobAppCategoriesRequestBuilderGetQueryParameters the list of categories for this app. +type MobileAppsItemGraphManagedMobileLobAppCategoriesRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphManagedMobileLobAppCategoriesRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedMobileLobAppCategoriesRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphManagedMobileLobAppCategoriesRequestBuilderGetQueryParameters +} +// ByMobileAppCategoryId provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphManagedMobileLobAppCategoriesRequestBuilder) ByMobileAppCategoryId(mobileAppCategoryId string)(*MobileAppsItemGraphManagedMobileLobAppCategoriesMobileAppCategoryItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppCategoryId != "" { + urlTplParams["mobileAppCategory%2Did"] = mobileAppCategoryId + } + return NewMobileAppsItemGraphManagedMobileLobAppCategoriesMobileAppCategoryItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphManagedMobileLobAppCategoriesRequestBuilderInternal instantiates a new CategoriesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedMobileLobAppCategoriesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedMobileLobAppCategoriesRequestBuilder) { + m := &MobileAppsItemGraphManagedMobileLobAppCategoriesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphManagedMobileLobAppCategoriesRequestBuilder instantiates a new CategoriesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedMobileLobAppCategoriesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedMobileLobAppCategoriesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphManagedMobileLobAppCategoriesRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphManagedMobileLobAppCategoriesRequestBuilder) Count()(*MobileAppsItemGraphManagedMobileLobAppCategoriesCountRequestBuilder) { + return NewMobileAppsItemGraphManagedMobileLobAppCategoriesCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of categories for this app. +func (m *MobileAppsItemGraphManagedMobileLobAppCategoriesRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppCategoriesRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppCategoryCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryCollectionResponseable), nil +} +// ToGetRequestInformation the list of categories for this app. +func (m *MobileAppsItemGraphManagedMobileLobAppCategoriesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppCategoriesRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphManagedMobileLobAppCategoriesRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphManagedMobileLobAppCategoriesRequestBuilder) { + return NewMobileAppsItemGraphManagedMobileLobAppCategoriesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_content_versions_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_content_versions_count_request_builder.go new file mode 100644 index 00000000000..476dc328f13 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_content_versions_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphManagedMobileLobAppContentVersionsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphManagedMobileLobAppContentVersionsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphManagedMobileLobAppContentVersionsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphManagedMobileLobAppContentVersionsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphManagedMobileLobAppContentVersionsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedMobileLobAppContentVersionsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphManagedMobileLobAppContentVersionsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphManagedMobileLobAppContentVersionsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedMobileLobAppContentVersionsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedMobileLobAppContentVersionsCountRequestBuilder) { + m := &MobileAppsItemGraphManagedMobileLobAppContentVersionsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/contentVersions/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphManagedMobileLobAppContentVersionsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedMobileLobAppContentVersionsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedMobileLobAppContentVersionsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphManagedMobileLobAppContentVersionsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppContentVersionsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppContentVersionsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphManagedMobileLobAppContentVersionsCountRequestBuilder) { + return NewMobileAppsItemGraphManagedMobileLobAppContentVersionsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_content_versions_item_contained_apps_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_content_versions_item_contained_apps_count_request_builder.go new file mode 100644 index 00000000000..3f9f405da1a --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_content_versions_item_contained_apps_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsCountRequestBuilder) { + m := &MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/contentVersions/{mobileAppContent%2Did}/containedApps/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsCountRequestBuilder) { + return NewMobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_content_versions_item_contained_apps_mobile_contained_app_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_content_versions_item_contained_apps_mobile_contained_app_item_request_builder.go new file mode 100644 index 00000000000..a9fd3634ab8 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_content_versions_item_contained_apps_mobile_contained_app_item_request_builder.go @@ -0,0 +1,159 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. +type MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetQueryParameters the collection of contained apps in a MobileLobApp acting as a package. +type MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderInternal instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) { + m := &MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/contentVersions/{mobileAppContent%2Did}/containedApps/{mobileContainedApp%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property containedApps for deviceAppManagement +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get the collection of contained apps in a MobileLobApp acting as a package. +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileContainedAppFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable), nil +} +// Patch update the navigation property containedApps in deviceAppManagement +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileContainedAppFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable), nil +} +// ToDeleteRequestInformation delete navigation property containedApps for deviceAppManagement +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation the collection of contained apps in a MobileLobApp acting as a package. +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property containedApps in deviceAppManagement +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) { + return NewMobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_content_versions_item_contained_apps_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_content_versions_item_contained_apps_request_builder.go new file mode 100644 index 00000000000..9b079fd9837 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_content_versions_item_contained_apps_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsRequestBuilder provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. +type MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsRequestBuilderGetQueryParameters the collection of contained apps in a MobileLobApp acting as a package. +type MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileContainedAppId provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsRequestBuilder) ByMobileContainedAppId(mobileContainedAppId string)(*MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileContainedAppId != "" { + urlTplParams["mobileContainedApp%2Did"] = mobileContainedAppId + } + return NewMobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsRequestBuilderInternal instantiates a new ContainedAppsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsRequestBuilder) { + m := &MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/contentVersions/{mobileAppContent%2Did}/containedApps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsRequestBuilder instantiates a new ContainedAppsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsRequestBuilder) Count()(*MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsCountRequestBuilder) { + return NewMobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the collection of contained apps in a MobileLobApp acting as a package. +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileContainedAppCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppCollectionResponseable), nil +} +// Post create new navigation property to containedApps for deviceAppManagement +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileContainedAppFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable), nil +} +// ToGetRequestInformation the collection of contained apps in a MobileLobApp acting as a package. +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to containedApps for deviceAppManagement +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsRequestBuilder) { + return NewMobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_content_versions_item_files_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_content_versions_item_files_count_request_builder.go new file mode 100644 index 00000000000..ae05cee6de6 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_content_versions_item_files_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesCountRequestBuilder) { + m := &MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/contentVersions/{mobileAppContent%2Did}/files/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesCountRequestBuilder) { + return NewMobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_content_versions_item_files_item_commit_post_request_body.go b/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_content_versions_item_files_item_commit_post_request_body.go new file mode 100644 index 00000000000..5ed655ad79b --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_content_versions_item_files_item_commit_post_request_body.go @@ -0,0 +1,111 @@ +package deviceappmanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +// MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemCommitPostRequestBody +type MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemCommitPostRequestBody struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewMobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemCommitPostRequestBody instantiates a new MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemCommitPostRequestBody and sets the default values. +func NewMobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemCommitPostRequestBody()(*MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemCommitPostRequestBody) { + m := &MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemCommitPostRequestBody{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateMobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemCommitPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemCommitPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemCommitPostRequestBody(), nil +} +// GetAdditionalData gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemCommitPostRequestBody) GetAdditionalData()(map[string]any) { + val , err := m.backingStore.Get("additionalData") + if err != nil { + panic(err) + } + if val == nil { + var value = make(map[string]any); + m.SetAdditionalData(value); + } + return val.(map[string]any) +} +// GetBackingStore gets the backingStore property value. Stores model information. +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemCommitPostRequestBody) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemCommitPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["fileEncryptionInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateFileEncryptionInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetFileEncryptionInfo(val.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable)) + } + return nil + } + return res +} +// GetFileEncryptionInfo gets the fileEncryptionInfo property value. The fileEncryptionInfo property +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemCommitPostRequestBody) GetFileEncryptionInfo()(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable) { + val, err := m.GetBackingStore().Get("fileEncryptionInfo") + if err != nil { + panic(err) + } + if val != nil { + return val.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable) + } + return nil +} +// Serialize serializes information the current object +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemCommitPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("fileEncryptionInfo", m.GetFileEncryptionInfo()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemCommitPostRequestBody) SetAdditionalData(value map[string]any)() { + err := m.GetBackingStore().Set("additionalData", value) + if err != nil { + panic(err) + } +} +// SetBackingStore sets the backingStore property value. Stores model information. +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemCommitPostRequestBody) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetFileEncryptionInfo sets the fileEncryptionInfo property value. The fileEncryptionInfo property +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemCommitPostRequestBody) SetFileEncryptionInfo(value ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable)() { + err := m.GetBackingStore().Set("fileEncryptionInfo", value) + if err != nil { + panic(err) + } +} +// MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemCommitPostRequestBodyable +type MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemCommitPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetFileEncryptionInfo()(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetFileEncryptionInfo(value ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable)() +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_content_versions_item_files_item_commit_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_content_versions_item_files_item_commit_request_builder.go new file mode 100644 index 00000000000..7de6f4ee740 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_content_versions_item_files_item_commit_request_builder.go @@ -0,0 +1,68 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemCommitRequestBuilder provides operations to call the commit method. +type MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemCommitRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemCommitRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemCommitRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemCommitRequestBuilderInternal instantiates a new CommitRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemCommitRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemCommitRequestBuilder) { + m := &MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemCommitRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/commit", pathParameters), + } + return m +} +// NewMobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemCommitRequestBuilder instantiates a new CommitRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemCommitRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemCommitRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemCommitRequestBuilderInternal(urlParams, requestAdapter) +} +// Post commits a file of a given app. +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemCommitRequestBuilder) Post(ctx context.Context, body MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemCommitPostRequestBodyable, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemCommitRequestBuilderPostRequestConfiguration)(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation commits a file of a given app. +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemCommitRequestBuilder) ToPostRequestInformation(ctx context.Context, body MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemCommitPostRequestBodyable, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemCommitRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemCommitRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemCommitRequestBuilder) { + return NewMobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemCommitRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_content_versions_item_files_item_renew_upload_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_content_versions_item_files_item_renew_upload_request_builder.go new file mode 100644 index 00000000000..7d0ab8c4e36 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_content_versions_item_files_item_renew_upload_request_builder.go @@ -0,0 +1,64 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder provides operations to call the renewUpload method. +type MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemRenewUploadRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemRenewUploadRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemRenewUploadRequestBuilderInternal instantiates a new RenewUploadRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemRenewUploadRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder) { + m := &MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/renewUpload", pathParameters), + } + return m +} +// NewMobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder instantiates a new RenewUploadRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemRenewUploadRequestBuilderInternal(urlParams, requestAdapter) +} +// Post renews the SAS URI for an application file upload. +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder) Post(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemRenewUploadRequestBuilderPostRequestConfiguration)(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation renews the SAS URI for an application file upload. +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemRenewUploadRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder) { + return NewMobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_content_versions_item_files_mobile_app_content_file_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_content_versions_item_files_mobile_app_content_file_item_request_builder.go new file mode 100644 index 00000000000..983fd031c60 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_content_versions_item_files_mobile_app_content_file_item_request_builder.go @@ -0,0 +1,167 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. +type MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetQueryParameters the list of files for this app content version. +type MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// Commit provides operations to call the commit method. +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) Commit()(*MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemCommitRequestBuilder) { + return NewMobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemCommitRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderInternal instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) { + m := &MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property files for deviceAppManagement +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get the list of files for this app content version. +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFileFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable), nil +} +// Patch update the navigation property files in deviceAppManagement +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFileFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable), nil +} +// RenewUpload provides operations to call the renewUpload method. +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) RenewUpload()(*MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemRenewUploadRequestBuilder) { + return NewMobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesItemRenewUploadRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToDeleteRequestInformation delete navigation property files for deviceAppManagement +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation the list of files for this app content version. +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property files in deviceAppManagement +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) { + return NewMobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_content_versions_item_files_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_content_versions_item_files_request_builder.go new file mode 100644 index 00000000000..25be4862be9 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_content_versions_item_files_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesRequestBuilder provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. +type MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesRequestBuilderGetQueryParameters the list of files for this app content version. +type MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppContentFileId provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesRequestBuilder) ByMobileAppContentFileId(mobileAppContentFileId string)(*MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppContentFileId != "" { + urlTplParams["mobileAppContentFile%2Did"] = mobileAppContentFileId + } + return NewMobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesRequestBuilderInternal instantiates a new FilesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesRequestBuilder) { + m := &MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/contentVersions/{mobileAppContent%2Did}/files{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesRequestBuilder instantiates a new FilesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesRequestBuilder) Count()(*MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesCountRequestBuilder) { + return NewMobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of files for this app content version. +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFileCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileCollectionResponseable), nil +} +// Post create new navigation property to files for deviceAppManagement +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFileFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable), nil +} +// ToGetRequestInformation the list of files for this app content version. +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to files for deviceAppManagement +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesRequestBuilder) { + return NewMobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_content_versions_mobile_app_content_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_content_versions_mobile_app_content_item_request_builder.go new file mode 100644 index 00000000000..8086ca58a81 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_content_versions_mobile_app_content_item_request_builder.go @@ -0,0 +1,167 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphManagedMobileLobAppContentVersionsMobileAppContentItemRequestBuilder provides operations to manage the contentVersions property of the microsoft.graph.managedMobileLobApp entity. +type MobileAppsItemGraphManagedMobileLobAppContentVersionsMobileAppContentItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphManagedMobileLobAppContentVersionsMobileAppContentItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedMobileLobAppContentVersionsMobileAppContentItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphManagedMobileLobAppContentVersionsMobileAppContentItemRequestBuilderGetQueryParameters the list of content versions for this app. +type MobileAppsItemGraphManagedMobileLobAppContentVersionsMobileAppContentItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphManagedMobileLobAppContentVersionsMobileAppContentItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedMobileLobAppContentVersionsMobileAppContentItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphManagedMobileLobAppContentVersionsMobileAppContentItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphManagedMobileLobAppContentVersionsMobileAppContentItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedMobileLobAppContentVersionsMobileAppContentItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphManagedMobileLobAppContentVersionsMobileAppContentItemRequestBuilderInternal instantiates a new MobileAppContentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedMobileLobAppContentVersionsMobileAppContentItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedMobileLobAppContentVersionsMobileAppContentItemRequestBuilder) { + m := &MobileAppsItemGraphManagedMobileLobAppContentVersionsMobileAppContentItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/contentVersions/{mobileAppContent%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphManagedMobileLobAppContentVersionsMobileAppContentItemRequestBuilder instantiates a new MobileAppContentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedMobileLobAppContentVersionsMobileAppContentItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedMobileLobAppContentVersionsMobileAppContentItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphManagedMobileLobAppContentVersionsMobileAppContentItemRequestBuilderInternal(urlParams, requestAdapter) +} +// ContainedApps provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsMobileAppContentItemRequestBuilder) ContainedApps()(*MobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsRequestBuilder) { + return NewMobileAppsItemGraphManagedMobileLobAppContentVersionsItemContainedAppsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Delete delete navigation property contentVersions for deviceAppManagement +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsMobileAppContentItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppContentVersionsMobileAppContentItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Files provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsMobileAppContentItemRequestBuilder) Files()(*MobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesRequestBuilder) { + return NewMobileAppsItemGraphManagedMobileLobAppContentVersionsItemFilesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of content versions for this app. +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsMobileAppContentItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppContentVersionsMobileAppContentItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable), nil +} +// Patch update the navigation property contentVersions in deviceAppManagement +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsMobileAppContentItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppContentVersionsMobileAppContentItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable), nil +} +// ToDeleteRequestInformation delete navigation property contentVersions for deviceAppManagement +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsMobileAppContentItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppContentVersionsMobileAppContentItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation the list of content versions for this app. +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsMobileAppContentItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppContentVersionsMobileAppContentItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property contentVersions in deviceAppManagement +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsMobileAppContentItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppContentVersionsMobileAppContentItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsMobileAppContentItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphManagedMobileLobAppContentVersionsMobileAppContentItemRequestBuilder) { + return NewMobileAppsItemGraphManagedMobileLobAppContentVersionsMobileAppContentItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_content_versions_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_content_versions_request_builder.go new file mode 100644 index 00000000000..428d663ce78 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_content_versions_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphManagedMobileLobAppContentVersionsRequestBuilder provides operations to manage the contentVersions property of the microsoft.graph.managedMobileLobApp entity. +type MobileAppsItemGraphManagedMobileLobAppContentVersionsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphManagedMobileLobAppContentVersionsRequestBuilderGetQueryParameters the list of content versions for this app. +type MobileAppsItemGraphManagedMobileLobAppContentVersionsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphManagedMobileLobAppContentVersionsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedMobileLobAppContentVersionsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphManagedMobileLobAppContentVersionsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphManagedMobileLobAppContentVersionsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedMobileLobAppContentVersionsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppContentId provides operations to manage the contentVersions property of the microsoft.graph.managedMobileLobApp entity. +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsRequestBuilder) ByMobileAppContentId(mobileAppContentId string)(*MobileAppsItemGraphManagedMobileLobAppContentVersionsMobileAppContentItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppContentId != "" { + urlTplParams["mobileAppContent%2Did"] = mobileAppContentId + } + return NewMobileAppsItemGraphManagedMobileLobAppContentVersionsMobileAppContentItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphManagedMobileLobAppContentVersionsRequestBuilderInternal instantiates a new ContentVersionsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedMobileLobAppContentVersionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedMobileLobAppContentVersionsRequestBuilder) { + m := &MobileAppsItemGraphManagedMobileLobAppContentVersionsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/contentVersions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphManagedMobileLobAppContentVersionsRequestBuilder instantiates a new ContentVersionsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedMobileLobAppContentVersionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedMobileLobAppContentVersionsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphManagedMobileLobAppContentVersionsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsRequestBuilder) Count()(*MobileAppsItemGraphManagedMobileLobAppContentVersionsCountRequestBuilder) { + return NewMobileAppsItemGraphManagedMobileLobAppContentVersionsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of content versions for this app. +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppContentVersionsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentCollectionResponseable), nil +} +// Post create new navigation property to contentVersions for deviceAppManagement +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppContentVersionsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable), nil +} +// ToGetRequestInformation the list of content versions for this app. +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppContentVersionsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to contentVersions for deviceAppManagement +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppContentVersionsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphManagedMobileLobAppContentVersionsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphManagedMobileLobAppContentVersionsRequestBuilder) { + return NewMobileAppsItemGraphManagedMobileLobAppContentVersionsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_relationships_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_relationships_count_request_builder.go new file mode 100644 index 00000000000..1f3fda9c3e3 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_relationships_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphManagedMobileLobAppRelationshipsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphManagedMobileLobAppRelationshipsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphManagedMobileLobAppRelationshipsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphManagedMobileLobAppRelationshipsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphManagedMobileLobAppRelationshipsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedMobileLobAppRelationshipsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphManagedMobileLobAppRelationshipsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphManagedMobileLobAppRelationshipsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedMobileLobAppRelationshipsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedMobileLobAppRelationshipsCountRequestBuilder) { + m := &MobileAppsItemGraphManagedMobileLobAppRelationshipsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/relationships/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphManagedMobileLobAppRelationshipsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedMobileLobAppRelationshipsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedMobileLobAppRelationshipsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphManagedMobileLobAppRelationshipsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphManagedMobileLobAppRelationshipsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppRelationshipsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphManagedMobileLobAppRelationshipsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppRelationshipsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphManagedMobileLobAppRelationshipsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphManagedMobileLobAppRelationshipsCountRequestBuilder) { + return NewMobileAppsItemGraphManagedMobileLobAppRelationshipsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_relationships_mobile_app_relationship_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_relationships_mobile_app_relationship_item_request_builder.go new file mode 100644 index 00000000000..b15b2cb23cc --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_relationships_mobile_app_relationship_item_request_builder.go @@ -0,0 +1,159 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphManagedMobileLobAppRelationshipsMobileAppRelationshipItemRequestBuilder provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphManagedMobileLobAppRelationshipsMobileAppRelationshipItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphManagedMobileLobAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedMobileLobAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphManagedMobileLobAppRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters list of relationships for this mobile app. +type MobileAppsItemGraphManagedMobileLobAppRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphManagedMobileLobAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedMobileLobAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphManagedMobileLobAppRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphManagedMobileLobAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedMobileLobAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphManagedMobileLobAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal instantiates a new MobileAppRelationshipItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedMobileLobAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedMobileLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + m := &MobileAppsItemGraphManagedMobileLobAppRelationshipsMobileAppRelationshipItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/relationships/{mobileAppRelationship%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphManagedMobileLobAppRelationshipsMobileAppRelationshipItemRequestBuilder instantiates a new MobileAppRelationshipItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedMobileLobAppRelationshipsMobileAppRelationshipItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedMobileLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphManagedMobileLobAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property relationships for deviceAppManagement +func (m *MobileAppsItemGraphManagedMobileLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get list of relationships for this mobile app. +func (m *MobileAppsItemGraphManagedMobileLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// Patch update the navigation property relationships in deviceAppManagement +func (m *MobileAppsItemGraphManagedMobileLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// ToDeleteRequestInformation delete navigation property relationships for deviceAppManagement +func (m *MobileAppsItemGraphManagedMobileLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation list of relationships for this mobile app. +func (m *MobileAppsItemGraphManagedMobileLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property relationships in deviceAppManagement +func (m *MobileAppsItemGraphManagedMobileLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphManagedMobileLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphManagedMobileLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + return NewMobileAppsItemGraphManagedMobileLobAppRelationshipsMobileAppRelationshipItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_relationships_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_relationships_request_builder.go new file mode 100644 index 00000000000..be1fd256d7d --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_relationships_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphManagedMobileLobAppRelationshipsRequestBuilder provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphManagedMobileLobAppRelationshipsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphManagedMobileLobAppRelationshipsRequestBuilderGetQueryParameters list of relationships for this mobile app. +type MobileAppsItemGraphManagedMobileLobAppRelationshipsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphManagedMobileLobAppRelationshipsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedMobileLobAppRelationshipsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphManagedMobileLobAppRelationshipsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphManagedMobileLobAppRelationshipsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphManagedMobileLobAppRelationshipsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppRelationshipId provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphManagedMobileLobAppRelationshipsRequestBuilder) ByMobileAppRelationshipId(mobileAppRelationshipId string)(*MobileAppsItemGraphManagedMobileLobAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppRelationshipId != "" { + urlTplParams["mobileAppRelationship%2Did"] = mobileAppRelationshipId + } + return NewMobileAppsItemGraphManagedMobileLobAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphManagedMobileLobAppRelationshipsRequestBuilderInternal instantiates a new RelationshipsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedMobileLobAppRelationshipsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedMobileLobAppRelationshipsRequestBuilder) { + m := &MobileAppsItemGraphManagedMobileLobAppRelationshipsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/relationships{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphManagedMobileLobAppRelationshipsRequestBuilder instantiates a new RelationshipsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphManagedMobileLobAppRelationshipsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedMobileLobAppRelationshipsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphManagedMobileLobAppRelationshipsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphManagedMobileLobAppRelationshipsRequestBuilder) Count()(*MobileAppsItemGraphManagedMobileLobAppRelationshipsCountRequestBuilder) { + return NewMobileAppsItemGraphManagedMobileLobAppRelationshipsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get list of relationships for this mobile app. +func (m *MobileAppsItemGraphManagedMobileLobAppRelationshipsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppRelationshipsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipCollectionResponseable), nil +} +// Post create new navigation property to relationships for deviceAppManagement +func (m *MobileAppsItemGraphManagedMobileLobAppRelationshipsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppRelationshipsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// ToGetRequestInformation list of relationships for this mobile app. +func (m *MobileAppsItemGraphManagedMobileLobAppRelationshipsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppRelationshipsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to relationships for deviceAppManagement +func (m *MobileAppsItemGraphManagedMobileLobAppRelationshipsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppRelationshipsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphManagedMobileLobAppRelationshipsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphManagedMobileLobAppRelationshipsRequestBuilder) { + return NewMobileAppsItemGraphManagedMobileLobAppRelationshipsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_request_builder.go index fce10d4fa9f..53ba1881cd2 100644 --- a/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_request_builder.go +++ b/deviceappmanagement/mobile_apps_item_graph_managed_mobile_lob_app_request_builder.go @@ -27,6 +27,14 @@ type MobileAppsItemGraphManagedMobileLobAppRequestBuilderGetRequestConfiguration // Request query parameters QueryParameters *MobileAppsItemGraphManagedMobileLobAppRequestBuilderGetQueryParameters } +// Assignments provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphManagedMobileLobAppRequestBuilder) Assignments()(*MobileAppsItemGraphManagedMobileLobAppAssignmentsRequestBuilder) { + return NewMobileAppsItemGraphManagedMobileLobAppAssignmentsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Categories provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphManagedMobileLobAppRequestBuilder) Categories()(*MobileAppsItemGraphManagedMobileLobAppCategoriesRequestBuilder) { + return NewMobileAppsItemGraphManagedMobileLobAppCategoriesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // NewMobileAppsItemGraphManagedMobileLobAppRequestBuilderInternal instantiates a new GraphManagedMobileLobAppRequestBuilder and sets the default values. func NewMobileAppsItemGraphManagedMobileLobAppRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphManagedMobileLobAppRequestBuilder) { m := &MobileAppsItemGraphManagedMobileLobAppRequestBuilder{ @@ -40,6 +48,10 @@ func NewMobileAppsItemGraphManagedMobileLobAppRequestBuilder(rawUrl string, requ urlParams["request-raw-url"] = rawUrl return NewMobileAppsItemGraphManagedMobileLobAppRequestBuilderInternal(urlParams, requestAdapter) } +// ContentVersions provides operations to manage the contentVersions property of the microsoft.graph.managedMobileLobApp entity. +func (m *MobileAppsItemGraphManagedMobileLobAppRequestBuilder) ContentVersions()(*MobileAppsItemGraphManagedMobileLobAppContentVersionsRequestBuilder) { + return NewMobileAppsItemGraphManagedMobileLobAppContentVersionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // Get get the item of type microsoft.graph.mobileApp as microsoft.graph.managedMobileLobApp func (m *MobileAppsItemGraphManagedMobileLobAppRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ManagedMobileLobAppable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); @@ -59,6 +71,10 @@ func (m *MobileAppsItemGraphManagedMobileLobAppRequestBuilder) Get(ctx context.C } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ManagedMobileLobAppable), nil } +// Relationships provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphManagedMobileLobAppRequestBuilder) Relationships()(*MobileAppsItemGraphManagedMobileLobAppRelationshipsRequestBuilder) { + return NewMobileAppsItemGraphManagedMobileLobAppRelationshipsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation get the item of type microsoft.graph.mobileApp as microsoft.graph.managedMobileLobApp func (m *MobileAppsItemGraphManagedMobileLobAppRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphManagedMobileLobAppRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/deviceappmanagement/mobile_apps_item_graph_microsoft_store_for_business_app_assignments_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_microsoft_store_for_business_app_assignments_count_request_builder.go new file mode 100644 index 00000000000..3fcc731e65b --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_microsoft_store_for_business_app_assignments_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsCountRequestBuilder) { + m := &MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.microsoftStoreForBusinessApp/assignments/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsCountRequestBuilder) { + return NewMobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_microsoft_store_for_business_app_assignments_mobile_app_assignment_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_microsoft_store_for_business_app_assignments_mobile_app_assignment_item_request_builder.go new file mode 100644 index 00000000000..b407011ed08 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_microsoft_store_for_business_app_assignments_mobile_app_assignment_item_request_builder.go @@ -0,0 +1,159 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsMobileAppAssignmentItemRequestBuilder provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsMobileAppAssignmentItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters the list of group assignments for this mobile app. +type MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + m := &MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsMobileAppAssignmentItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.microsoftStoreForBusinessApp/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsMobileAppAssignmentItemRequestBuilder instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsMobileAppAssignmentItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property assignments for deviceAppManagement +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsMobileAppAssignmentItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsMobileAppAssignmentItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// Patch update the navigation property assignments in deviceAppManagement +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsMobileAppAssignmentItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// ToDeleteRequestInformation delete navigation property assignments for deviceAppManagement +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsMobileAppAssignmentItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsMobileAppAssignmentItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property assignments in deviceAppManagement +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsMobileAppAssignmentItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsMobileAppAssignmentItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + return NewMobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsMobileAppAssignmentItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_microsoft_store_for_business_app_assignments_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_microsoft_store_for_business_app_assignments_request_builder.go new file mode 100644 index 00000000000..54d8978fe93 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_microsoft_store_for_business_app_assignments_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsRequestBuilder provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsRequestBuilderGetQueryParameters the list of group assignments for this mobile app. +type MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppAssignmentId provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsRequestBuilder) ByMobileAppAssignmentId(mobileAppAssignmentId string)(*MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppAssignmentId != "" { + urlTplParams["mobileAppAssignment%2Did"] = mobileAppAssignmentId + } + return NewMobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsRequestBuilderInternal instantiates a new AssignmentsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsRequestBuilder) { + m := &MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.microsoftStoreForBusinessApp/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsRequestBuilder instantiates a new AssignmentsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsRequestBuilder) Count()(*MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsCountRequestBuilder) { + return NewMobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentCollectionResponseable), nil +} +// Post create new navigation property to assignments for deviceAppManagement +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// ToGetRequestInformation the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to assignments for deviceAppManagement +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsRequestBuilder) { + return NewMobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_microsoft_store_for_business_app_categories_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_microsoft_store_for_business_app_categories_count_request_builder.go new file mode 100644 index 00000000000..c5ace88be5e --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_microsoft_store_for_business_app_categories_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesCountRequestBuilder) { + m := &MobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.microsoftStoreForBusinessApp/categories/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesCountRequestBuilder) { + return NewMobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_microsoft_store_for_business_app_categories_mobile_app_category_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_microsoft_store_for_business_app_categories_mobile_app_category_item_request_builder.go new file mode 100644 index 00000000000..3cf7f9e76a3 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_microsoft_store_for_business_app_categories_mobile_app_category_item_request_builder.go @@ -0,0 +1,81 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesMobileAppCategoryItemRequestBuilder provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesMobileAppCategoryItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters the list of categories for this app. +type MobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesMobileAppCategoryItemRequestBuilderInternal instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesMobileAppCategoryItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesMobileAppCategoryItemRequestBuilder) { + m := &MobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesMobileAppCategoryItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.microsoftStoreForBusinessApp/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesMobileAppCategoryItemRequestBuilder instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesMobileAppCategoryItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesMobileAppCategoryItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesMobileAppCategoryItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get the list of categories for this app. +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesMobileAppCategoryItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppCategoryFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryable), nil +} +// ToGetRequestInformation the list of categories for this app. +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesMobileAppCategoryItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesMobileAppCategoryItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesMobileAppCategoryItemRequestBuilder) { + return NewMobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesMobileAppCategoryItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_microsoft_store_for_business_app_categories_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_microsoft_store_for_business_app_categories_request_builder.go new file mode 100644 index 00000000000..f57f0b88bd7 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_microsoft_store_for_business_app_categories_request_builder.go @@ -0,0 +1,108 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesRequestBuilder provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesRequestBuilderGetQueryParameters the list of categories for this app. +type MobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesRequestBuilderGetQueryParameters +} +// ByMobileAppCategoryId provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesRequestBuilder) ByMobileAppCategoryId(mobileAppCategoryId string)(*MobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesMobileAppCategoryItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppCategoryId != "" { + urlTplParams["mobileAppCategory%2Did"] = mobileAppCategoryId + } + return NewMobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesMobileAppCategoryItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesRequestBuilderInternal instantiates a new CategoriesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesRequestBuilder) { + m := &MobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.microsoftStoreForBusinessApp/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesRequestBuilder instantiates a new CategoriesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesRequestBuilder) Count()(*MobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesCountRequestBuilder) { + return NewMobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of categories for this app. +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppCategoryCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryCollectionResponseable), nil +} +// ToGetRequestInformation the list of categories for this app. +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesRequestBuilder) { + return NewMobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_microsoft_store_for_business_app_contained_apps_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_microsoft_store_for_business_app_contained_apps_count_request_builder.go new file mode 100644 index 00000000000..d026f4d2796 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_microsoft_store_for_business_app_contained_apps_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsCountRequestBuilder) { + m := &MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.microsoftStoreForBusinessApp/containedApps/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsCountRequestBuilder) { + return NewMobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_microsoft_store_for_business_app_contained_apps_mobile_contained_app_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_microsoft_store_for_business_app_contained_apps_mobile_contained_app_item_request_builder.go new file mode 100644 index 00000000000..99955447260 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_microsoft_store_for_business_app_contained_apps_mobile_contained_app_item_request_builder.go @@ -0,0 +1,159 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsMobileContainedAppItemRequestBuilder provides operations to manage the containedApps property of the microsoft.graph.microsoftStoreForBusinessApp entity. +type MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsMobileContainedAppItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsMobileContainedAppItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsMobileContainedAppItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsMobileContainedAppItemRequestBuilderGetQueryParameters the collection of contained apps in a mobileApp acting as a package. +type MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsMobileContainedAppItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsMobileContainedAppItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsMobileContainedAppItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsMobileContainedAppItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsMobileContainedAppItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsMobileContainedAppItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsMobileContainedAppItemRequestBuilderInternal instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsMobileContainedAppItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsMobileContainedAppItemRequestBuilder) { + m := &MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsMobileContainedAppItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.microsoftStoreForBusinessApp/containedApps/{mobileContainedApp%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsMobileContainedAppItemRequestBuilder instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsMobileContainedAppItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsMobileContainedAppItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsMobileContainedAppItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property containedApps for deviceAppManagement +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsMobileContainedAppItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsMobileContainedAppItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get the collection of contained apps in a mobileApp acting as a package. +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsMobileContainedAppItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsMobileContainedAppItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileContainedAppFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable), nil +} +// Patch update the navigation property containedApps in deviceAppManagement +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsMobileContainedAppItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, requestConfiguration *MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsMobileContainedAppItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileContainedAppFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable), nil +} +// ToDeleteRequestInformation delete navigation property containedApps for deviceAppManagement +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsMobileContainedAppItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsMobileContainedAppItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation the collection of contained apps in a mobileApp acting as a package. +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsMobileContainedAppItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsMobileContainedAppItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property containedApps in deviceAppManagement +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsMobileContainedAppItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, requestConfiguration *MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsMobileContainedAppItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsMobileContainedAppItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsMobileContainedAppItemRequestBuilder) { + return NewMobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsMobileContainedAppItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_microsoft_store_for_business_app_contained_apps_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_microsoft_store_for_business_app_contained_apps_request_builder.go new file mode 100644 index 00000000000..f24ba20f904 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_microsoft_store_for_business_app_contained_apps_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsRequestBuilder provides operations to manage the containedApps property of the microsoft.graph.microsoftStoreForBusinessApp entity. +type MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsRequestBuilderGetQueryParameters the collection of contained apps in a mobileApp acting as a package. +type MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileContainedAppId provides operations to manage the containedApps property of the microsoft.graph.microsoftStoreForBusinessApp entity. +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsRequestBuilder) ByMobileContainedAppId(mobileContainedAppId string)(*MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsMobileContainedAppItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileContainedAppId != "" { + urlTplParams["mobileContainedApp%2Did"] = mobileContainedAppId + } + return NewMobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsMobileContainedAppItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsRequestBuilderInternal instantiates a new ContainedAppsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsRequestBuilder) { + m := &MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.microsoftStoreForBusinessApp/containedApps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsRequestBuilder instantiates a new ContainedAppsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsRequestBuilder) Count()(*MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsCountRequestBuilder) { + return NewMobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the collection of contained apps in a mobileApp acting as a package. +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileContainedAppCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppCollectionResponseable), nil +} +// Post create new navigation property to containedApps for deviceAppManagement +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, requestConfiguration *MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileContainedAppFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable), nil +} +// ToGetRequestInformation the collection of contained apps in a mobileApp acting as a package. +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to containedApps for deviceAppManagement +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, requestConfiguration *MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsRequestBuilder) { + return NewMobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_microsoft_store_for_business_app_relationships_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_microsoft_store_for_business_app_relationships_count_request_builder.go new file mode 100644 index 00000000000..4d987dc2314 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_microsoft_store_for_business_app_relationships_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsCountRequestBuilder) { + m := &MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.microsoftStoreForBusinessApp/relationships/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsCountRequestBuilder) { + return NewMobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_microsoft_store_for_business_app_relationships_mobile_app_relationship_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_microsoft_store_for_business_app_relationships_mobile_app_relationship_item_request_builder.go new file mode 100644 index 00000000000..9edffebf217 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_microsoft_store_for_business_app_relationships_mobile_app_relationship_item_request_builder.go @@ -0,0 +1,159 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsMobileAppRelationshipItemRequestBuilder provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsMobileAppRelationshipItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters list of relationships for this mobile app. +type MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal instantiates a new MobileAppRelationshipItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + m := &MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsMobileAppRelationshipItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.microsoftStoreForBusinessApp/relationships/{mobileAppRelationship%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsMobileAppRelationshipItemRequestBuilder instantiates a new MobileAppRelationshipItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsMobileAppRelationshipItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property relationships for deviceAppManagement +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsMobileAppRelationshipItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get list of relationships for this mobile app. +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsMobileAppRelationshipItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// Patch update the navigation property relationships in deviceAppManagement +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsMobileAppRelationshipItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// ToDeleteRequestInformation delete navigation property relationships for deviceAppManagement +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsMobileAppRelationshipItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation list of relationships for this mobile app. +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsMobileAppRelationshipItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property relationships in deviceAppManagement +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsMobileAppRelationshipItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsMobileAppRelationshipItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + return NewMobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsMobileAppRelationshipItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_microsoft_store_for_business_app_relationships_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_microsoft_store_for_business_app_relationships_request_builder.go new file mode 100644 index 00000000000..dbda0b8f231 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_microsoft_store_for_business_app_relationships_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsRequestBuilder provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsRequestBuilderGetQueryParameters list of relationships for this mobile app. +type MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppRelationshipId provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsRequestBuilder) ByMobileAppRelationshipId(mobileAppRelationshipId string)(*MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppRelationshipId != "" { + urlTplParams["mobileAppRelationship%2Did"] = mobileAppRelationshipId + } + return NewMobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsRequestBuilderInternal instantiates a new RelationshipsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsRequestBuilder) { + m := &MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.microsoftStoreForBusinessApp/relationships{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsRequestBuilder instantiates a new RelationshipsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsRequestBuilder) Count()(*MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsCountRequestBuilder) { + return NewMobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get list of relationships for this mobile app. +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipCollectionResponseable), nil +} +// Post create new navigation property to relationships for deviceAppManagement +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// ToGetRequestInformation list of relationships for this mobile app. +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to relationships for deviceAppManagement +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsRequestBuilder) { + return NewMobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_microsoft_store_for_business_app_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_microsoft_store_for_business_app_request_builder.go index fabd5e0785f..e6e7199ccca 100644 --- a/deviceappmanagement/mobile_apps_item_graph_microsoft_store_for_business_app_request_builder.go +++ b/deviceappmanagement/mobile_apps_item_graph_microsoft_store_for_business_app_request_builder.go @@ -27,6 +27,14 @@ type MobileAppsItemGraphMicrosoftStoreForBusinessAppRequestBuilderGetRequestConf // Request query parameters QueryParameters *MobileAppsItemGraphMicrosoftStoreForBusinessAppRequestBuilderGetQueryParameters } +// Assignments provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppRequestBuilder) Assignments()(*MobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsRequestBuilder) { + return NewMobileAppsItemGraphMicrosoftStoreForBusinessAppAssignmentsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Categories provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppRequestBuilder) Categories()(*MobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesRequestBuilder) { + return NewMobileAppsItemGraphMicrosoftStoreForBusinessAppCategoriesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // NewMobileAppsItemGraphMicrosoftStoreForBusinessAppRequestBuilderInternal instantiates a new GraphMicrosoftStoreForBusinessAppRequestBuilder and sets the default values. func NewMobileAppsItemGraphMicrosoftStoreForBusinessAppRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphMicrosoftStoreForBusinessAppRequestBuilder) { m := &MobileAppsItemGraphMicrosoftStoreForBusinessAppRequestBuilder{ @@ -40,6 +48,10 @@ func NewMobileAppsItemGraphMicrosoftStoreForBusinessAppRequestBuilder(rawUrl str urlParams["request-raw-url"] = rawUrl return NewMobileAppsItemGraphMicrosoftStoreForBusinessAppRequestBuilderInternal(urlParams, requestAdapter) } +// ContainedApps provides operations to manage the containedApps property of the microsoft.graph.microsoftStoreForBusinessApp entity. +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppRequestBuilder) ContainedApps()(*MobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsRequestBuilder) { + return NewMobileAppsItemGraphMicrosoftStoreForBusinessAppContainedAppsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // Get get the item of type microsoft.graph.mobileApp as microsoft.graph.microsoftStoreForBusinessApp func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphMicrosoftStoreForBusinessAppRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MicrosoftStoreForBusinessAppable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); @@ -59,6 +71,10 @@ func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppRequestBuilder) Get(ctx } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MicrosoftStoreForBusinessAppable), nil } +// Relationships provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppRequestBuilder) Relationships()(*MobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsRequestBuilder) { + return NewMobileAppsItemGraphMicrosoftStoreForBusinessAppRelationshipsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation get the item of type microsoft.graph.mobileApp as microsoft.graph.microsoftStoreForBusinessApp func (m *MobileAppsItemGraphMicrosoftStoreForBusinessAppRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphMicrosoftStoreForBusinessAppRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_assignments_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_assignments_count_request_builder.go new file mode 100644 index 00000000000..ab052211e08 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_assignments_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWin32LobAppAssignmentsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphWin32LobAppAssignmentsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWin32LobAppAssignmentsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphWin32LobAppAssignmentsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphWin32LobAppAssignmentsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWin32LobAppAssignmentsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWin32LobAppAssignmentsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphWin32LobAppAssignmentsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWin32LobAppAssignmentsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWin32LobAppAssignmentsCountRequestBuilder) { + m := &MobileAppsItemGraphWin32LobAppAssignmentsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/assignments/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWin32LobAppAssignmentsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWin32LobAppAssignmentsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWin32LobAppAssignmentsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWin32LobAppAssignmentsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphWin32LobAppAssignmentsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWin32LobAppAssignmentsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphWin32LobAppAssignmentsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWin32LobAppAssignmentsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWin32LobAppAssignmentsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWin32LobAppAssignmentsCountRequestBuilder) { + return NewMobileAppsItemGraphWin32LobAppAssignmentsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_assignments_mobile_app_assignment_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_assignments_mobile_app_assignment_item_request_builder.go new file mode 100644 index 00000000000..a851a7a8d75 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_assignments_mobile_app_assignment_item_request_builder.go @@ -0,0 +1,159 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWin32LobAppAssignmentsMobileAppAssignmentItemRequestBuilder provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphWin32LobAppAssignmentsMobileAppAssignmentItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWin32LobAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWin32LobAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphWin32LobAppAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters the list of group assignments for this mobile app. +type MobileAppsItemGraphWin32LobAppAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphWin32LobAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWin32LobAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWin32LobAppAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphWin32LobAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWin32LobAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphWin32LobAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWin32LobAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWin32LobAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + m := &MobileAppsItemGraphWin32LobAppAssignmentsMobileAppAssignmentItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWin32LobAppAssignmentsMobileAppAssignmentItemRequestBuilder instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWin32LobAppAssignmentsMobileAppAssignmentItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWin32LobAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWin32LobAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property assignments for deviceAppManagement +func (m *MobileAppsItemGraphWin32LobAppAssignmentsMobileAppAssignmentItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphWin32LobAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphWin32LobAppAssignmentsMobileAppAssignmentItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWin32LobAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// Patch update the navigation property assignments in deviceAppManagement +func (m *MobileAppsItemGraphWin32LobAppAssignmentsMobileAppAssignmentItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphWin32LobAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// ToDeleteRequestInformation delete navigation property assignments for deviceAppManagement +func (m *MobileAppsItemGraphWin32LobAppAssignmentsMobileAppAssignmentItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWin32LobAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphWin32LobAppAssignmentsMobileAppAssignmentItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWin32LobAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property assignments in deviceAppManagement +func (m *MobileAppsItemGraphWin32LobAppAssignmentsMobileAppAssignmentItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphWin32LobAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWin32LobAppAssignmentsMobileAppAssignmentItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWin32LobAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + return NewMobileAppsItemGraphWin32LobAppAssignmentsMobileAppAssignmentItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_assignments_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_assignments_request_builder.go new file mode 100644 index 00000000000..e447fcfaaee --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_assignments_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWin32LobAppAssignmentsRequestBuilder provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphWin32LobAppAssignmentsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWin32LobAppAssignmentsRequestBuilderGetQueryParameters the list of group assignments for this mobile app. +type MobileAppsItemGraphWin32LobAppAssignmentsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphWin32LobAppAssignmentsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWin32LobAppAssignmentsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWin32LobAppAssignmentsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphWin32LobAppAssignmentsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWin32LobAppAssignmentsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppAssignmentId provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphWin32LobAppAssignmentsRequestBuilder) ByMobileAppAssignmentId(mobileAppAssignmentId string)(*MobileAppsItemGraphWin32LobAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppAssignmentId != "" { + urlTplParams["mobileAppAssignment%2Did"] = mobileAppAssignmentId + } + return NewMobileAppsItemGraphWin32LobAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphWin32LobAppAssignmentsRequestBuilderInternal instantiates a new AssignmentsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWin32LobAppAssignmentsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWin32LobAppAssignmentsRequestBuilder) { + m := &MobileAppsItemGraphWin32LobAppAssignmentsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWin32LobAppAssignmentsRequestBuilder instantiates a new AssignmentsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWin32LobAppAssignmentsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWin32LobAppAssignmentsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWin32LobAppAssignmentsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphWin32LobAppAssignmentsRequestBuilder) Count()(*MobileAppsItemGraphWin32LobAppAssignmentsCountRequestBuilder) { + return NewMobileAppsItemGraphWin32LobAppAssignmentsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphWin32LobAppAssignmentsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWin32LobAppAssignmentsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentCollectionResponseable), nil +} +// Post create new navigation property to assignments for deviceAppManagement +func (m *MobileAppsItemGraphWin32LobAppAssignmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphWin32LobAppAssignmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// ToGetRequestInformation the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphWin32LobAppAssignmentsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWin32LobAppAssignmentsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to assignments for deviceAppManagement +func (m *MobileAppsItemGraphWin32LobAppAssignmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphWin32LobAppAssignmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWin32LobAppAssignmentsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWin32LobAppAssignmentsRequestBuilder) { + return NewMobileAppsItemGraphWin32LobAppAssignmentsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_categories_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_categories_count_request_builder.go new file mode 100644 index 00000000000..45a1dc932d0 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_categories_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWin32LobAppCategoriesCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphWin32LobAppCategoriesCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWin32LobAppCategoriesCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphWin32LobAppCategoriesCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphWin32LobAppCategoriesCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWin32LobAppCategoriesCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWin32LobAppCategoriesCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphWin32LobAppCategoriesCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWin32LobAppCategoriesCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWin32LobAppCategoriesCountRequestBuilder) { + m := &MobileAppsItemGraphWin32LobAppCategoriesCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/categories/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWin32LobAppCategoriesCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWin32LobAppCategoriesCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWin32LobAppCategoriesCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWin32LobAppCategoriesCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphWin32LobAppCategoriesCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWin32LobAppCategoriesCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphWin32LobAppCategoriesCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWin32LobAppCategoriesCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWin32LobAppCategoriesCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWin32LobAppCategoriesCountRequestBuilder) { + return NewMobileAppsItemGraphWin32LobAppCategoriesCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_categories_mobile_app_category_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_categories_mobile_app_category_item_request_builder.go new file mode 100644 index 00000000000..ca0b264f0a2 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_categories_mobile_app_category_item_request_builder.go @@ -0,0 +1,81 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWin32LobAppCategoriesMobileAppCategoryItemRequestBuilder provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphWin32LobAppCategoriesMobileAppCategoryItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWin32LobAppCategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters the list of categories for this app. +type MobileAppsItemGraphWin32LobAppCategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphWin32LobAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWin32LobAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWin32LobAppCategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphWin32LobAppCategoriesMobileAppCategoryItemRequestBuilderInternal instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWin32LobAppCategoriesMobileAppCategoryItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWin32LobAppCategoriesMobileAppCategoryItemRequestBuilder) { + m := &MobileAppsItemGraphWin32LobAppCategoriesMobileAppCategoryItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWin32LobAppCategoriesMobileAppCategoryItemRequestBuilder instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWin32LobAppCategoriesMobileAppCategoryItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWin32LobAppCategoriesMobileAppCategoryItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWin32LobAppCategoriesMobileAppCategoryItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get the list of categories for this app. +func (m *MobileAppsItemGraphWin32LobAppCategoriesMobileAppCategoryItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWin32LobAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppCategoryFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryable), nil +} +// ToGetRequestInformation the list of categories for this app. +func (m *MobileAppsItemGraphWin32LobAppCategoriesMobileAppCategoryItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWin32LobAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWin32LobAppCategoriesMobileAppCategoryItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWin32LobAppCategoriesMobileAppCategoryItemRequestBuilder) { + return NewMobileAppsItemGraphWin32LobAppCategoriesMobileAppCategoryItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_categories_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_categories_request_builder.go new file mode 100644 index 00000000000..92d0a2e462e --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_categories_request_builder.go @@ -0,0 +1,108 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWin32LobAppCategoriesRequestBuilder provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphWin32LobAppCategoriesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWin32LobAppCategoriesRequestBuilderGetQueryParameters the list of categories for this app. +type MobileAppsItemGraphWin32LobAppCategoriesRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphWin32LobAppCategoriesRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWin32LobAppCategoriesRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWin32LobAppCategoriesRequestBuilderGetQueryParameters +} +// ByMobileAppCategoryId provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphWin32LobAppCategoriesRequestBuilder) ByMobileAppCategoryId(mobileAppCategoryId string)(*MobileAppsItemGraphWin32LobAppCategoriesMobileAppCategoryItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppCategoryId != "" { + urlTplParams["mobileAppCategory%2Did"] = mobileAppCategoryId + } + return NewMobileAppsItemGraphWin32LobAppCategoriesMobileAppCategoryItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphWin32LobAppCategoriesRequestBuilderInternal instantiates a new CategoriesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWin32LobAppCategoriesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWin32LobAppCategoriesRequestBuilder) { + m := &MobileAppsItemGraphWin32LobAppCategoriesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWin32LobAppCategoriesRequestBuilder instantiates a new CategoriesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWin32LobAppCategoriesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWin32LobAppCategoriesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWin32LobAppCategoriesRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphWin32LobAppCategoriesRequestBuilder) Count()(*MobileAppsItemGraphWin32LobAppCategoriesCountRequestBuilder) { + return NewMobileAppsItemGraphWin32LobAppCategoriesCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of categories for this app. +func (m *MobileAppsItemGraphWin32LobAppCategoriesRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWin32LobAppCategoriesRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppCategoryCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryCollectionResponseable), nil +} +// ToGetRequestInformation the list of categories for this app. +func (m *MobileAppsItemGraphWin32LobAppCategoriesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWin32LobAppCategoriesRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWin32LobAppCategoriesRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWin32LobAppCategoriesRequestBuilder) { + return NewMobileAppsItemGraphWin32LobAppCategoriesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_content_versions_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_content_versions_count_request_builder.go new file mode 100644 index 00000000000..8fef27f9aea --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_content_versions_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWin32LobAppContentVersionsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphWin32LobAppContentVersionsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWin32LobAppContentVersionsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphWin32LobAppContentVersionsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphWin32LobAppContentVersionsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWin32LobAppContentVersionsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWin32LobAppContentVersionsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphWin32LobAppContentVersionsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWin32LobAppContentVersionsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWin32LobAppContentVersionsCountRequestBuilder) { + m := &MobileAppsItemGraphWin32LobAppContentVersionsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/contentVersions/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWin32LobAppContentVersionsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWin32LobAppContentVersionsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWin32LobAppContentVersionsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWin32LobAppContentVersionsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphWin32LobAppContentVersionsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWin32LobAppContentVersionsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphWin32LobAppContentVersionsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWin32LobAppContentVersionsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWin32LobAppContentVersionsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWin32LobAppContentVersionsCountRequestBuilder) { + return NewMobileAppsItemGraphWin32LobAppContentVersionsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_content_versions_item_contained_apps_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_content_versions_item_contained_apps_count_request_builder.go new file mode 100644 index 00000000000..69abbc138e3 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_content_versions_item_contained_apps_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsCountRequestBuilder) { + m := &MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/contentVersions/{mobileAppContent%2Did}/containedApps/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsCountRequestBuilder) { + return NewMobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_content_versions_item_contained_apps_mobile_contained_app_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_content_versions_item_contained_apps_mobile_contained_app_item_request_builder.go new file mode 100644 index 00000000000..507a3776d5a --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_content_versions_item_contained_apps_mobile_contained_app_item_request_builder.go @@ -0,0 +1,159 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. +type MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetQueryParameters the collection of contained apps in a MobileLobApp acting as a package. +type MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderInternal instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) { + m := &MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/contentVersions/{mobileAppContent%2Did}/containedApps/{mobileContainedApp%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property containedApps for deviceAppManagement +func (m *MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get the collection of contained apps in a MobileLobApp acting as a package. +func (m *MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileContainedAppFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable), nil +} +// Patch update the navigation property containedApps in deviceAppManagement +func (m *MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, requestConfiguration *MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileContainedAppFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable), nil +} +// ToDeleteRequestInformation delete navigation property containedApps for deviceAppManagement +func (m *MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation the collection of contained apps in a MobileLobApp acting as a package. +func (m *MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property containedApps in deviceAppManagement +func (m *MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, requestConfiguration *MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) { + return NewMobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_content_versions_item_contained_apps_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_content_versions_item_contained_apps_request_builder.go new file mode 100644 index 00000000000..c6f71aea8ce --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_content_versions_item_contained_apps_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsRequestBuilder provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. +type MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsRequestBuilderGetQueryParameters the collection of contained apps in a MobileLobApp acting as a package. +type MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileContainedAppId provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. +func (m *MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsRequestBuilder) ByMobileContainedAppId(mobileContainedAppId string)(*MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileContainedAppId != "" { + urlTplParams["mobileContainedApp%2Did"] = mobileContainedAppId + } + return NewMobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsRequestBuilderInternal instantiates a new ContainedAppsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsRequestBuilder) { + m := &MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/contentVersions/{mobileAppContent%2Did}/containedApps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsRequestBuilder instantiates a new ContainedAppsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsRequestBuilder) Count()(*MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsCountRequestBuilder) { + return NewMobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the collection of contained apps in a MobileLobApp acting as a package. +func (m *MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileContainedAppCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppCollectionResponseable), nil +} +// Post create new navigation property to containedApps for deviceAppManagement +func (m *MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, requestConfiguration *MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileContainedAppFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable), nil +} +// ToGetRequestInformation the collection of contained apps in a MobileLobApp acting as a package. +func (m *MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to containedApps for deviceAppManagement +func (m *MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, requestConfiguration *MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsRequestBuilder) { + return NewMobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_content_versions_item_files_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_content_versions_item_files_count_request_builder.go new file mode 100644 index 00000000000..a9c76993dc2 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_content_versions_item_files_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWin32LobAppContentVersionsItemFilesCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphWin32LobAppContentVersionsItemFilesCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWin32LobAppContentVersionsItemFilesCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphWin32LobAppContentVersionsItemFilesCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphWin32LobAppContentVersionsItemFilesCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWin32LobAppContentVersionsItemFilesCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWin32LobAppContentVersionsItemFilesCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphWin32LobAppContentVersionsItemFilesCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWin32LobAppContentVersionsItemFilesCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWin32LobAppContentVersionsItemFilesCountRequestBuilder) { + m := &MobileAppsItemGraphWin32LobAppContentVersionsItemFilesCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/contentVersions/{mobileAppContent%2Did}/files/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWin32LobAppContentVersionsItemFilesCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWin32LobAppContentVersionsItemFilesCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWin32LobAppContentVersionsItemFilesCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWin32LobAppContentVersionsItemFilesCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphWin32LobAppContentVersionsItemFilesCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWin32LobAppContentVersionsItemFilesCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphWin32LobAppContentVersionsItemFilesCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWin32LobAppContentVersionsItemFilesCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWin32LobAppContentVersionsItemFilesCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWin32LobAppContentVersionsItemFilesCountRequestBuilder) { + return NewMobileAppsItemGraphWin32LobAppContentVersionsItemFilesCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_content_versions_item_files_item_commit_post_request_body.go b/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_content_versions_item_files_item_commit_post_request_body.go new file mode 100644 index 00000000000..c1d2657e7f5 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_content_versions_item_files_item_commit_post_request_body.go @@ -0,0 +1,111 @@ +package deviceappmanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +// MobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemCommitPostRequestBody +type MobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemCommitPostRequestBody struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewMobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemCommitPostRequestBody instantiates a new MobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemCommitPostRequestBody and sets the default values. +func NewMobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemCommitPostRequestBody()(*MobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemCommitPostRequestBody) { + m := &MobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemCommitPostRequestBody{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateMobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemCommitPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemCommitPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemCommitPostRequestBody(), nil +} +// GetAdditionalData gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *MobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemCommitPostRequestBody) GetAdditionalData()(map[string]any) { + val , err := m.backingStore.Get("additionalData") + if err != nil { + panic(err) + } + if val == nil { + var value = make(map[string]any); + m.SetAdditionalData(value); + } + return val.(map[string]any) +} +// GetBackingStore gets the backingStore property value. Stores model information. +func (m *MobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemCommitPostRequestBody) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemCommitPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["fileEncryptionInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateFileEncryptionInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetFileEncryptionInfo(val.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable)) + } + return nil + } + return res +} +// GetFileEncryptionInfo gets the fileEncryptionInfo property value. The fileEncryptionInfo property +func (m *MobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemCommitPostRequestBody) GetFileEncryptionInfo()(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable) { + val, err := m.GetBackingStore().Get("fileEncryptionInfo") + if err != nil { + panic(err) + } + if val != nil { + return val.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable) + } + return nil +} +// Serialize serializes information the current object +func (m *MobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemCommitPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("fileEncryptionInfo", m.GetFileEncryptionInfo()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *MobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemCommitPostRequestBody) SetAdditionalData(value map[string]any)() { + err := m.GetBackingStore().Set("additionalData", value) + if err != nil { + panic(err) + } +} +// SetBackingStore sets the backingStore property value. Stores model information. +func (m *MobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemCommitPostRequestBody) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetFileEncryptionInfo sets the fileEncryptionInfo property value. The fileEncryptionInfo property +func (m *MobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemCommitPostRequestBody) SetFileEncryptionInfo(value ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable)() { + err := m.GetBackingStore().Set("fileEncryptionInfo", value) + if err != nil { + panic(err) + } +} +// MobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemCommitPostRequestBodyable +type MobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemCommitPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetFileEncryptionInfo()(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetFileEncryptionInfo(value ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable)() +} diff --git a/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_content_versions_item_files_item_commit_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_content_versions_item_files_item_commit_request_builder.go new file mode 100644 index 00000000000..3977f653d38 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_content_versions_item_files_item_commit_request_builder.go @@ -0,0 +1,68 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemCommitRequestBuilder provides operations to call the commit method. +type MobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemCommitRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemCommitRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemCommitRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemCommitRequestBuilderInternal instantiates a new CommitRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemCommitRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemCommitRequestBuilder) { + m := &MobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemCommitRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/commit", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemCommitRequestBuilder instantiates a new CommitRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemCommitRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemCommitRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemCommitRequestBuilderInternal(urlParams, requestAdapter) +} +// Post commits a file of a given app. +func (m *MobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemCommitRequestBuilder) Post(ctx context.Context, body MobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemCommitPostRequestBodyable, requestConfiguration *MobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemCommitRequestBuilderPostRequestConfiguration)(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation commits a file of a given app. +func (m *MobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemCommitRequestBuilder) ToPostRequestInformation(ctx context.Context, body MobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemCommitPostRequestBodyable, requestConfiguration *MobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemCommitRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemCommitRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemCommitRequestBuilder) { + return NewMobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemCommitRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_content_versions_item_files_item_renew_upload_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_content_versions_item_files_item_renew_upload_request_builder.go new file mode 100644 index 00000000000..8230c6c636a --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_content_versions_item_files_item_renew_upload_request_builder.go @@ -0,0 +1,64 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemRenewUploadRequestBuilder provides operations to call the renewUpload method. +type MobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemRenewUploadRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemRenewUploadRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemRenewUploadRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemRenewUploadRequestBuilderInternal instantiates a new RenewUploadRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemRenewUploadRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemRenewUploadRequestBuilder) { + m := &MobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemRenewUploadRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/renewUpload", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemRenewUploadRequestBuilder instantiates a new RenewUploadRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemRenewUploadRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemRenewUploadRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemRenewUploadRequestBuilderInternal(urlParams, requestAdapter) +} +// Post renews the SAS URI for an application file upload. +func (m *MobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemRenewUploadRequestBuilder) Post(ctx context.Context, requestConfiguration *MobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemRenewUploadRequestBuilderPostRequestConfiguration)(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation renews the SAS URI for an application file upload. +func (m *MobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemRenewUploadRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemRenewUploadRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemRenewUploadRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemRenewUploadRequestBuilder) { + return NewMobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemRenewUploadRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_content_versions_item_files_mobile_app_content_file_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_content_versions_item_files_mobile_app_content_file_item_request_builder.go new file mode 100644 index 00000000000..113558c82ad --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_content_versions_item_files_mobile_app_content_file_item_request_builder.go @@ -0,0 +1,167 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWin32LobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. +type MobileAppsItemGraphWin32LobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWin32LobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWin32LobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphWin32LobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetQueryParameters the list of files for this app content version. +type MobileAppsItemGraphWin32LobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphWin32LobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWin32LobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWin32LobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphWin32LobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWin32LobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// Commit provides operations to call the commit method. +func (m *MobileAppsItemGraphWin32LobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) Commit()(*MobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemCommitRequestBuilder) { + return NewMobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemCommitRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphWin32LobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderInternal instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWin32LobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWin32LobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) { + m := &MobileAppsItemGraphWin32LobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWin32LobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWin32LobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWin32LobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWin32LobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property files for deviceAppManagement +func (m *MobileAppsItemGraphWin32LobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphWin32LobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get the list of files for this app content version. +func (m *MobileAppsItemGraphWin32LobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWin32LobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFileFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable), nil +} +// Patch update the navigation property files in deviceAppManagement +func (m *MobileAppsItemGraphWin32LobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, requestConfiguration *MobileAppsItemGraphWin32LobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFileFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable), nil +} +// RenewUpload provides operations to call the renewUpload method. +func (m *MobileAppsItemGraphWin32LobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) RenewUpload()(*MobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemRenewUploadRequestBuilder) { + return NewMobileAppsItemGraphWin32LobAppContentVersionsItemFilesItemRenewUploadRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToDeleteRequestInformation delete navigation property files for deviceAppManagement +func (m *MobileAppsItemGraphWin32LobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWin32LobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation the list of files for this app content version. +func (m *MobileAppsItemGraphWin32LobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWin32LobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property files in deviceAppManagement +func (m *MobileAppsItemGraphWin32LobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, requestConfiguration *MobileAppsItemGraphWin32LobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWin32LobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWin32LobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) { + return NewMobileAppsItemGraphWin32LobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_content_versions_item_files_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_content_versions_item_files_request_builder.go new file mode 100644 index 00000000000..93e1b40bc03 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_content_versions_item_files_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWin32LobAppContentVersionsItemFilesRequestBuilder provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. +type MobileAppsItemGraphWin32LobAppContentVersionsItemFilesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWin32LobAppContentVersionsItemFilesRequestBuilderGetQueryParameters the list of files for this app content version. +type MobileAppsItemGraphWin32LobAppContentVersionsItemFilesRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphWin32LobAppContentVersionsItemFilesRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWin32LobAppContentVersionsItemFilesRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWin32LobAppContentVersionsItemFilesRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphWin32LobAppContentVersionsItemFilesRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWin32LobAppContentVersionsItemFilesRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppContentFileId provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. +func (m *MobileAppsItemGraphWin32LobAppContentVersionsItemFilesRequestBuilder) ByMobileAppContentFileId(mobileAppContentFileId string)(*MobileAppsItemGraphWin32LobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppContentFileId != "" { + urlTplParams["mobileAppContentFile%2Did"] = mobileAppContentFileId + } + return NewMobileAppsItemGraphWin32LobAppContentVersionsItemFilesMobileAppContentFileItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphWin32LobAppContentVersionsItemFilesRequestBuilderInternal instantiates a new FilesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWin32LobAppContentVersionsItemFilesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWin32LobAppContentVersionsItemFilesRequestBuilder) { + m := &MobileAppsItemGraphWin32LobAppContentVersionsItemFilesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/contentVersions/{mobileAppContent%2Did}/files{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWin32LobAppContentVersionsItemFilesRequestBuilder instantiates a new FilesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWin32LobAppContentVersionsItemFilesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWin32LobAppContentVersionsItemFilesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWin32LobAppContentVersionsItemFilesRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphWin32LobAppContentVersionsItemFilesRequestBuilder) Count()(*MobileAppsItemGraphWin32LobAppContentVersionsItemFilesCountRequestBuilder) { + return NewMobileAppsItemGraphWin32LobAppContentVersionsItemFilesCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of files for this app content version. +func (m *MobileAppsItemGraphWin32LobAppContentVersionsItemFilesRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWin32LobAppContentVersionsItemFilesRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFileCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileCollectionResponseable), nil +} +// Post create new navigation property to files for deviceAppManagement +func (m *MobileAppsItemGraphWin32LobAppContentVersionsItemFilesRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, requestConfiguration *MobileAppsItemGraphWin32LobAppContentVersionsItemFilesRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFileFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable), nil +} +// ToGetRequestInformation the list of files for this app content version. +func (m *MobileAppsItemGraphWin32LobAppContentVersionsItemFilesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWin32LobAppContentVersionsItemFilesRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to files for deviceAppManagement +func (m *MobileAppsItemGraphWin32LobAppContentVersionsItemFilesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, requestConfiguration *MobileAppsItemGraphWin32LobAppContentVersionsItemFilesRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWin32LobAppContentVersionsItemFilesRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWin32LobAppContentVersionsItemFilesRequestBuilder) { + return NewMobileAppsItemGraphWin32LobAppContentVersionsItemFilesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_content_versions_mobile_app_content_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_content_versions_mobile_app_content_item_request_builder.go new file mode 100644 index 00000000000..94a374cee0c --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_content_versions_mobile_app_content_item_request_builder.go @@ -0,0 +1,167 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWin32LobAppContentVersionsMobileAppContentItemRequestBuilder provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. +type MobileAppsItemGraphWin32LobAppContentVersionsMobileAppContentItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWin32LobAppContentVersionsMobileAppContentItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWin32LobAppContentVersionsMobileAppContentItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphWin32LobAppContentVersionsMobileAppContentItemRequestBuilderGetQueryParameters the list of content versions for this app. +type MobileAppsItemGraphWin32LobAppContentVersionsMobileAppContentItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphWin32LobAppContentVersionsMobileAppContentItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWin32LobAppContentVersionsMobileAppContentItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWin32LobAppContentVersionsMobileAppContentItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphWin32LobAppContentVersionsMobileAppContentItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWin32LobAppContentVersionsMobileAppContentItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphWin32LobAppContentVersionsMobileAppContentItemRequestBuilderInternal instantiates a new MobileAppContentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWin32LobAppContentVersionsMobileAppContentItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWin32LobAppContentVersionsMobileAppContentItemRequestBuilder) { + m := &MobileAppsItemGraphWin32LobAppContentVersionsMobileAppContentItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/contentVersions/{mobileAppContent%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWin32LobAppContentVersionsMobileAppContentItemRequestBuilder instantiates a new MobileAppContentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWin32LobAppContentVersionsMobileAppContentItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWin32LobAppContentVersionsMobileAppContentItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWin32LobAppContentVersionsMobileAppContentItemRequestBuilderInternal(urlParams, requestAdapter) +} +// ContainedApps provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. +func (m *MobileAppsItemGraphWin32LobAppContentVersionsMobileAppContentItemRequestBuilder) ContainedApps()(*MobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsRequestBuilder) { + return NewMobileAppsItemGraphWin32LobAppContentVersionsItemContainedAppsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Delete delete navigation property contentVersions for deviceAppManagement +func (m *MobileAppsItemGraphWin32LobAppContentVersionsMobileAppContentItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphWin32LobAppContentVersionsMobileAppContentItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Files provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. +func (m *MobileAppsItemGraphWin32LobAppContentVersionsMobileAppContentItemRequestBuilder) Files()(*MobileAppsItemGraphWin32LobAppContentVersionsItemFilesRequestBuilder) { + return NewMobileAppsItemGraphWin32LobAppContentVersionsItemFilesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of content versions for this app. +func (m *MobileAppsItemGraphWin32LobAppContentVersionsMobileAppContentItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWin32LobAppContentVersionsMobileAppContentItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable), nil +} +// Patch update the navigation property contentVersions in deviceAppManagement +func (m *MobileAppsItemGraphWin32LobAppContentVersionsMobileAppContentItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, requestConfiguration *MobileAppsItemGraphWin32LobAppContentVersionsMobileAppContentItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable), nil +} +// ToDeleteRequestInformation delete navigation property contentVersions for deviceAppManagement +func (m *MobileAppsItemGraphWin32LobAppContentVersionsMobileAppContentItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWin32LobAppContentVersionsMobileAppContentItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation the list of content versions for this app. +func (m *MobileAppsItemGraphWin32LobAppContentVersionsMobileAppContentItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWin32LobAppContentVersionsMobileAppContentItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property contentVersions in deviceAppManagement +func (m *MobileAppsItemGraphWin32LobAppContentVersionsMobileAppContentItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, requestConfiguration *MobileAppsItemGraphWin32LobAppContentVersionsMobileAppContentItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWin32LobAppContentVersionsMobileAppContentItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWin32LobAppContentVersionsMobileAppContentItemRequestBuilder) { + return NewMobileAppsItemGraphWin32LobAppContentVersionsMobileAppContentItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_content_versions_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_content_versions_request_builder.go new file mode 100644 index 00000000000..00af5a741ae --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_content_versions_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWin32LobAppContentVersionsRequestBuilder provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. +type MobileAppsItemGraphWin32LobAppContentVersionsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWin32LobAppContentVersionsRequestBuilderGetQueryParameters the list of content versions for this app. +type MobileAppsItemGraphWin32LobAppContentVersionsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphWin32LobAppContentVersionsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWin32LobAppContentVersionsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWin32LobAppContentVersionsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphWin32LobAppContentVersionsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWin32LobAppContentVersionsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppContentId provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. +func (m *MobileAppsItemGraphWin32LobAppContentVersionsRequestBuilder) ByMobileAppContentId(mobileAppContentId string)(*MobileAppsItemGraphWin32LobAppContentVersionsMobileAppContentItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppContentId != "" { + urlTplParams["mobileAppContent%2Did"] = mobileAppContentId + } + return NewMobileAppsItemGraphWin32LobAppContentVersionsMobileAppContentItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphWin32LobAppContentVersionsRequestBuilderInternal instantiates a new ContentVersionsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWin32LobAppContentVersionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWin32LobAppContentVersionsRequestBuilder) { + m := &MobileAppsItemGraphWin32LobAppContentVersionsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/contentVersions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWin32LobAppContentVersionsRequestBuilder instantiates a new ContentVersionsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWin32LobAppContentVersionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWin32LobAppContentVersionsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWin32LobAppContentVersionsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphWin32LobAppContentVersionsRequestBuilder) Count()(*MobileAppsItemGraphWin32LobAppContentVersionsCountRequestBuilder) { + return NewMobileAppsItemGraphWin32LobAppContentVersionsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of content versions for this app. +func (m *MobileAppsItemGraphWin32LobAppContentVersionsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWin32LobAppContentVersionsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentCollectionResponseable), nil +} +// Post create new navigation property to contentVersions for deviceAppManagement +func (m *MobileAppsItemGraphWin32LobAppContentVersionsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, requestConfiguration *MobileAppsItemGraphWin32LobAppContentVersionsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable), nil +} +// ToGetRequestInformation the list of content versions for this app. +func (m *MobileAppsItemGraphWin32LobAppContentVersionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWin32LobAppContentVersionsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to contentVersions for deviceAppManagement +func (m *MobileAppsItemGraphWin32LobAppContentVersionsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, requestConfiguration *MobileAppsItemGraphWin32LobAppContentVersionsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWin32LobAppContentVersionsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWin32LobAppContentVersionsRequestBuilder) { + return NewMobileAppsItemGraphWin32LobAppContentVersionsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_relationships_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_relationships_count_request_builder.go new file mode 100644 index 00000000000..03c7e442e2d --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_relationships_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWin32LobAppRelationshipsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphWin32LobAppRelationshipsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWin32LobAppRelationshipsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphWin32LobAppRelationshipsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphWin32LobAppRelationshipsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWin32LobAppRelationshipsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWin32LobAppRelationshipsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphWin32LobAppRelationshipsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWin32LobAppRelationshipsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWin32LobAppRelationshipsCountRequestBuilder) { + m := &MobileAppsItemGraphWin32LobAppRelationshipsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/relationships/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWin32LobAppRelationshipsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWin32LobAppRelationshipsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWin32LobAppRelationshipsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWin32LobAppRelationshipsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphWin32LobAppRelationshipsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWin32LobAppRelationshipsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphWin32LobAppRelationshipsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWin32LobAppRelationshipsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWin32LobAppRelationshipsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWin32LobAppRelationshipsCountRequestBuilder) { + return NewMobileAppsItemGraphWin32LobAppRelationshipsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_relationships_mobile_app_relationship_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_relationships_mobile_app_relationship_item_request_builder.go new file mode 100644 index 00000000000..717a57f1953 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_relationships_mobile_app_relationship_item_request_builder.go @@ -0,0 +1,159 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWin32LobAppRelationshipsMobileAppRelationshipItemRequestBuilder provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphWin32LobAppRelationshipsMobileAppRelationshipItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWin32LobAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWin32LobAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphWin32LobAppRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters list of relationships for this mobile app. +type MobileAppsItemGraphWin32LobAppRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphWin32LobAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWin32LobAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWin32LobAppRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphWin32LobAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWin32LobAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphWin32LobAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal instantiates a new MobileAppRelationshipItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWin32LobAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWin32LobAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + m := &MobileAppsItemGraphWin32LobAppRelationshipsMobileAppRelationshipItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/relationships/{mobileAppRelationship%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWin32LobAppRelationshipsMobileAppRelationshipItemRequestBuilder instantiates a new MobileAppRelationshipItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWin32LobAppRelationshipsMobileAppRelationshipItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWin32LobAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWin32LobAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property relationships for deviceAppManagement +func (m *MobileAppsItemGraphWin32LobAppRelationshipsMobileAppRelationshipItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphWin32LobAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get list of relationships for this mobile app. +func (m *MobileAppsItemGraphWin32LobAppRelationshipsMobileAppRelationshipItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWin32LobAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// Patch update the navigation property relationships in deviceAppManagement +func (m *MobileAppsItemGraphWin32LobAppRelationshipsMobileAppRelationshipItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphWin32LobAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// ToDeleteRequestInformation delete navigation property relationships for deviceAppManagement +func (m *MobileAppsItemGraphWin32LobAppRelationshipsMobileAppRelationshipItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWin32LobAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation list of relationships for this mobile app. +func (m *MobileAppsItemGraphWin32LobAppRelationshipsMobileAppRelationshipItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWin32LobAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property relationships in deviceAppManagement +func (m *MobileAppsItemGraphWin32LobAppRelationshipsMobileAppRelationshipItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphWin32LobAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWin32LobAppRelationshipsMobileAppRelationshipItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWin32LobAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + return NewMobileAppsItemGraphWin32LobAppRelationshipsMobileAppRelationshipItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_relationships_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_relationships_request_builder.go new file mode 100644 index 00000000000..3be3253667d --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_relationships_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWin32LobAppRelationshipsRequestBuilder provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphWin32LobAppRelationshipsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWin32LobAppRelationshipsRequestBuilderGetQueryParameters list of relationships for this mobile app. +type MobileAppsItemGraphWin32LobAppRelationshipsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphWin32LobAppRelationshipsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWin32LobAppRelationshipsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWin32LobAppRelationshipsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphWin32LobAppRelationshipsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWin32LobAppRelationshipsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppRelationshipId provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphWin32LobAppRelationshipsRequestBuilder) ByMobileAppRelationshipId(mobileAppRelationshipId string)(*MobileAppsItemGraphWin32LobAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppRelationshipId != "" { + urlTplParams["mobileAppRelationship%2Did"] = mobileAppRelationshipId + } + return NewMobileAppsItemGraphWin32LobAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphWin32LobAppRelationshipsRequestBuilderInternal instantiates a new RelationshipsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWin32LobAppRelationshipsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWin32LobAppRelationshipsRequestBuilder) { + m := &MobileAppsItemGraphWin32LobAppRelationshipsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/relationships{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWin32LobAppRelationshipsRequestBuilder instantiates a new RelationshipsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWin32LobAppRelationshipsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWin32LobAppRelationshipsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWin32LobAppRelationshipsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphWin32LobAppRelationshipsRequestBuilder) Count()(*MobileAppsItemGraphWin32LobAppRelationshipsCountRequestBuilder) { + return NewMobileAppsItemGraphWin32LobAppRelationshipsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get list of relationships for this mobile app. +func (m *MobileAppsItemGraphWin32LobAppRelationshipsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWin32LobAppRelationshipsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipCollectionResponseable), nil +} +// Post create new navigation property to relationships for deviceAppManagement +func (m *MobileAppsItemGraphWin32LobAppRelationshipsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphWin32LobAppRelationshipsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// ToGetRequestInformation list of relationships for this mobile app. +func (m *MobileAppsItemGraphWin32LobAppRelationshipsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWin32LobAppRelationshipsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to relationships for deviceAppManagement +func (m *MobileAppsItemGraphWin32LobAppRelationshipsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphWin32LobAppRelationshipsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWin32LobAppRelationshipsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWin32LobAppRelationshipsRequestBuilder) { + return NewMobileAppsItemGraphWin32LobAppRelationshipsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_request_builder.go index ec101c3536b..d1dd49d5989 100644 --- a/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_request_builder.go +++ b/deviceappmanagement/mobile_apps_item_graph_win32_lob_app_request_builder.go @@ -27,6 +27,14 @@ type MobileAppsItemGraphWin32LobAppRequestBuilderGetRequestConfiguration struct // Request query parameters QueryParameters *MobileAppsItemGraphWin32LobAppRequestBuilderGetQueryParameters } +// Assignments provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphWin32LobAppRequestBuilder) Assignments()(*MobileAppsItemGraphWin32LobAppAssignmentsRequestBuilder) { + return NewMobileAppsItemGraphWin32LobAppAssignmentsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Categories provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphWin32LobAppRequestBuilder) Categories()(*MobileAppsItemGraphWin32LobAppCategoriesRequestBuilder) { + return NewMobileAppsItemGraphWin32LobAppCategoriesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // NewMobileAppsItemGraphWin32LobAppRequestBuilderInternal instantiates a new GraphWin32LobAppRequestBuilder and sets the default values. func NewMobileAppsItemGraphWin32LobAppRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWin32LobAppRequestBuilder) { m := &MobileAppsItemGraphWin32LobAppRequestBuilder{ @@ -40,6 +48,10 @@ func NewMobileAppsItemGraphWin32LobAppRequestBuilder(rawUrl string, requestAdapt urlParams["request-raw-url"] = rawUrl return NewMobileAppsItemGraphWin32LobAppRequestBuilderInternal(urlParams, requestAdapter) } +// ContentVersions provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. +func (m *MobileAppsItemGraphWin32LobAppRequestBuilder) ContentVersions()(*MobileAppsItemGraphWin32LobAppContentVersionsRequestBuilder) { + return NewMobileAppsItemGraphWin32LobAppContentVersionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // Get get the item of type microsoft.graph.mobileApp as microsoft.graph.win32LobApp func (m *MobileAppsItemGraphWin32LobAppRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWin32LobAppRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Win32LobAppable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); @@ -59,6 +71,10 @@ func (m *MobileAppsItemGraphWin32LobAppRequestBuilder) Get(ctx context.Context, } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Win32LobAppable), nil } +// Relationships provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphWin32LobAppRequestBuilder) Relationships()(*MobileAppsItemGraphWin32LobAppRelationshipsRequestBuilder) { + return NewMobileAppsItemGraphWin32LobAppRelationshipsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation get the item of type microsoft.graph.mobileApp as microsoft.graph.win32LobApp func (m *MobileAppsItemGraphWin32LobAppRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWin32LobAppRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/deviceappmanagement/mobile_apps_item_graph_win_get_app_assignments_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_win_get_app_assignments_count_request_builder.go new file mode 100644 index 00000000000..6b17f2a9e07 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_win_get_app_assignments_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWinGetAppAssignmentsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphWinGetAppAssignmentsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWinGetAppAssignmentsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphWinGetAppAssignmentsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphWinGetAppAssignmentsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWinGetAppAssignmentsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWinGetAppAssignmentsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphWinGetAppAssignmentsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWinGetAppAssignmentsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWinGetAppAssignmentsCountRequestBuilder) { + m := &MobileAppsItemGraphWinGetAppAssignmentsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.winGetApp/assignments/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWinGetAppAssignmentsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWinGetAppAssignmentsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWinGetAppAssignmentsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWinGetAppAssignmentsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphWinGetAppAssignmentsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWinGetAppAssignmentsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphWinGetAppAssignmentsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWinGetAppAssignmentsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWinGetAppAssignmentsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWinGetAppAssignmentsCountRequestBuilder) { + return NewMobileAppsItemGraphWinGetAppAssignmentsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_win_get_app_assignments_mobile_app_assignment_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_win_get_app_assignments_mobile_app_assignment_item_request_builder.go new file mode 100644 index 00000000000..b355ff8f045 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_win_get_app_assignments_mobile_app_assignment_item_request_builder.go @@ -0,0 +1,159 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWinGetAppAssignmentsMobileAppAssignmentItemRequestBuilder provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphWinGetAppAssignmentsMobileAppAssignmentItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWinGetAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWinGetAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphWinGetAppAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters the list of group assignments for this mobile app. +type MobileAppsItemGraphWinGetAppAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphWinGetAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWinGetAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWinGetAppAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphWinGetAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWinGetAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphWinGetAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWinGetAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWinGetAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + m := &MobileAppsItemGraphWinGetAppAssignmentsMobileAppAssignmentItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.winGetApp/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWinGetAppAssignmentsMobileAppAssignmentItemRequestBuilder instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWinGetAppAssignmentsMobileAppAssignmentItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWinGetAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWinGetAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property assignments for deviceAppManagement +func (m *MobileAppsItemGraphWinGetAppAssignmentsMobileAppAssignmentItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphWinGetAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphWinGetAppAssignmentsMobileAppAssignmentItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWinGetAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// Patch update the navigation property assignments in deviceAppManagement +func (m *MobileAppsItemGraphWinGetAppAssignmentsMobileAppAssignmentItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphWinGetAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// ToDeleteRequestInformation delete navigation property assignments for deviceAppManagement +func (m *MobileAppsItemGraphWinGetAppAssignmentsMobileAppAssignmentItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWinGetAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphWinGetAppAssignmentsMobileAppAssignmentItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWinGetAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property assignments in deviceAppManagement +func (m *MobileAppsItemGraphWinGetAppAssignmentsMobileAppAssignmentItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphWinGetAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWinGetAppAssignmentsMobileAppAssignmentItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWinGetAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + return NewMobileAppsItemGraphWinGetAppAssignmentsMobileAppAssignmentItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_win_get_app_assignments_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_win_get_app_assignments_request_builder.go new file mode 100644 index 00000000000..33175709b94 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_win_get_app_assignments_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWinGetAppAssignmentsRequestBuilder provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphWinGetAppAssignmentsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWinGetAppAssignmentsRequestBuilderGetQueryParameters the list of group assignments for this mobile app. +type MobileAppsItemGraphWinGetAppAssignmentsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphWinGetAppAssignmentsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWinGetAppAssignmentsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWinGetAppAssignmentsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphWinGetAppAssignmentsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWinGetAppAssignmentsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppAssignmentId provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphWinGetAppAssignmentsRequestBuilder) ByMobileAppAssignmentId(mobileAppAssignmentId string)(*MobileAppsItemGraphWinGetAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppAssignmentId != "" { + urlTplParams["mobileAppAssignment%2Did"] = mobileAppAssignmentId + } + return NewMobileAppsItemGraphWinGetAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphWinGetAppAssignmentsRequestBuilderInternal instantiates a new AssignmentsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWinGetAppAssignmentsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWinGetAppAssignmentsRequestBuilder) { + m := &MobileAppsItemGraphWinGetAppAssignmentsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.winGetApp/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWinGetAppAssignmentsRequestBuilder instantiates a new AssignmentsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWinGetAppAssignmentsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWinGetAppAssignmentsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWinGetAppAssignmentsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphWinGetAppAssignmentsRequestBuilder) Count()(*MobileAppsItemGraphWinGetAppAssignmentsCountRequestBuilder) { + return NewMobileAppsItemGraphWinGetAppAssignmentsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphWinGetAppAssignmentsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWinGetAppAssignmentsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentCollectionResponseable), nil +} +// Post create new navigation property to assignments for deviceAppManagement +func (m *MobileAppsItemGraphWinGetAppAssignmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphWinGetAppAssignmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// ToGetRequestInformation the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphWinGetAppAssignmentsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWinGetAppAssignmentsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to assignments for deviceAppManagement +func (m *MobileAppsItemGraphWinGetAppAssignmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphWinGetAppAssignmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWinGetAppAssignmentsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWinGetAppAssignmentsRequestBuilder) { + return NewMobileAppsItemGraphWinGetAppAssignmentsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_win_get_app_categories_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_win_get_app_categories_count_request_builder.go new file mode 100644 index 00000000000..ccf396936ee --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_win_get_app_categories_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWinGetAppCategoriesCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphWinGetAppCategoriesCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWinGetAppCategoriesCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphWinGetAppCategoriesCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphWinGetAppCategoriesCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWinGetAppCategoriesCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWinGetAppCategoriesCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphWinGetAppCategoriesCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWinGetAppCategoriesCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWinGetAppCategoriesCountRequestBuilder) { + m := &MobileAppsItemGraphWinGetAppCategoriesCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.winGetApp/categories/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWinGetAppCategoriesCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWinGetAppCategoriesCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWinGetAppCategoriesCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWinGetAppCategoriesCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphWinGetAppCategoriesCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWinGetAppCategoriesCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphWinGetAppCategoriesCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWinGetAppCategoriesCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWinGetAppCategoriesCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWinGetAppCategoriesCountRequestBuilder) { + return NewMobileAppsItemGraphWinGetAppCategoriesCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_win_get_app_categories_mobile_app_category_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_win_get_app_categories_mobile_app_category_item_request_builder.go new file mode 100644 index 00000000000..b665b531e9d --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_win_get_app_categories_mobile_app_category_item_request_builder.go @@ -0,0 +1,81 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWinGetAppCategoriesMobileAppCategoryItemRequestBuilder provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphWinGetAppCategoriesMobileAppCategoryItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWinGetAppCategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters the list of categories for this app. +type MobileAppsItemGraphWinGetAppCategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphWinGetAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWinGetAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWinGetAppCategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphWinGetAppCategoriesMobileAppCategoryItemRequestBuilderInternal instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWinGetAppCategoriesMobileAppCategoryItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWinGetAppCategoriesMobileAppCategoryItemRequestBuilder) { + m := &MobileAppsItemGraphWinGetAppCategoriesMobileAppCategoryItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.winGetApp/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWinGetAppCategoriesMobileAppCategoryItemRequestBuilder instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWinGetAppCategoriesMobileAppCategoryItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWinGetAppCategoriesMobileAppCategoryItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWinGetAppCategoriesMobileAppCategoryItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get the list of categories for this app. +func (m *MobileAppsItemGraphWinGetAppCategoriesMobileAppCategoryItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWinGetAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppCategoryFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryable), nil +} +// ToGetRequestInformation the list of categories for this app. +func (m *MobileAppsItemGraphWinGetAppCategoriesMobileAppCategoryItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWinGetAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWinGetAppCategoriesMobileAppCategoryItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWinGetAppCategoriesMobileAppCategoryItemRequestBuilder) { + return NewMobileAppsItemGraphWinGetAppCategoriesMobileAppCategoryItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_win_get_app_categories_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_win_get_app_categories_request_builder.go new file mode 100644 index 00000000000..8b4f357189e --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_win_get_app_categories_request_builder.go @@ -0,0 +1,108 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWinGetAppCategoriesRequestBuilder provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphWinGetAppCategoriesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWinGetAppCategoriesRequestBuilderGetQueryParameters the list of categories for this app. +type MobileAppsItemGraphWinGetAppCategoriesRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphWinGetAppCategoriesRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWinGetAppCategoriesRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWinGetAppCategoriesRequestBuilderGetQueryParameters +} +// ByMobileAppCategoryId provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphWinGetAppCategoriesRequestBuilder) ByMobileAppCategoryId(mobileAppCategoryId string)(*MobileAppsItemGraphWinGetAppCategoriesMobileAppCategoryItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppCategoryId != "" { + urlTplParams["mobileAppCategory%2Did"] = mobileAppCategoryId + } + return NewMobileAppsItemGraphWinGetAppCategoriesMobileAppCategoryItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphWinGetAppCategoriesRequestBuilderInternal instantiates a new CategoriesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWinGetAppCategoriesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWinGetAppCategoriesRequestBuilder) { + m := &MobileAppsItemGraphWinGetAppCategoriesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.winGetApp/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWinGetAppCategoriesRequestBuilder instantiates a new CategoriesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWinGetAppCategoriesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWinGetAppCategoriesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWinGetAppCategoriesRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphWinGetAppCategoriesRequestBuilder) Count()(*MobileAppsItemGraphWinGetAppCategoriesCountRequestBuilder) { + return NewMobileAppsItemGraphWinGetAppCategoriesCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of categories for this app. +func (m *MobileAppsItemGraphWinGetAppCategoriesRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWinGetAppCategoriesRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppCategoryCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryCollectionResponseable), nil +} +// ToGetRequestInformation the list of categories for this app. +func (m *MobileAppsItemGraphWinGetAppCategoriesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWinGetAppCategoriesRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWinGetAppCategoriesRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWinGetAppCategoriesRequestBuilder) { + return NewMobileAppsItemGraphWinGetAppCategoriesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_win_get_app_relationships_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_win_get_app_relationships_count_request_builder.go new file mode 100644 index 00000000000..f9956e21255 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_win_get_app_relationships_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWinGetAppRelationshipsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphWinGetAppRelationshipsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWinGetAppRelationshipsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphWinGetAppRelationshipsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphWinGetAppRelationshipsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWinGetAppRelationshipsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWinGetAppRelationshipsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphWinGetAppRelationshipsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWinGetAppRelationshipsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWinGetAppRelationshipsCountRequestBuilder) { + m := &MobileAppsItemGraphWinGetAppRelationshipsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.winGetApp/relationships/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWinGetAppRelationshipsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWinGetAppRelationshipsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWinGetAppRelationshipsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWinGetAppRelationshipsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphWinGetAppRelationshipsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWinGetAppRelationshipsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphWinGetAppRelationshipsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWinGetAppRelationshipsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWinGetAppRelationshipsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWinGetAppRelationshipsCountRequestBuilder) { + return NewMobileAppsItemGraphWinGetAppRelationshipsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_win_get_app_relationships_mobile_app_relationship_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_win_get_app_relationships_mobile_app_relationship_item_request_builder.go new file mode 100644 index 00000000000..07d6e0ef5ee --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_win_get_app_relationships_mobile_app_relationship_item_request_builder.go @@ -0,0 +1,159 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWinGetAppRelationshipsMobileAppRelationshipItemRequestBuilder provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphWinGetAppRelationshipsMobileAppRelationshipItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWinGetAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWinGetAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphWinGetAppRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters list of relationships for this mobile app. +type MobileAppsItemGraphWinGetAppRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphWinGetAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWinGetAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWinGetAppRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphWinGetAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWinGetAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphWinGetAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal instantiates a new MobileAppRelationshipItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWinGetAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWinGetAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + m := &MobileAppsItemGraphWinGetAppRelationshipsMobileAppRelationshipItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.winGetApp/relationships/{mobileAppRelationship%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWinGetAppRelationshipsMobileAppRelationshipItemRequestBuilder instantiates a new MobileAppRelationshipItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWinGetAppRelationshipsMobileAppRelationshipItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWinGetAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWinGetAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property relationships for deviceAppManagement +func (m *MobileAppsItemGraphWinGetAppRelationshipsMobileAppRelationshipItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphWinGetAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get list of relationships for this mobile app. +func (m *MobileAppsItemGraphWinGetAppRelationshipsMobileAppRelationshipItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWinGetAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// Patch update the navigation property relationships in deviceAppManagement +func (m *MobileAppsItemGraphWinGetAppRelationshipsMobileAppRelationshipItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphWinGetAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// ToDeleteRequestInformation delete navigation property relationships for deviceAppManagement +func (m *MobileAppsItemGraphWinGetAppRelationshipsMobileAppRelationshipItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWinGetAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation list of relationships for this mobile app. +func (m *MobileAppsItemGraphWinGetAppRelationshipsMobileAppRelationshipItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWinGetAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property relationships in deviceAppManagement +func (m *MobileAppsItemGraphWinGetAppRelationshipsMobileAppRelationshipItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphWinGetAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWinGetAppRelationshipsMobileAppRelationshipItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWinGetAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + return NewMobileAppsItemGraphWinGetAppRelationshipsMobileAppRelationshipItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_win_get_app_relationships_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_win_get_app_relationships_request_builder.go new file mode 100644 index 00000000000..511045bd2ab --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_win_get_app_relationships_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWinGetAppRelationshipsRequestBuilder provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphWinGetAppRelationshipsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWinGetAppRelationshipsRequestBuilderGetQueryParameters list of relationships for this mobile app. +type MobileAppsItemGraphWinGetAppRelationshipsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphWinGetAppRelationshipsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWinGetAppRelationshipsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWinGetAppRelationshipsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphWinGetAppRelationshipsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWinGetAppRelationshipsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppRelationshipId provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphWinGetAppRelationshipsRequestBuilder) ByMobileAppRelationshipId(mobileAppRelationshipId string)(*MobileAppsItemGraphWinGetAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppRelationshipId != "" { + urlTplParams["mobileAppRelationship%2Did"] = mobileAppRelationshipId + } + return NewMobileAppsItemGraphWinGetAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphWinGetAppRelationshipsRequestBuilderInternal instantiates a new RelationshipsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWinGetAppRelationshipsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWinGetAppRelationshipsRequestBuilder) { + m := &MobileAppsItemGraphWinGetAppRelationshipsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.winGetApp/relationships{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWinGetAppRelationshipsRequestBuilder instantiates a new RelationshipsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWinGetAppRelationshipsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWinGetAppRelationshipsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWinGetAppRelationshipsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphWinGetAppRelationshipsRequestBuilder) Count()(*MobileAppsItemGraphWinGetAppRelationshipsCountRequestBuilder) { + return NewMobileAppsItemGraphWinGetAppRelationshipsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get list of relationships for this mobile app. +func (m *MobileAppsItemGraphWinGetAppRelationshipsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWinGetAppRelationshipsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipCollectionResponseable), nil +} +// Post create new navigation property to relationships for deviceAppManagement +func (m *MobileAppsItemGraphWinGetAppRelationshipsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphWinGetAppRelationshipsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// ToGetRequestInformation list of relationships for this mobile app. +func (m *MobileAppsItemGraphWinGetAppRelationshipsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWinGetAppRelationshipsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to relationships for deviceAppManagement +func (m *MobileAppsItemGraphWinGetAppRelationshipsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphWinGetAppRelationshipsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWinGetAppRelationshipsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWinGetAppRelationshipsRequestBuilder) { + return NewMobileAppsItemGraphWinGetAppRelationshipsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_win_get_app_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_win_get_app_request_builder.go index a9673913a2c..a8b2f5bd229 100644 --- a/deviceappmanagement/mobile_apps_item_graph_win_get_app_request_builder.go +++ b/deviceappmanagement/mobile_apps_item_graph_win_get_app_request_builder.go @@ -27,6 +27,14 @@ type MobileAppsItemGraphWinGetAppRequestBuilderGetRequestConfiguration struct { // Request query parameters QueryParameters *MobileAppsItemGraphWinGetAppRequestBuilderGetQueryParameters } +// Assignments provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphWinGetAppRequestBuilder) Assignments()(*MobileAppsItemGraphWinGetAppAssignmentsRequestBuilder) { + return NewMobileAppsItemGraphWinGetAppAssignmentsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Categories provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphWinGetAppRequestBuilder) Categories()(*MobileAppsItemGraphWinGetAppCategoriesRequestBuilder) { + return NewMobileAppsItemGraphWinGetAppCategoriesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // NewMobileAppsItemGraphWinGetAppRequestBuilderInternal instantiates a new GraphWinGetAppRequestBuilder and sets the default values. func NewMobileAppsItemGraphWinGetAppRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWinGetAppRequestBuilder) { m := &MobileAppsItemGraphWinGetAppRequestBuilder{ @@ -59,6 +67,10 @@ func (m *MobileAppsItemGraphWinGetAppRequestBuilder) Get(ctx context.Context, re } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.WinGetAppable), nil } +// Relationships provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphWinGetAppRequestBuilder) Relationships()(*MobileAppsItemGraphWinGetAppRelationshipsRequestBuilder) { + return NewMobileAppsItemGraphWinGetAppRelationshipsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation get the item of type microsoft.graph.mobileApp as microsoft.graph.winGetApp func (m *MobileAppsItemGraphWinGetAppRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWinGetAppRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_app_x_assignments_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_app_x_assignments_count_request_builder.go new file mode 100644 index 00000000000..980da7dd3cf --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_app_x_assignments_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsAppXAssignmentsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphWindowsAppXAssignmentsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsAppXAssignmentsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphWindowsAppXAssignmentsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphWindowsAppXAssignmentsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsAppXAssignmentsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsAppXAssignmentsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphWindowsAppXAssignmentsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsAppXAssignmentsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsAppXAssignmentsCountRequestBuilder) { + m := &MobileAppsItemGraphWindowsAppXAssignmentsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/assignments/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsAppXAssignmentsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsAppXAssignmentsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsAppXAssignmentsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsAppXAssignmentsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphWindowsAppXAssignmentsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsAppXAssignmentsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphWindowsAppXAssignmentsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsAppXAssignmentsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsAppXAssignmentsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsAppXAssignmentsCountRequestBuilder) { + return NewMobileAppsItemGraphWindowsAppXAssignmentsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_app_x_assignments_mobile_app_assignment_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_app_x_assignments_mobile_app_assignment_item_request_builder.go new file mode 100644 index 00000000000..fd30d6ea80d --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_app_x_assignments_mobile_app_assignment_item_request_builder.go @@ -0,0 +1,159 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsAppXAssignmentsMobileAppAssignmentItemRequestBuilder provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphWindowsAppXAssignmentsMobileAppAssignmentItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsAppXAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsAppXAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphWindowsAppXAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters the list of group assignments for this mobile app. +type MobileAppsItemGraphWindowsAppXAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphWindowsAppXAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsAppXAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsAppXAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphWindowsAppXAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsAppXAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphWindowsAppXAssignmentsMobileAppAssignmentItemRequestBuilderInternal instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsAppXAssignmentsMobileAppAssignmentItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsAppXAssignmentsMobileAppAssignmentItemRequestBuilder) { + m := &MobileAppsItemGraphWindowsAppXAssignmentsMobileAppAssignmentItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsAppXAssignmentsMobileAppAssignmentItemRequestBuilder instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsAppXAssignmentsMobileAppAssignmentItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsAppXAssignmentsMobileAppAssignmentItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsAppXAssignmentsMobileAppAssignmentItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property assignments for deviceAppManagement +func (m *MobileAppsItemGraphWindowsAppXAssignmentsMobileAppAssignmentItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsAppXAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphWindowsAppXAssignmentsMobileAppAssignmentItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsAppXAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// Patch update the navigation property assignments in deviceAppManagement +func (m *MobileAppsItemGraphWindowsAppXAssignmentsMobileAppAssignmentItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphWindowsAppXAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// ToDeleteRequestInformation delete navigation property assignments for deviceAppManagement +func (m *MobileAppsItemGraphWindowsAppXAssignmentsMobileAppAssignmentItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsAppXAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphWindowsAppXAssignmentsMobileAppAssignmentItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsAppXAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property assignments in deviceAppManagement +func (m *MobileAppsItemGraphWindowsAppXAssignmentsMobileAppAssignmentItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphWindowsAppXAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsAppXAssignmentsMobileAppAssignmentItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsAppXAssignmentsMobileAppAssignmentItemRequestBuilder) { + return NewMobileAppsItemGraphWindowsAppXAssignmentsMobileAppAssignmentItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_app_x_assignments_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_app_x_assignments_request_builder.go new file mode 100644 index 00000000000..f762242b17d --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_app_x_assignments_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsAppXAssignmentsRequestBuilder provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphWindowsAppXAssignmentsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsAppXAssignmentsRequestBuilderGetQueryParameters the list of group assignments for this mobile app. +type MobileAppsItemGraphWindowsAppXAssignmentsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphWindowsAppXAssignmentsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsAppXAssignmentsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsAppXAssignmentsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphWindowsAppXAssignmentsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsAppXAssignmentsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppAssignmentId provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphWindowsAppXAssignmentsRequestBuilder) ByMobileAppAssignmentId(mobileAppAssignmentId string)(*MobileAppsItemGraphWindowsAppXAssignmentsMobileAppAssignmentItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppAssignmentId != "" { + urlTplParams["mobileAppAssignment%2Did"] = mobileAppAssignmentId + } + return NewMobileAppsItemGraphWindowsAppXAssignmentsMobileAppAssignmentItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphWindowsAppXAssignmentsRequestBuilderInternal instantiates a new AssignmentsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsAppXAssignmentsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsAppXAssignmentsRequestBuilder) { + m := &MobileAppsItemGraphWindowsAppXAssignmentsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsAppXAssignmentsRequestBuilder instantiates a new AssignmentsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsAppXAssignmentsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsAppXAssignmentsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsAppXAssignmentsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphWindowsAppXAssignmentsRequestBuilder) Count()(*MobileAppsItemGraphWindowsAppXAssignmentsCountRequestBuilder) { + return NewMobileAppsItemGraphWindowsAppXAssignmentsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphWindowsAppXAssignmentsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsAppXAssignmentsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentCollectionResponseable), nil +} +// Post create new navigation property to assignments for deviceAppManagement +func (m *MobileAppsItemGraphWindowsAppXAssignmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphWindowsAppXAssignmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// ToGetRequestInformation the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphWindowsAppXAssignmentsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsAppXAssignmentsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to assignments for deviceAppManagement +func (m *MobileAppsItemGraphWindowsAppXAssignmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphWindowsAppXAssignmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsAppXAssignmentsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsAppXAssignmentsRequestBuilder) { + return NewMobileAppsItemGraphWindowsAppXAssignmentsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_app_x_categories_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_app_x_categories_count_request_builder.go new file mode 100644 index 00000000000..b1a0d079e11 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_app_x_categories_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsAppXCategoriesCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphWindowsAppXCategoriesCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsAppXCategoriesCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphWindowsAppXCategoriesCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphWindowsAppXCategoriesCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsAppXCategoriesCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsAppXCategoriesCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphWindowsAppXCategoriesCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsAppXCategoriesCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsAppXCategoriesCountRequestBuilder) { + m := &MobileAppsItemGraphWindowsAppXCategoriesCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/categories/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsAppXCategoriesCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsAppXCategoriesCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsAppXCategoriesCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsAppXCategoriesCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphWindowsAppXCategoriesCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsAppXCategoriesCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphWindowsAppXCategoriesCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsAppXCategoriesCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsAppXCategoriesCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsAppXCategoriesCountRequestBuilder) { + return NewMobileAppsItemGraphWindowsAppXCategoriesCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_app_x_categories_mobile_app_category_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_app_x_categories_mobile_app_category_item_request_builder.go new file mode 100644 index 00000000000..00b8544845a --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_app_x_categories_mobile_app_category_item_request_builder.go @@ -0,0 +1,81 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsAppXCategoriesMobileAppCategoryItemRequestBuilder provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphWindowsAppXCategoriesMobileAppCategoryItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsAppXCategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters the list of categories for this app. +type MobileAppsItemGraphWindowsAppXCategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphWindowsAppXCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsAppXCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsAppXCategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphWindowsAppXCategoriesMobileAppCategoryItemRequestBuilderInternal instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsAppXCategoriesMobileAppCategoryItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsAppXCategoriesMobileAppCategoryItemRequestBuilder) { + m := &MobileAppsItemGraphWindowsAppXCategoriesMobileAppCategoryItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsAppXCategoriesMobileAppCategoryItemRequestBuilder instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsAppXCategoriesMobileAppCategoryItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsAppXCategoriesMobileAppCategoryItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsAppXCategoriesMobileAppCategoryItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get the list of categories for this app. +func (m *MobileAppsItemGraphWindowsAppXCategoriesMobileAppCategoryItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsAppXCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppCategoryFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryable), nil +} +// ToGetRequestInformation the list of categories for this app. +func (m *MobileAppsItemGraphWindowsAppXCategoriesMobileAppCategoryItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsAppXCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsAppXCategoriesMobileAppCategoryItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsAppXCategoriesMobileAppCategoryItemRequestBuilder) { + return NewMobileAppsItemGraphWindowsAppXCategoriesMobileAppCategoryItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_app_x_categories_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_app_x_categories_request_builder.go new file mode 100644 index 00000000000..e0f7c36d947 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_app_x_categories_request_builder.go @@ -0,0 +1,108 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsAppXCategoriesRequestBuilder provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphWindowsAppXCategoriesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsAppXCategoriesRequestBuilderGetQueryParameters the list of categories for this app. +type MobileAppsItemGraphWindowsAppXCategoriesRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphWindowsAppXCategoriesRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsAppXCategoriesRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsAppXCategoriesRequestBuilderGetQueryParameters +} +// ByMobileAppCategoryId provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphWindowsAppXCategoriesRequestBuilder) ByMobileAppCategoryId(mobileAppCategoryId string)(*MobileAppsItemGraphWindowsAppXCategoriesMobileAppCategoryItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppCategoryId != "" { + urlTplParams["mobileAppCategory%2Did"] = mobileAppCategoryId + } + return NewMobileAppsItemGraphWindowsAppXCategoriesMobileAppCategoryItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphWindowsAppXCategoriesRequestBuilderInternal instantiates a new CategoriesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsAppXCategoriesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsAppXCategoriesRequestBuilder) { + m := &MobileAppsItemGraphWindowsAppXCategoriesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsAppXCategoriesRequestBuilder instantiates a new CategoriesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsAppXCategoriesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsAppXCategoriesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsAppXCategoriesRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphWindowsAppXCategoriesRequestBuilder) Count()(*MobileAppsItemGraphWindowsAppXCategoriesCountRequestBuilder) { + return NewMobileAppsItemGraphWindowsAppXCategoriesCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of categories for this app. +func (m *MobileAppsItemGraphWindowsAppXCategoriesRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsAppXCategoriesRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppCategoryCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryCollectionResponseable), nil +} +// ToGetRequestInformation the list of categories for this app. +func (m *MobileAppsItemGraphWindowsAppXCategoriesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsAppXCategoriesRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsAppXCategoriesRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsAppXCategoriesRequestBuilder) { + return NewMobileAppsItemGraphWindowsAppXCategoriesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_app_x_content_versions_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_app_x_content_versions_count_request_builder.go new file mode 100644 index 00000000000..0dab9c1ad4e --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_app_x_content_versions_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsAppXContentVersionsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphWindowsAppXContentVersionsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsAppXContentVersionsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphWindowsAppXContentVersionsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphWindowsAppXContentVersionsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsAppXContentVersionsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsAppXContentVersionsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphWindowsAppXContentVersionsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsAppXContentVersionsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsAppXContentVersionsCountRequestBuilder) { + m := &MobileAppsItemGraphWindowsAppXContentVersionsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/contentVersions/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsAppXContentVersionsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsAppXContentVersionsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsAppXContentVersionsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsAppXContentVersionsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphWindowsAppXContentVersionsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsAppXContentVersionsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphWindowsAppXContentVersionsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsAppXContentVersionsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsAppXContentVersionsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsAppXContentVersionsCountRequestBuilder) { + return NewMobileAppsItemGraphWindowsAppXContentVersionsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_app_x_content_versions_item_contained_apps_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_app_x_content_versions_item_contained_apps_count_request_builder.go new file mode 100644 index 00000000000..0123b0f9194 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_app_x_content_versions_item_contained_apps_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsCountRequestBuilder) { + m := &MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/contentVersions/{mobileAppContent%2Did}/containedApps/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsCountRequestBuilder) { + return NewMobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_app_x_content_versions_item_contained_apps_mobile_contained_app_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_app_x_content_versions_item_contained_apps_mobile_contained_app_item_request_builder.go new file mode 100644 index 00000000000..17639519032 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_app_x_content_versions_item_contained_apps_mobile_contained_app_item_request_builder.go @@ -0,0 +1,159 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. +type MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetQueryParameters the collection of contained apps in a MobileLobApp acting as a package. +type MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderInternal instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) { + m := &MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/contentVersions/{mobileAppContent%2Did}/containedApps/{mobileContainedApp%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property containedApps for deviceAppManagement +func (m *MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get the collection of contained apps in a MobileLobApp acting as a package. +func (m *MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileContainedAppFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable), nil +} +// Patch update the navigation property containedApps in deviceAppManagement +func (m *MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, requestConfiguration *MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileContainedAppFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable), nil +} +// ToDeleteRequestInformation delete navigation property containedApps for deviceAppManagement +func (m *MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation the collection of contained apps in a MobileLobApp acting as a package. +func (m *MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property containedApps in deviceAppManagement +func (m *MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, requestConfiguration *MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) { + return NewMobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_app_x_content_versions_item_contained_apps_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_app_x_content_versions_item_contained_apps_request_builder.go new file mode 100644 index 00000000000..7708cc8f3b2 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_app_x_content_versions_item_contained_apps_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsRequestBuilder provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. +type MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsRequestBuilderGetQueryParameters the collection of contained apps in a MobileLobApp acting as a package. +type MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileContainedAppId provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. +func (m *MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsRequestBuilder) ByMobileContainedAppId(mobileContainedAppId string)(*MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileContainedAppId != "" { + urlTplParams["mobileContainedApp%2Did"] = mobileContainedAppId + } + return NewMobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsRequestBuilderInternal instantiates a new ContainedAppsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsRequestBuilder) { + m := &MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/contentVersions/{mobileAppContent%2Did}/containedApps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsRequestBuilder instantiates a new ContainedAppsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsRequestBuilder) Count()(*MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsCountRequestBuilder) { + return NewMobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the collection of contained apps in a MobileLobApp acting as a package. +func (m *MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileContainedAppCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppCollectionResponseable), nil +} +// Post create new navigation property to containedApps for deviceAppManagement +func (m *MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, requestConfiguration *MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileContainedAppFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable), nil +} +// ToGetRequestInformation the collection of contained apps in a MobileLobApp acting as a package. +func (m *MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to containedApps for deviceAppManagement +func (m *MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, requestConfiguration *MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsRequestBuilder) { + return NewMobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_app_x_content_versions_item_files_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_app_x_content_versions_item_files_count_request_builder.go new file mode 100644 index 00000000000..22e36296992 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_app_x_content_versions_item_files_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsAppXContentVersionsItemFilesCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphWindowsAppXContentVersionsItemFilesCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsAppXContentVersionsItemFilesCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphWindowsAppXContentVersionsItemFilesCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphWindowsAppXContentVersionsItemFilesCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsAppXContentVersionsItemFilesCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsAppXContentVersionsItemFilesCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphWindowsAppXContentVersionsItemFilesCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsAppXContentVersionsItemFilesCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsAppXContentVersionsItemFilesCountRequestBuilder) { + m := &MobileAppsItemGraphWindowsAppXContentVersionsItemFilesCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/contentVersions/{mobileAppContent%2Did}/files/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsAppXContentVersionsItemFilesCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsAppXContentVersionsItemFilesCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsAppXContentVersionsItemFilesCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsAppXContentVersionsItemFilesCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphWindowsAppXContentVersionsItemFilesCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsAppXContentVersionsItemFilesCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphWindowsAppXContentVersionsItemFilesCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsAppXContentVersionsItemFilesCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsAppXContentVersionsItemFilesCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsAppXContentVersionsItemFilesCountRequestBuilder) { + return NewMobileAppsItemGraphWindowsAppXContentVersionsItemFilesCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_app_x_content_versions_item_files_item_commit_post_request_body.go b/deviceappmanagement/mobile_apps_item_graph_windows_app_x_content_versions_item_files_item_commit_post_request_body.go new file mode 100644 index 00000000000..4bcd0eca989 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_app_x_content_versions_item_files_item_commit_post_request_body.go @@ -0,0 +1,111 @@ +package deviceappmanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +// MobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemCommitPostRequestBody +type MobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemCommitPostRequestBody struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewMobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemCommitPostRequestBody instantiates a new MobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemCommitPostRequestBody and sets the default values. +func NewMobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemCommitPostRequestBody()(*MobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemCommitPostRequestBody) { + m := &MobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemCommitPostRequestBody{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateMobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemCommitPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemCommitPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemCommitPostRequestBody(), nil +} +// GetAdditionalData gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *MobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemCommitPostRequestBody) GetAdditionalData()(map[string]any) { + val , err := m.backingStore.Get("additionalData") + if err != nil { + panic(err) + } + if val == nil { + var value = make(map[string]any); + m.SetAdditionalData(value); + } + return val.(map[string]any) +} +// GetBackingStore gets the backingStore property value. Stores model information. +func (m *MobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemCommitPostRequestBody) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemCommitPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["fileEncryptionInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateFileEncryptionInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetFileEncryptionInfo(val.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable)) + } + return nil + } + return res +} +// GetFileEncryptionInfo gets the fileEncryptionInfo property value. The fileEncryptionInfo property +func (m *MobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemCommitPostRequestBody) GetFileEncryptionInfo()(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable) { + val, err := m.GetBackingStore().Get("fileEncryptionInfo") + if err != nil { + panic(err) + } + if val != nil { + return val.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable) + } + return nil +} +// Serialize serializes information the current object +func (m *MobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemCommitPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("fileEncryptionInfo", m.GetFileEncryptionInfo()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *MobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemCommitPostRequestBody) SetAdditionalData(value map[string]any)() { + err := m.GetBackingStore().Set("additionalData", value) + if err != nil { + panic(err) + } +} +// SetBackingStore sets the backingStore property value. Stores model information. +func (m *MobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemCommitPostRequestBody) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetFileEncryptionInfo sets the fileEncryptionInfo property value. The fileEncryptionInfo property +func (m *MobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemCommitPostRequestBody) SetFileEncryptionInfo(value ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable)() { + err := m.GetBackingStore().Set("fileEncryptionInfo", value) + if err != nil { + panic(err) + } +} +// MobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemCommitPostRequestBodyable +type MobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemCommitPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetFileEncryptionInfo()(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetFileEncryptionInfo(value ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable)() +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_app_x_content_versions_item_files_item_commit_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_app_x_content_versions_item_files_item_commit_request_builder.go new file mode 100644 index 00000000000..cc6dd95fcf2 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_app_x_content_versions_item_files_item_commit_request_builder.go @@ -0,0 +1,68 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemCommitRequestBuilder provides operations to call the commit method. +type MobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemCommitRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemCommitRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemCommitRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemCommitRequestBuilderInternal instantiates a new CommitRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemCommitRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemCommitRequestBuilder) { + m := &MobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemCommitRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/commit", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemCommitRequestBuilder instantiates a new CommitRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemCommitRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemCommitRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemCommitRequestBuilderInternal(urlParams, requestAdapter) +} +// Post commits a file of a given app. +func (m *MobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemCommitRequestBuilder) Post(ctx context.Context, body MobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemCommitPostRequestBodyable, requestConfiguration *MobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemCommitRequestBuilderPostRequestConfiguration)(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation commits a file of a given app. +func (m *MobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemCommitRequestBuilder) ToPostRequestInformation(ctx context.Context, body MobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemCommitPostRequestBodyable, requestConfiguration *MobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemCommitRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemCommitRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemCommitRequestBuilder) { + return NewMobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemCommitRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_app_x_content_versions_item_files_item_renew_upload_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_app_x_content_versions_item_files_item_renew_upload_request_builder.go new file mode 100644 index 00000000000..009ae34fe7a --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_app_x_content_versions_item_files_item_renew_upload_request_builder.go @@ -0,0 +1,64 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemRenewUploadRequestBuilder provides operations to call the renewUpload method. +type MobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemRenewUploadRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemRenewUploadRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemRenewUploadRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemRenewUploadRequestBuilderInternal instantiates a new RenewUploadRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemRenewUploadRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemRenewUploadRequestBuilder) { + m := &MobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemRenewUploadRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/renewUpload", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemRenewUploadRequestBuilder instantiates a new RenewUploadRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemRenewUploadRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemRenewUploadRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemRenewUploadRequestBuilderInternal(urlParams, requestAdapter) +} +// Post renews the SAS URI for an application file upload. +func (m *MobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemRenewUploadRequestBuilder) Post(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemRenewUploadRequestBuilderPostRequestConfiguration)(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation renews the SAS URI for an application file upload. +func (m *MobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemRenewUploadRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemRenewUploadRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemRenewUploadRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemRenewUploadRequestBuilder) { + return NewMobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemRenewUploadRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_app_x_content_versions_item_files_mobile_app_content_file_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_app_x_content_versions_item_files_mobile_app_content_file_item_request_builder.go new file mode 100644 index 00000000000..8cd33534b37 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_app_x_content_versions_item_files_mobile_app_content_file_item_request_builder.go @@ -0,0 +1,167 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilder provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. +type MobileAppsItemGraphWindowsAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphWindowsAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetQueryParameters the list of files for this app content version. +type MobileAppsItemGraphWindowsAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphWindowsAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphWindowsAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// Commit provides operations to call the commit method. +func (m *MobileAppsItemGraphWindowsAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) Commit()(*MobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemCommitRequestBuilder) { + return NewMobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemCommitRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphWindowsAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilderInternal instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) { + m := &MobileAppsItemGraphWindowsAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilder instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property files for deviceAppManagement +func (m *MobileAppsItemGraphWindowsAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get the list of files for this app content version. +func (m *MobileAppsItemGraphWindowsAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFileFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable), nil +} +// Patch update the navigation property files in deviceAppManagement +func (m *MobileAppsItemGraphWindowsAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, requestConfiguration *MobileAppsItemGraphWindowsAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFileFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable), nil +} +// RenewUpload provides operations to call the renewUpload method. +func (m *MobileAppsItemGraphWindowsAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) RenewUpload()(*MobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemRenewUploadRequestBuilder) { + return NewMobileAppsItemGraphWindowsAppXContentVersionsItemFilesItemRenewUploadRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToDeleteRequestInformation delete navigation property files for deviceAppManagement +func (m *MobileAppsItemGraphWindowsAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation the list of files for this app content version. +func (m *MobileAppsItemGraphWindowsAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property files in deviceAppManagement +func (m *MobileAppsItemGraphWindowsAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, requestConfiguration *MobileAppsItemGraphWindowsAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) { + return NewMobileAppsItemGraphWindowsAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_app_x_content_versions_item_files_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_app_x_content_versions_item_files_request_builder.go new file mode 100644 index 00000000000..30ea9821091 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_app_x_content_versions_item_files_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsAppXContentVersionsItemFilesRequestBuilder provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. +type MobileAppsItemGraphWindowsAppXContentVersionsItemFilesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsAppXContentVersionsItemFilesRequestBuilderGetQueryParameters the list of files for this app content version. +type MobileAppsItemGraphWindowsAppXContentVersionsItemFilesRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphWindowsAppXContentVersionsItemFilesRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsAppXContentVersionsItemFilesRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsAppXContentVersionsItemFilesRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphWindowsAppXContentVersionsItemFilesRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsAppXContentVersionsItemFilesRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppContentFileId provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. +func (m *MobileAppsItemGraphWindowsAppXContentVersionsItemFilesRequestBuilder) ByMobileAppContentFileId(mobileAppContentFileId string)(*MobileAppsItemGraphWindowsAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppContentFileId != "" { + urlTplParams["mobileAppContentFile%2Did"] = mobileAppContentFileId + } + return NewMobileAppsItemGraphWindowsAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphWindowsAppXContentVersionsItemFilesRequestBuilderInternal instantiates a new FilesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsAppXContentVersionsItemFilesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsAppXContentVersionsItemFilesRequestBuilder) { + m := &MobileAppsItemGraphWindowsAppXContentVersionsItemFilesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/contentVersions/{mobileAppContent%2Did}/files{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsAppXContentVersionsItemFilesRequestBuilder instantiates a new FilesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsAppXContentVersionsItemFilesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsAppXContentVersionsItemFilesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsAppXContentVersionsItemFilesRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphWindowsAppXContentVersionsItemFilesRequestBuilder) Count()(*MobileAppsItemGraphWindowsAppXContentVersionsItemFilesCountRequestBuilder) { + return NewMobileAppsItemGraphWindowsAppXContentVersionsItemFilesCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of files for this app content version. +func (m *MobileAppsItemGraphWindowsAppXContentVersionsItemFilesRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsAppXContentVersionsItemFilesRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFileCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileCollectionResponseable), nil +} +// Post create new navigation property to files for deviceAppManagement +func (m *MobileAppsItemGraphWindowsAppXContentVersionsItemFilesRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, requestConfiguration *MobileAppsItemGraphWindowsAppXContentVersionsItemFilesRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFileFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable), nil +} +// ToGetRequestInformation the list of files for this app content version. +func (m *MobileAppsItemGraphWindowsAppXContentVersionsItemFilesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsAppXContentVersionsItemFilesRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to files for deviceAppManagement +func (m *MobileAppsItemGraphWindowsAppXContentVersionsItemFilesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, requestConfiguration *MobileAppsItemGraphWindowsAppXContentVersionsItemFilesRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsAppXContentVersionsItemFilesRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsAppXContentVersionsItemFilesRequestBuilder) { + return NewMobileAppsItemGraphWindowsAppXContentVersionsItemFilesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_app_x_content_versions_mobile_app_content_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_app_x_content_versions_mobile_app_content_item_request_builder.go new file mode 100644 index 00000000000..5b3b139d2ce --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_app_x_content_versions_mobile_app_content_item_request_builder.go @@ -0,0 +1,167 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsAppXContentVersionsMobileAppContentItemRequestBuilder provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. +type MobileAppsItemGraphWindowsAppXContentVersionsMobileAppContentItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsAppXContentVersionsMobileAppContentItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsAppXContentVersionsMobileAppContentItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphWindowsAppXContentVersionsMobileAppContentItemRequestBuilderGetQueryParameters the list of content versions for this app. +type MobileAppsItemGraphWindowsAppXContentVersionsMobileAppContentItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphWindowsAppXContentVersionsMobileAppContentItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsAppXContentVersionsMobileAppContentItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsAppXContentVersionsMobileAppContentItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphWindowsAppXContentVersionsMobileAppContentItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsAppXContentVersionsMobileAppContentItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphWindowsAppXContentVersionsMobileAppContentItemRequestBuilderInternal instantiates a new MobileAppContentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsAppXContentVersionsMobileAppContentItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsAppXContentVersionsMobileAppContentItemRequestBuilder) { + m := &MobileAppsItemGraphWindowsAppXContentVersionsMobileAppContentItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/contentVersions/{mobileAppContent%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsAppXContentVersionsMobileAppContentItemRequestBuilder instantiates a new MobileAppContentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsAppXContentVersionsMobileAppContentItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsAppXContentVersionsMobileAppContentItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsAppXContentVersionsMobileAppContentItemRequestBuilderInternal(urlParams, requestAdapter) +} +// ContainedApps provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. +func (m *MobileAppsItemGraphWindowsAppXContentVersionsMobileAppContentItemRequestBuilder) ContainedApps()(*MobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsRequestBuilder) { + return NewMobileAppsItemGraphWindowsAppXContentVersionsItemContainedAppsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Delete delete navigation property contentVersions for deviceAppManagement +func (m *MobileAppsItemGraphWindowsAppXContentVersionsMobileAppContentItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsAppXContentVersionsMobileAppContentItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Files provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. +func (m *MobileAppsItemGraphWindowsAppXContentVersionsMobileAppContentItemRequestBuilder) Files()(*MobileAppsItemGraphWindowsAppXContentVersionsItemFilesRequestBuilder) { + return NewMobileAppsItemGraphWindowsAppXContentVersionsItemFilesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of content versions for this app. +func (m *MobileAppsItemGraphWindowsAppXContentVersionsMobileAppContentItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsAppXContentVersionsMobileAppContentItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable), nil +} +// Patch update the navigation property contentVersions in deviceAppManagement +func (m *MobileAppsItemGraphWindowsAppXContentVersionsMobileAppContentItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, requestConfiguration *MobileAppsItemGraphWindowsAppXContentVersionsMobileAppContentItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable), nil +} +// ToDeleteRequestInformation delete navigation property contentVersions for deviceAppManagement +func (m *MobileAppsItemGraphWindowsAppXContentVersionsMobileAppContentItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsAppXContentVersionsMobileAppContentItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation the list of content versions for this app. +func (m *MobileAppsItemGraphWindowsAppXContentVersionsMobileAppContentItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsAppXContentVersionsMobileAppContentItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property contentVersions in deviceAppManagement +func (m *MobileAppsItemGraphWindowsAppXContentVersionsMobileAppContentItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, requestConfiguration *MobileAppsItemGraphWindowsAppXContentVersionsMobileAppContentItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsAppXContentVersionsMobileAppContentItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsAppXContentVersionsMobileAppContentItemRequestBuilder) { + return NewMobileAppsItemGraphWindowsAppXContentVersionsMobileAppContentItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_app_x_content_versions_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_app_x_content_versions_request_builder.go new file mode 100644 index 00000000000..94fa1da88a9 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_app_x_content_versions_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsAppXContentVersionsRequestBuilder provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. +type MobileAppsItemGraphWindowsAppXContentVersionsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsAppXContentVersionsRequestBuilderGetQueryParameters the list of content versions for this app. +type MobileAppsItemGraphWindowsAppXContentVersionsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphWindowsAppXContentVersionsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsAppXContentVersionsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsAppXContentVersionsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphWindowsAppXContentVersionsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsAppXContentVersionsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppContentId provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. +func (m *MobileAppsItemGraphWindowsAppXContentVersionsRequestBuilder) ByMobileAppContentId(mobileAppContentId string)(*MobileAppsItemGraphWindowsAppXContentVersionsMobileAppContentItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppContentId != "" { + urlTplParams["mobileAppContent%2Did"] = mobileAppContentId + } + return NewMobileAppsItemGraphWindowsAppXContentVersionsMobileAppContentItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphWindowsAppXContentVersionsRequestBuilderInternal instantiates a new ContentVersionsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsAppXContentVersionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsAppXContentVersionsRequestBuilder) { + m := &MobileAppsItemGraphWindowsAppXContentVersionsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/contentVersions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsAppXContentVersionsRequestBuilder instantiates a new ContentVersionsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsAppXContentVersionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsAppXContentVersionsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsAppXContentVersionsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphWindowsAppXContentVersionsRequestBuilder) Count()(*MobileAppsItemGraphWindowsAppXContentVersionsCountRequestBuilder) { + return NewMobileAppsItemGraphWindowsAppXContentVersionsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of content versions for this app. +func (m *MobileAppsItemGraphWindowsAppXContentVersionsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsAppXContentVersionsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentCollectionResponseable), nil +} +// Post create new navigation property to contentVersions for deviceAppManagement +func (m *MobileAppsItemGraphWindowsAppXContentVersionsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, requestConfiguration *MobileAppsItemGraphWindowsAppXContentVersionsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable), nil +} +// ToGetRequestInformation the list of content versions for this app. +func (m *MobileAppsItemGraphWindowsAppXContentVersionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsAppXContentVersionsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to contentVersions for deviceAppManagement +func (m *MobileAppsItemGraphWindowsAppXContentVersionsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, requestConfiguration *MobileAppsItemGraphWindowsAppXContentVersionsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsAppXContentVersionsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsAppXContentVersionsRequestBuilder) { + return NewMobileAppsItemGraphWindowsAppXContentVersionsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_app_x_relationships_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_app_x_relationships_count_request_builder.go new file mode 100644 index 00000000000..06a51ab2506 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_app_x_relationships_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsAppXRelationshipsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphWindowsAppXRelationshipsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsAppXRelationshipsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphWindowsAppXRelationshipsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphWindowsAppXRelationshipsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsAppXRelationshipsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsAppXRelationshipsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphWindowsAppXRelationshipsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsAppXRelationshipsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsAppXRelationshipsCountRequestBuilder) { + m := &MobileAppsItemGraphWindowsAppXRelationshipsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/relationships/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsAppXRelationshipsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsAppXRelationshipsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsAppXRelationshipsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsAppXRelationshipsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphWindowsAppXRelationshipsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsAppXRelationshipsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphWindowsAppXRelationshipsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsAppXRelationshipsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsAppXRelationshipsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsAppXRelationshipsCountRequestBuilder) { + return NewMobileAppsItemGraphWindowsAppXRelationshipsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_app_x_relationships_mobile_app_relationship_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_app_x_relationships_mobile_app_relationship_item_request_builder.go new file mode 100644 index 00000000000..38d52fb8cbd --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_app_x_relationships_mobile_app_relationship_item_request_builder.go @@ -0,0 +1,159 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsAppXRelationshipsMobileAppRelationshipItemRequestBuilder provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphWindowsAppXRelationshipsMobileAppRelationshipItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsAppXRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsAppXRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphWindowsAppXRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters list of relationships for this mobile app. +type MobileAppsItemGraphWindowsAppXRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphWindowsAppXRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsAppXRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsAppXRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphWindowsAppXRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsAppXRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphWindowsAppXRelationshipsMobileAppRelationshipItemRequestBuilderInternal instantiates a new MobileAppRelationshipItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsAppXRelationshipsMobileAppRelationshipItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsAppXRelationshipsMobileAppRelationshipItemRequestBuilder) { + m := &MobileAppsItemGraphWindowsAppXRelationshipsMobileAppRelationshipItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/relationships/{mobileAppRelationship%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsAppXRelationshipsMobileAppRelationshipItemRequestBuilder instantiates a new MobileAppRelationshipItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsAppXRelationshipsMobileAppRelationshipItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsAppXRelationshipsMobileAppRelationshipItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsAppXRelationshipsMobileAppRelationshipItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property relationships for deviceAppManagement +func (m *MobileAppsItemGraphWindowsAppXRelationshipsMobileAppRelationshipItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsAppXRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get list of relationships for this mobile app. +func (m *MobileAppsItemGraphWindowsAppXRelationshipsMobileAppRelationshipItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsAppXRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// Patch update the navigation property relationships in deviceAppManagement +func (m *MobileAppsItemGraphWindowsAppXRelationshipsMobileAppRelationshipItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphWindowsAppXRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// ToDeleteRequestInformation delete navigation property relationships for deviceAppManagement +func (m *MobileAppsItemGraphWindowsAppXRelationshipsMobileAppRelationshipItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsAppXRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation list of relationships for this mobile app. +func (m *MobileAppsItemGraphWindowsAppXRelationshipsMobileAppRelationshipItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsAppXRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property relationships in deviceAppManagement +func (m *MobileAppsItemGraphWindowsAppXRelationshipsMobileAppRelationshipItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphWindowsAppXRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsAppXRelationshipsMobileAppRelationshipItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsAppXRelationshipsMobileAppRelationshipItemRequestBuilder) { + return NewMobileAppsItemGraphWindowsAppXRelationshipsMobileAppRelationshipItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_app_x_relationships_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_app_x_relationships_request_builder.go new file mode 100644 index 00000000000..947a30aae07 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_app_x_relationships_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsAppXRelationshipsRequestBuilder provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphWindowsAppXRelationshipsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsAppXRelationshipsRequestBuilderGetQueryParameters list of relationships for this mobile app. +type MobileAppsItemGraphWindowsAppXRelationshipsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphWindowsAppXRelationshipsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsAppXRelationshipsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsAppXRelationshipsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphWindowsAppXRelationshipsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsAppXRelationshipsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppRelationshipId provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphWindowsAppXRelationshipsRequestBuilder) ByMobileAppRelationshipId(mobileAppRelationshipId string)(*MobileAppsItemGraphWindowsAppXRelationshipsMobileAppRelationshipItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppRelationshipId != "" { + urlTplParams["mobileAppRelationship%2Did"] = mobileAppRelationshipId + } + return NewMobileAppsItemGraphWindowsAppXRelationshipsMobileAppRelationshipItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphWindowsAppXRelationshipsRequestBuilderInternal instantiates a new RelationshipsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsAppXRelationshipsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsAppXRelationshipsRequestBuilder) { + m := &MobileAppsItemGraphWindowsAppXRelationshipsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/relationships{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsAppXRelationshipsRequestBuilder instantiates a new RelationshipsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsAppXRelationshipsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsAppXRelationshipsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsAppXRelationshipsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphWindowsAppXRelationshipsRequestBuilder) Count()(*MobileAppsItemGraphWindowsAppXRelationshipsCountRequestBuilder) { + return NewMobileAppsItemGraphWindowsAppXRelationshipsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get list of relationships for this mobile app. +func (m *MobileAppsItemGraphWindowsAppXRelationshipsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsAppXRelationshipsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipCollectionResponseable), nil +} +// Post create new navigation property to relationships for deviceAppManagement +func (m *MobileAppsItemGraphWindowsAppXRelationshipsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphWindowsAppXRelationshipsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// ToGetRequestInformation list of relationships for this mobile app. +func (m *MobileAppsItemGraphWindowsAppXRelationshipsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsAppXRelationshipsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to relationships for deviceAppManagement +func (m *MobileAppsItemGraphWindowsAppXRelationshipsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphWindowsAppXRelationshipsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsAppXRelationshipsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsAppXRelationshipsRequestBuilder) { + return NewMobileAppsItemGraphWindowsAppXRelationshipsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_app_x_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_app_x_request_builder.go index 89becc7a140..045543a95cf 100644 --- a/deviceappmanagement/mobile_apps_item_graph_windows_app_x_request_builder.go +++ b/deviceappmanagement/mobile_apps_item_graph_windows_app_x_request_builder.go @@ -27,6 +27,14 @@ type MobileAppsItemGraphWindowsAppXRequestBuilderGetRequestConfiguration struct // Request query parameters QueryParameters *MobileAppsItemGraphWindowsAppXRequestBuilderGetQueryParameters } +// Assignments provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphWindowsAppXRequestBuilder) Assignments()(*MobileAppsItemGraphWindowsAppXAssignmentsRequestBuilder) { + return NewMobileAppsItemGraphWindowsAppXAssignmentsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Categories provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphWindowsAppXRequestBuilder) Categories()(*MobileAppsItemGraphWindowsAppXCategoriesRequestBuilder) { + return NewMobileAppsItemGraphWindowsAppXCategoriesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // NewMobileAppsItemGraphWindowsAppXRequestBuilderInternal instantiates a new GraphWindowsAppXRequestBuilder and sets the default values. func NewMobileAppsItemGraphWindowsAppXRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsAppXRequestBuilder) { m := &MobileAppsItemGraphWindowsAppXRequestBuilder{ @@ -40,6 +48,10 @@ func NewMobileAppsItemGraphWindowsAppXRequestBuilder(rawUrl string, requestAdapt urlParams["request-raw-url"] = rawUrl return NewMobileAppsItemGraphWindowsAppXRequestBuilderInternal(urlParams, requestAdapter) } +// ContentVersions provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. +func (m *MobileAppsItemGraphWindowsAppXRequestBuilder) ContentVersions()(*MobileAppsItemGraphWindowsAppXContentVersionsRequestBuilder) { + return NewMobileAppsItemGraphWindowsAppXContentVersionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // Get get the item of type microsoft.graph.mobileApp as microsoft.graph.windowsAppX func (m *MobileAppsItemGraphWindowsAppXRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsAppXRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.WindowsAppXable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); @@ -59,6 +71,10 @@ func (m *MobileAppsItemGraphWindowsAppXRequestBuilder) Get(ctx context.Context, } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.WindowsAppXable), nil } +// Relationships provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphWindowsAppXRequestBuilder) Relationships()(*MobileAppsItemGraphWindowsAppXRelationshipsRequestBuilder) { + return NewMobileAppsItemGraphWindowsAppXRelationshipsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation get the item of type microsoft.graph.mobileApp as microsoft.graph.windowsAppX func (m *MobileAppsItemGraphWindowsAppXRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsAppXRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_assignments_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_assignments_count_request_builder.go new file mode 100644 index 00000000000..b944d50f563 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_assignments_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsMobileMSIAssignmentsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphWindowsMobileMSIAssignmentsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsMobileMSIAssignmentsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphWindowsMobileMSIAssignmentsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphWindowsMobileMSIAssignmentsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsMobileMSIAssignmentsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsMobileMSIAssignmentsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphWindowsMobileMSIAssignmentsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsMobileMSIAssignmentsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsMobileMSIAssignmentsCountRequestBuilder) { + m := &MobileAppsItemGraphWindowsMobileMSIAssignmentsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/assignments/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsMobileMSIAssignmentsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsMobileMSIAssignmentsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsMobileMSIAssignmentsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsMobileMSIAssignmentsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphWindowsMobileMSIAssignmentsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIAssignmentsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphWindowsMobileMSIAssignmentsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIAssignmentsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsMobileMSIAssignmentsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsMobileMSIAssignmentsCountRequestBuilder) { + return NewMobileAppsItemGraphWindowsMobileMSIAssignmentsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_assignments_mobile_app_assignment_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_assignments_mobile_app_assignment_item_request_builder.go new file mode 100644 index 00000000000..15a8ead18b4 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_assignments_mobile_app_assignment_item_request_builder.go @@ -0,0 +1,159 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsMobileMSIAssignmentsMobileAppAssignmentItemRequestBuilder provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphWindowsMobileMSIAssignmentsMobileAppAssignmentItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsMobileMSIAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsMobileMSIAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphWindowsMobileMSIAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters the list of group assignments for this mobile app. +type MobileAppsItemGraphWindowsMobileMSIAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphWindowsMobileMSIAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsMobileMSIAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsMobileMSIAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphWindowsMobileMSIAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsMobileMSIAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphWindowsMobileMSIAssignmentsMobileAppAssignmentItemRequestBuilderInternal instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsMobileMSIAssignmentsMobileAppAssignmentItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsMobileMSIAssignmentsMobileAppAssignmentItemRequestBuilder) { + m := &MobileAppsItemGraphWindowsMobileMSIAssignmentsMobileAppAssignmentItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsMobileMSIAssignmentsMobileAppAssignmentItemRequestBuilder instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsMobileMSIAssignmentsMobileAppAssignmentItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsMobileMSIAssignmentsMobileAppAssignmentItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsMobileMSIAssignmentsMobileAppAssignmentItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property assignments for deviceAppManagement +func (m *MobileAppsItemGraphWindowsMobileMSIAssignmentsMobileAppAssignmentItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphWindowsMobileMSIAssignmentsMobileAppAssignmentItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// Patch update the navigation property assignments in deviceAppManagement +func (m *MobileAppsItemGraphWindowsMobileMSIAssignmentsMobileAppAssignmentItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// ToDeleteRequestInformation delete navigation property assignments for deviceAppManagement +func (m *MobileAppsItemGraphWindowsMobileMSIAssignmentsMobileAppAssignmentItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphWindowsMobileMSIAssignmentsMobileAppAssignmentItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property assignments in deviceAppManagement +func (m *MobileAppsItemGraphWindowsMobileMSIAssignmentsMobileAppAssignmentItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsMobileMSIAssignmentsMobileAppAssignmentItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsMobileMSIAssignmentsMobileAppAssignmentItemRequestBuilder) { + return NewMobileAppsItemGraphWindowsMobileMSIAssignmentsMobileAppAssignmentItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_assignments_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_assignments_request_builder.go new file mode 100644 index 00000000000..b878267113b --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_assignments_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsMobileMSIAssignmentsRequestBuilder provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphWindowsMobileMSIAssignmentsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsMobileMSIAssignmentsRequestBuilderGetQueryParameters the list of group assignments for this mobile app. +type MobileAppsItemGraphWindowsMobileMSIAssignmentsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphWindowsMobileMSIAssignmentsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsMobileMSIAssignmentsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsMobileMSIAssignmentsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphWindowsMobileMSIAssignmentsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsMobileMSIAssignmentsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppAssignmentId provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphWindowsMobileMSIAssignmentsRequestBuilder) ByMobileAppAssignmentId(mobileAppAssignmentId string)(*MobileAppsItemGraphWindowsMobileMSIAssignmentsMobileAppAssignmentItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppAssignmentId != "" { + urlTplParams["mobileAppAssignment%2Did"] = mobileAppAssignmentId + } + return NewMobileAppsItemGraphWindowsMobileMSIAssignmentsMobileAppAssignmentItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphWindowsMobileMSIAssignmentsRequestBuilderInternal instantiates a new AssignmentsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsMobileMSIAssignmentsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsMobileMSIAssignmentsRequestBuilder) { + m := &MobileAppsItemGraphWindowsMobileMSIAssignmentsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsMobileMSIAssignmentsRequestBuilder instantiates a new AssignmentsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsMobileMSIAssignmentsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsMobileMSIAssignmentsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsMobileMSIAssignmentsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphWindowsMobileMSIAssignmentsRequestBuilder) Count()(*MobileAppsItemGraphWindowsMobileMSIAssignmentsCountRequestBuilder) { + return NewMobileAppsItemGraphWindowsMobileMSIAssignmentsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphWindowsMobileMSIAssignmentsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIAssignmentsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentCollectionResponseable), nil +} +// Post create new navigation property to assignments for deviceAppManagement +func (m *MobileAppsItemGraphWindowsMobileMSIAssignmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIAssignmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// ToGetRequestInformation the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphWindowsMobileMSIAssignmentsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIAssignmentsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to assignments for deviceAppManagement +func (m *MobileAppsItemGraphWindowsMobileMSIAssignmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIAssignmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsMobileMSIAssignmentsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsMobileMSIAssignmentsRequestBuilder) { + return NewMobileAppsItemGraphWindowsMobileMSIAssignmentsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_categories_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_categories_count_request_builder.go new file mode 100644 index 00000000000..2c1211d239d --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_categories_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsMobileMSICategoriesCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphWindowsMobileMSICategoriesCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsMobileMSICategoriesCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphWindowsMobileMSICategoriesCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphWindowsMobileMSICategoriesCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsMobileMSICategoriesCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsMobileMSICategoriesCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphWindowsMobileMSICategoriesCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsMobileMSICategoriesCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsMobileMSICategoriesCountRequestBuilder) { + m := &MobileAppsItemGraphWindowsMobileMSICategoriesCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/categories/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsMobileMSICategoriesCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsMobileMSICategoriesCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsMobileMSICategoriesCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsMobileMSICategoriesCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphWindowsMobileMSICategoriesCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsMobileMSICategoriesCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphWindowsMobileMSICategoriesCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsMobileMSICategoriesCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsMobileMSICategoriesCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsMobileMSICategoriesCountRequestBuilder) { + return NewMobileAppsItemGraphWindowsMobileMSICategoriesCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_categories_mobile_app_category_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_categories_mobile_app_category_item_request_builder.go new file mode 100644 index 00000000000..68326ca866e --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_categories_mobile_app_category_item_request_builder.go @@ -0,0 +1,81 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsMobileMSICategoriesMobileAppCategoryItemRequestBuilder provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphWindowsMobileMSICategoriesMobileAppCategoryItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsMobileMSICategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters the list of categories for this app. +type MobileAppsItemGraphWindowsMobileMSICategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphWindowsMobileMSICategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsMobileMSICategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsMobileMSICategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphWindowsMobileMSICategoriesMobileAppCategoryItemRequestBuilderInternal instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsMobileMSICategoriesMobileAppCategoryItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsMobileMSICategoriesMobileAppCategoryItemRequestBuilder) { + m := &MobileAppsItemGraphWindowsMobileMSICategoriesMobileAppCategoryItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsMobileMSICategoriesMobileAppCategoryItemRequestBuilder instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsMobileMSICategoriesMobileAppCategoryItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsMobileMSICategoriesMobileAppCategoryItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsMobileMSICategoriesMobileAppCategoryItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get the list of categories for this app. +func (m *MobileAppsItemGraphWindowsMobileMSICategoriesMobileAppCategoryItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsMobileMSICategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppCategoryFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryable), nil +} +// ToGetRequestInformation the list of categories for this app. +func (m *MobileAppsItemGraphWindowsMobileMSICategoriesMobileAppCategoryItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsMobileMSICategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsMobileMSICategoriesMobileAppCategoryItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsMobileMSICategoriesMobileAppCategoryItemRequestBuilder) { + return NewMobileAppsItemGraphWindowsMobileMSICategoriesMobileAppCategoryItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_categories_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_categories_request_builder.go new file mode 100644 index 00000000000..e2605c38cb4 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_categories_request_builder.go @@ -0,0 +1,108 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsMobileMSICategoriesRequestBuilder provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphWindowsMobileMSICategoriesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsMobileMSICategoriesRequestBuilderGetQueryParameters the list of categories for this app. +type MobileAppsItemGraphWindowsMobileMSICategoriesRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphWindowsMobileMSICategoriesRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsMobileMSICategoriesRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsMobileMSICategoriesRequestBuilderGetQueryParameters +} +// ByMobileAppCategoryId provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphWindowsMobileMSICategoriesRequestBuilder) ByMobileAppCategoryId(mobileAppCategoryId string)(*MobileAppsItemGraphWindowsMobileMSICategoriesMobileAppCategoryItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppCategoryId != "" { + urlTplParams["mobileAppCategory%2Did"] = mobileAppCategoryId + } + return NewMobileAppsItemGraphWindowsMobileMSICategoriesMobileAppCategoryItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphWindowsMobileMSICategoriesRequestBuilderInternal instantiates a new CategoriesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsMobileMSICategoriesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsMobileMSICategoriesRequestBuilder) { + m := &MobileAppsItemGraphWindowsMobileMSICategoriesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsMobileMSICategoriesRequestBuilder instantiates a new CategoriesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsMobileMSICategoriesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsMobileMSICategoriesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsMobileMSICategoriesRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphWindowsMobileMSICategoriesRequestBuilder) Count()(*MobileAppsItemGraphWindowsMobileMSICategoriesCountRequestBuilder) { + return NewMobileAppsItemGraphWindowsMobileMSICategoriesCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of categories for this app. +func (m *MobileAppsItemGraphWindowsMobileMSICategoriesRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsMobileMSICategoriesRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppCategoryCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryCollectionResponseable), nil +} +// ToGetRequestInformation the list of categories for this app. +func (m *MobileAppsItemGraphWindowsMobileMSICategoriesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsMobileMSICategoriesRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsMobileMSICategoriesRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsMobileMSICategoriesRequestBuilder) { + return NewMobileAppsItemGraphWindowsMobileMSICategoriesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_content_versions_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_content_versions_count_request_builder.go new file mode 100644 index 00000000000..d69e7645c50 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_content_versions_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsMobileMSIContentVersionsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphWindowsMobileMSIContentVersionsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsMobileMSIContentVersionsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphWindowsMobileMSIContentVersionsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphWindowsMobileMSIContentVersionsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsMobileMSIContentVersionsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsMobileMSIContentVersionsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphWindowsMobileMSIContentVersionsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsMobileMSIContentVersionsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsMobileMSIContentVersionsCountRequestBuilder) { + m := &MobileAppsItemGraphWindowsMobileMSIContentVersionsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/contentVersions/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsMobileMSIContentVersionsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsMobileMSIContentVersionsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsMobileMSIContentVersionsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsMobileMSIContentVersionsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIContentVersionsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIContentVersionsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsMobileMSIContentVersionsCountRequestBuilder) { + return NewMobileAppsItemGraphWindowsMobileMSIContentVersionsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_content_versions_item_contained_apps_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_content_versions_item_contained_apps_count_request_builder.go new file mode 100644 index 00000000000..008ecb4ba6b --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_content_versions_item_contained_apps_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsCountRequestBuilder) { + m := &MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/contentVersions/{mobileAppContent%2Did}/containedApps/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsCountRequestBuilder) { + return NewMobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_content_versions_item_contained_apps_mobile_contained_app_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_content_versions_item_contained_apps_mobile_contained_app_item_request_builder.go new file mode 100644 index 00000000000..bea3d41b35d --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_content_versions_item_contained_apps_mobile_contained_app_item_request_builder.go @@ -0,0 +1,159 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. +type MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetQueryParameters the collection of contained apps in a MobileLobApp acting as a package. +type MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderInternal instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) { + m := &MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/contentVersions/{mobileAppContent%2Did}/containedApps/{mobileContainedApp%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property containedApps for deviceAppManagement +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get the collection of contained apps in a MobileLobApp acting as a package. +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileContainedAppFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable), nil +} +// Patch update the navigation property containedApps in deviceAppManagement +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileContainedAppFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable), nil +} +// ToDeleteRequestInformation delete navigation property containedApps for deviceAppManagement +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation the collection of contained apps in a MobileLobApp acting as a package. +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property containedApps in deviceAppManagement +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) { + return NewMobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_content_versions_item_contained_apps_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_content_versions_item_contained_apps_request_builder.go new file mode 100644 index 00000000000..c8867eeaaeb --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_content_versions_item_contained_apps_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsRequestBuilder provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. +type MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsRequestBuilderGetQueryParameters the collection of contained apps in a MobileLobApp acting as a package. +type MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileContainedAppId provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsRequestBuilder) ByMobileContainedAppId(mobileContainedAppId string)(*MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileContainedAppId != "" { + urlTplParams["mobileContainedApp%2Did"] = mobileContainedAppId + } + return NewMobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsRequestBuilderInternal instantiates a new ContainedAppsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsRequestBuilder) { + m := &MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/contentVersions/{mobileAppContent%2Did}/containedApps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsRequestBuilder instantiates a new ContainedAppsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsRequestBuilder) Count()(*MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsCountRequestBuilder) { + return NewMobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the collection of contained apps in a MobileLobApp acting as a package. +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileContainedAppCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppCollectionResponseable), nil +} +// Post create new navigation property to containedApps for deviceAppManagement +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileContainedAppFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable), nil +} +// ToGetRequestInformation the collection of contained apps in a MobileLobApp acting as a package. +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to containedApps for deviceAppManagement +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsRequestBuilder) { + return NewMobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_content_versions_item_files_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_content_versions_item_files_count_request_builder.go new file mode 100644 index 00000000000..9dcba7eb73a --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_content_versions_item_files_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesCountRequestBuilder) { + m := &MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/contentVersions/{mobileAppContent%2Did}/files/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesCountRequestBuilder) { + return NewMobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_content_versions_item_files_item_commit_post_request_body.go b/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_content_versions_item_files_item_commit_post_request_body.go new file mode 100644 index 00000000000..a573d63f647 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_content_versions_item_files_item_commit_post_request_body.go @@ -0,0 +1,111 @@ +package deviceappmanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +// MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemCommitPostRequestBody +type MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemCommitPostRequestBody struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewMobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemCommitPostRequestBody instantiates a new MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemCommitPostRequestBody and sets the default values. +func NewMobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemCommitPostRequestBody()(*MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemCommitPostRequestBody) { + m := &MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemCommitPostRequestBody{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateMobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemCommitPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemCommitPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemCommitPostRequestBody(), nil +} +// GetAdditionalData gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemCommitPostRequestBody) GetAdditionalData()(map[string]any) { + val , err := m.backingStore.Get("additionalData") + if err != nil { + panic(err) + } + if val == nil { + var value = make(map[string]any); + m.SetAdditionalData(value); + } + return val.(map[string]any) +} +// GetBackingStore gets the backingStore property value. Stores model information. +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemCommitPostRequestBody) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemCommitPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["fileEncryptionInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateFileEncryptionInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetFileEncryptionInfo(val.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable)) + } + return nil + } + return res +} +// GetFileEncryptionInfo gets the fileEncryptionInfo property value. The fileEncryptionInfo property +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemCommitPostRequestBody) GetFileEncryptionInfo()(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable) { + val, err := m.GetBackingStore().Get("fileEncryptionInfo") + if err != nil { + panic(err) + } + if val != nil { + return val.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable) + } + return nil +} +// Serialize serializes information the current object +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemCommitPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("fileEncryptionInfo", m.GetFileEncryptionInfo()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemCommitPostRequestBody) SetAdditionalData(value map[string]any)() { + err := m.GetBackingStore().Set("additionalData", value) + if err != nil { + panic(err) + } +} +// SetBackingStore sets the backingStore property value. Stores model information. +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemCommitPostRequestBody) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetFileEncryptionInfo sets the fileEncryptionInfo property value. The fileEncryptionInfo property +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemCommitPostRequestBody) SetFileEncryptionInfo(value ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable)() { + err := m.GetBackingStore().Set("fileEncryptionInfo", value) + if err != nil { + panic(err) + } +} +// MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemCommitPostRequestBodyable +type MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemCommitPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetFileEncryptionInfo()(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetFileEncryptionInfo(value ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable)() +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_content_versions_item_files_item_commit_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_content_versions_item_files_item_commit_request_builder.go new file mode 100644 index 00000000000..5b1a7d34efa --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_content_versions_item_files_item_commit_request_builder.go @@ -0,0 +1,68 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemCommitRequestBuilder provides operations to call the commit method. +type MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemCommitRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemCommitRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemCommitRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemCommitRequestBuilderInternal instantiates a new CommitRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemCommitRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemCommitRequestBuilder) { + m := &MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemCommitRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/commit", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemCommitRequestBuilder instantiates a new CommitRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemCommitRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemCommitRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemCommitRequestBuilderInternal(urlParams, requestAdapter) +} +// Post commits a file of a given app. +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemCommitRequestBuilder) Post(ctx context.Context, body MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemCommitPostRequestBodyable, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemCommitRequestBuilderPostRequestConfiguration)(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation commits a file of a given app. +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemCommitRequestBuilder) ToPostRequestInformation(ctx context.Context, body MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemCommitPostRequestBodyable, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemCommitRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemCommitRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemCommitRequestBuilder) { + return NewMobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemCommitRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_content_versions_item_files_item_renew_upload_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_content_versions_item_files_item_renew_upload_request_builder.go new file mode 100644 index 00000000000..cf24c79d57f --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_content_versions_item_files_item_renew_upload_request_builder.go @@ -0,0 +1,64 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemRenewUploadRequestBuilder provides operations to call the renewUpload method. +type MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemRenewUploadRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemRenewUploadRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemRenewUploadRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemRenewUploadRequestBuilderInternal instantiates a new RenewUploadRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemRenewUploadRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemRenewUploadRequestBuilder) { + m := &MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemRenewUploadRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/renewUpload", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemRenewUploadRequestBuilder instantiates a new RenewUploadRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemRenewUploadRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemRenewUploadRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemRenewUploadRequestBuilderInternal(urlParams, requestAdapter) +} +// Post renews the SAS URI for an application file upload. +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemRenewUploadRequestBuilder) Post(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemRenewUploadRequestBuilderPostRequestConfiguration)(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation renews the SAS URI for an application file upload. +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemRenewUploadRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemRenewUploadRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemRenewUploadRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemRenewUploadRequestBuilder) { + return NewMobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemRenewUploadRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_content_versions_item_files_mobile_app_content_file_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_content_versions_item_files_mobile_app_content_file_item_request_builder.go new file mode 100644 index 00000000000..d21af24dac7 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_content_versions_item_files_mobile_app_content_file_item_request_builder.go @@ -0,0 +1,167 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesMobileAppContentFileItemRequestBuilder provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. +type MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesMobileAppContentFileItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesMobileAppContentFileItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesMobileAppContentFileItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetQueryParameters the list of files for this app content version. +type MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesMobileAppContentFileItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesMobileAppContentFileItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// Commit provides operations to call the commit method. +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) Commit()(*MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemCommitRequestBuilder) { + return NewMobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemCommitRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesMobileAppContentFileItemRequestBuilderInternal instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesMobileAppContentFileItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) { + m := &MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesMobileAppContentFileItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesMobileAppContentFileItemRequestBuilder instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesMobileAppContentFileItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesMobileAppContentFileItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property files for deviceAppManagement +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesMobileAppContentFileItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get the list of files for this app content version. +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFileFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable), nil +} +// Patch update the navigation property files in deviceAppManagement +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesMobileAppContentFileItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFileFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable), nil +} +// RenewUpload provides operations to call the renewUpload method. +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) RenewUpload()(*MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemRenewUploadRequestBuilder) { + return NewMobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesItemRenewUploadRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToDeleteRequestInformation delete navigation property files for deviceAppManagement +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesMobileAppContentFileItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation the list of files for this app content version. +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property files in deviceAppManagement +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesMobileAppContentFileItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) { + return NewMobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesMobileAppContentFileItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_content_versions_item_files_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_content_versions_item_files_request_builder.go new file mode 100644 index 00000000000..ffe4b22ce69 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_content_versions_item_files_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesRequestBuilder provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. +type MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesRequestBuilderGetQueryParameters the list of files for this app content version. +type MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppContentFileId provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesRequestBuilder) ByMobileAppContentFileId(mobileAppContentFileId string)(*MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppContentFileId != "" { + urlTplParams["mobileAppContentFile%2Did"] = mobileAppContentFileId + } + return NewMobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesMobileAppContentFileItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesRequestBuilderInternal instantiates a new FilesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesRequestBuilder) { + m := &MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/contentVersions/{mobileAppContent%2Did}/files{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesRequestBuilder instantiates a new FilesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesRequestBuilder) Count()(*MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesCountRequestBuilder) { + return NewMobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of files for this app content version. +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFileCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileCollectionResponseable), nil +} +// Post create new navigation property to files for deviceAppManagement +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFileFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable), nil +} +// ToGetRequestInformation the list of files for this app content version. +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to files for deviceAppManagement +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesRequestBuilder) { + return NewMobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_content_versions_mobile_app_content_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_content_versions_mobile_app_content_item_request_builder.go new file mode 100644 index 00000000000..aefe68b0959 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_content_versions_mobile_app_content_item_request_builder.go @@ -0,0 +1,167 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsMobileMSIContentVersionsMobileAppContentItemRequestBuilder provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. +type MobileAppsItemGraphWindowsMobileMSIContentVersionsMobileAppContentItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsMobileMSIContentVersionsMobileAppContentItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsMobileMSIContentVersionsMobileAppContentItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphWindowsMobileMSIContentVersionsMobileAppContentItemRequestBuilderGetQueryParameters the list of content versions for this app. +type MobileAppsItemGraphWindowsMobileMSIContentVersionsMobileAppContentItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphWindowsMobileMSIContentVersionsMobileAppContentItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsMobileMSIContentVersionsMobileAppContentItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsMobileMSIContentVersionsMobileAppContentItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphWindowsMobileMSIContentVersionsMobileAppContentItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsMobileMSIContentVersionsMobileAppContentItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphWindowsMobileMSIContentVersionsMobileAppContentItemRequestBuilderInternal instantiates a new MobileAppContentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsMobileMSIContentVersionsMobileAppContentItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsMobileMSIContentVersionsMobileAppContentItemRequestBuilder) { + m := &MobileAppsItemGraphWindowsMobileMSIContentVersionsMobileAppContentItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/contentVersions/{mobileAppContent%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsMobileMSIContentVersionsMobileAppContentItemRequestBuilder instantiates a new MobileAppContentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsMobileMSIContentVersionsMobileAppContentItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsMobileMSIContentVersionsMobileAppContentItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsMobileMSIContentVersionsMobileAppContentItemRequestBuilderInternal(urlParams, requestAdapter) +} +// ContainedApps provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsMobileAppContentItemRequestBuilder) ContainedApps()(*MobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsRequestBuilder) { + return NewMobileAppsItemGraphWindowsMobileMSIContentVersionsItemContainedAppsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Delete delete navigation property contentVersions for deviceAppManagement +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsMobileAppContentItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIContentVersionsMobileAppContentItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Files provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsMobileAppContentItemRequestBuilder) Files()(*MobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesRequestBuilder) { + return NewMobileAppsItemGraphWindowsMobileMSIContentVersionsItemFilesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of content versions for this app. +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsMobileAppContentItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIContentVersionsMobileAppContentItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable), nil +} +// Patch update the navigation property contentVersions in deviceAppManagement +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsMobileAppContentItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIContentVersionsMobileAppContentItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable), nil +} +// ToDeleteRequestInformation delete navigation property contentVersions for deviceAppManagement +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsMobileAppContentItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIContentVersionsMobileAppContentItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation the list of content versions for this app. +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsMobileAppContentItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIContentVersionsMobileAppContentItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property contentVersions in deviceAppManagement +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsMobileAppContentItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIContentVersionsMobileAppContentItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsMobileAppContentItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsMobileMSIContentVersionsMobileAppContentItemRequestBuilder) { + return NewMobileAppsItemGraphWindowsMobileMSIContentVersionsMobileAppContentItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_content_versions_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_content_versions_request_builder.go new file mode 100644 index 00000000000..46f20465609 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_content_versions_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsMobileMSIContentVersionsRequestBuilder provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. +type MobileAppsItemGraphWindowsMobileMSIContentVersionsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsMobileMSIContentVersionsRequestBuilderGetQueryParameters the list of content versions for this app. +type MobileAppsItemGraphWindowsMobileMSIContentVersionsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphWindowsMobileMSIContentVersionsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsMobileMSIContentVersionsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsMobileMSIContentVersionsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphWindowsMobileMSIContentVersionsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsMobileMSIContentVersionsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppContentId provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsRequestBuilder) ByMobileAppContentId(mobileAppContentId string)(*MobileAppsItemGraphWindowsMobileMSIContentVersionsMobileAppContentItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppContentId != "" { + urlTplParams["mobileAppContent%2Did"] = mobileAppContentId + } + return NewMobileAppsItemGraphWindowsMobileMSIContentVersionsMobileAppContentItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphWindowsMobileMSIContentVersionsRequestBuilderInternal instantiates a new ContentVersionsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsMobileMSIContentVersionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsMobileMSIContentVersionsRequestBuilder) { + m := &MobileAppsItemGraphWindowsMobileMSIContentVersionsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/contentVersions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsMobileMSIContentVersionsRequestBuilder instantiates a new ContentVersionsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsMobileMSIContentVersionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsMobileMSIContentVersionsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsMobileMSIContentVersionsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsRequestBuilder) Count()(*MobileAppsItemGraphWindowsMobileMSIContentVersionsCountRequestBuilder) { + return NewMobileAppsItemGraphWindowsMobileMSIContentVersionsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of content versions for this app. +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIContentVersionsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentCollectionResponseable), nil +} +// Post create new navigation property to contentVersions for deviceAppManagement +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIContentVersionsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable), nil +} +// ToGetRequestInformation the list of content versions for this app. +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIContentVersionsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to contentVersions for deviceAppManagement +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIContentVersionsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsMobileMSIContentVersionsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsMobileMSIContentVersionsRequestBuilder) { + return NewMobileAppsItemGraphWindowsMobileMSIContentVersionsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_relationships_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_relationships_count_request_builder.go new file mode 100644 index 00000000000..8970664645d --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_relationships_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsMobileMSIRelationshipsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphWindowsMobileMSIRelationshipsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsMobileMSIRelationshipsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphWindowsMobileMSIRelationshipsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphWindowsMobileMSIRelationshipsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsMobileMSIRelationshipsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsMobileMSIRelationshipsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphWindowsMobileMSIRelationshipsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsMobileMSIRelationshipsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsMobileMSIRelationshipsCountRequestBuilder) { + m := &MobileAppsItemGraphWindowsMobileMSIRelationshipsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/relationships/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsMobileMSIRelationshipsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsMobileMSIRelationshipsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsMobileMSIRelationshipsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsMobileMSIRelationshipsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphWindowsMobileMSIRelationshipsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIRelationshipsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphWindowsMobileMSIRelationshipsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIRelationshipsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsMobileMSIRelationshipsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsMobileMSIRelationshipsCountRequestBuilder) { + return NewMobileAppsItemGraphWindowsMobileMSIRelationshipsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_relationships_mobile_app_relationship_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_relationships_mobile_app_relationship_item_request_builder.go new file mode 100644 index 00000000000..e497e1a8390 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_relationships_mobile_app_relationship_item_request_builder.go @@ -0,0 +1,159 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsMobileMSIRelationshipsMobileAppRelationshipItemRequestBuilder provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphWindowsMobileMSIRelationshipsMobileAppRelationshipItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsMobileMSIRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsMobileMSIRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphWindowsMobileMSIRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters list of relationships for this mobile app. +type MobileAppsItemGraphWindowsMobileMSIRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphWindowsMobileMSIRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsMobileMSIRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsMobileMSIRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphWindowsMobileMSIRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsMobileMSIRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphWindowsMobileMSIRelationshipsMobileAppRelationshipItemRequestBuilderInternal instantiates a new MobileAppRelationshipItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsMobileMSIRelationshipsMobileAppRelationshipItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsMobileMSIRelationshipsMobileAppRelationshipItemRequestBuilder) { + m := &MobileAppsItemGraphWindowsMobileMSIRelationshipsMobileAppRelationshipItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/relationships/{mobileAppRelationship%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsMobileMSIRelationshipsMobileAppRelationshipItemRequestBuilder instantiates a new MobileAppRelationshipItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsMobileMSIRelationshipsMobileAppRelationshipItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsMobileMSIRelationshipsMobileAppRelationshipItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsMobileMSIRelationshipsMobileAppRelationshipItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property relationships for deviceAppManagement +func (m *MobileAppsItemGraphWindowsMobileMSIRelationshipsMobileAppRelationshipItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get list of relationships for this mobile app. +func (m *MobileAppsItemGraphWindowsMobileMSIRelationshipsMobileAppRelationshipItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// Patch update the navigation property relationships in deviceAppManagement +func (m *MobileAppsItemGraphWindowsMobileMSIRelationshipsMobileAppRelationshipItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// ToDeleteRequestInformation delete navigation property relationships for deviceAppManagement +func (m *MobileAppsItemGraphWindowsMobileMSIRelationshipsMobileAppRelationshipItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation list of relationships for this mobile app. +func (m *MobileAppsItemGraphWindowsMobileMSIRelationshipsMobileAppRelationshipItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property relationships in deviceAppManagement +func (m *MobileAppsItemGraphWindowsMobileMSIRelationshipsMobileAppRelationshipItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsMobileMSIRelationshipsMobileAppRelationshipItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsMobileMSIRelationshipsMobileAppRelationshipItemRequestBuilder) { + return NewMobileAppsItemGraphWindowsMobileMSIRelationshipsMobileAppRelationshipItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_relationships_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_relationships_request_builder.go new file mode 100644 index 00000000000..c47fb76fa31 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_relationships_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsMobileMSIRelationshipsRequestBuilder provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphWindowsMobileMSIRelationshipsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsMobileMSIRelationshipsRequestBuilderGetQueryParameters list of relationships for this mobile app. +type MobileAppsItemGraphWindowsMobileMSIRelationshipsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphWindowsMobileMSIRelationshipsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsMobileMSIRelationshipsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsMobileMSIRelationshipsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphWindowsMobileMSIRelationshipsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsMobileMSIRelationshipsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppRelationshipId provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphWindowsMobileMSIRelationshipsRequestBuilder) ByMobileAppRelationshipId(mobileAppRelationshipId string)(*MobileAppsItemGraphWindowsMobileMSIRelationshipsMobileAppRelationshipItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppRelationshipId != "" { + urlTplParams["mobileAppRelationship%2Did"] = mobileAppRelationshipId + } + return NewMobileAppsItemGraphWindowsMobileMSIRelationshipsMobileAppRelationshipItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphWindowsMobileMSIRelationshipsRequestBuilderInternal instantiates a new RelationshipsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsMobileMSIRelationshipsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsMobileMSIRelationshipsRequestBuilder) { + m := &MobileAppsItemGraphWindowsMobileMSIRelationshipsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/relationships{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsMobileMSIRelationshipsRequestBuilder instantiates a new RelationshipsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsMobileMSIRelationshipsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsMobileMSIRelationshipsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsMobileMSIRelationshipsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphWindowsMobileMSIRelationshipsRequestBuilder) Count()(*MobileAppsItemGraphWindowsMobileMSIRelationshipsCountRequestBuilder) { + return NewMobileAppsItemGraphWindowsMobileMSIRelationshipsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get list of relationships for this mobile app. +func (m *MobileAppsItemGraphWindowsMobileMSIRelationshipsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIRelationshipsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipCollectionResponseable), nil +} +// Post create new navigation property to relationships for deviceAppManagement +func (m *MobileAppsItemGraphWindowsMobileMSIRelationshipsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIRelationshipsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// ToGetRequestInformation list of relationships for this mobile app. +func (m *MobileAppsItemGraphWindowsMobileMSIRelationshipsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIRelationshipsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to relationships for deviceAppManagement +func (m *MobileAppsItemGraphWindowsMobileMSIRelationshipsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIRelationshipsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsMobileMSIRelationshipsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsMobileMSIRelationshipsRequestBuilder) { + return NewMobileAppsItemGraphWindowsMobileMSIRelationshipsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_request_builder.go index fca1daa4e9e..f258a9a1609 100644 --- a/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_request_builder.go +++ b/deviceappmanagement/mobile_apps_item_graph_windows_mobile_m_s_i_request_builder.go @@ -27,6 +27,14 @@ type MobileAppsItemGraphWindowsMobileMSIRequestBuilderGetRequestConfiguration st // Request query parameters QueryParameters *MobileAppsItemGraphWindowsMobileMSIRequestBuilderGetQueryParameters } +// Assignments provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphWindowsMobileMSIRequestBuilder) Assignments()(*MobileAppsItemGraphWindowsMobileMSIAssignmentsRequestBuilder) { + return NewMobileAppsItemGraphWindowsMobileMSIAssignmentsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Categories provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphWindowsMobileMSIRequestBuilder) Categories()(*MobileAppsItemGraphWindowsMobileMSICategoriesRequestBuilder) { + return NewMobileAppsItemGraphWindowsMobileMSICategoriesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // NewMobileAppsItemGraphWindowsMobileMSIRequestBuilderInternal instantiates a new GraphWindowsMobileMSIRequestBuilder and sets the default values. func NewMobileAppsItemGraphWindowsMobileMSIRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsMobileMSIRequestBuilder) { m := &MobileAppsItemGraphWindowsMobileMSIRequestBuilder{ @@ -40,6 +48,10 @@ func NewMobileAppsItemGraphWindowsMobileMSIRequestBuilder(rawUrl string, request urlParams["request-raw-url"] = rawUrl return NewMobileAppsItemGraphWindowsMobileMSIRequestBuilderInternal(urlParams, requestAdapter) } +// ContentVersions provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. +func (m *MobileAppsItemGraphWindowsMobileMSIRequestBuilder) ContentVersions()(*MobileAppsItemGraphWindowsMobileMSIContentVersionsRequestBuilder) { + return NewMobileAppsItemGraphWindowsMobileMSIContentVersionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // Get get the item of type microsoft.graph.mobileApp as microsoft.graph.windowsMobileMSI func (m *MobileAppsItemGraphWindowsMobileMSIRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.WindowsMobileMSIable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); @@ -59,6 +71,10 @@ func (m *MobileAppsItemGraphWindowsMobileMSIRequestBuilder) Get(ctx context.Cont } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.WindowsMobileMSIable), nil } +// Relationships provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphWindowsMobileMSIRequestBuilder) Relationships()(*MobileAppsItemGraphWindowsMobileMSIRelationshipsRequestBuilder) { + return NewMobileAppsItemGraphWindowsMobileMSIRelationshipsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation get the item of type microsoft.graph.mobileApp as microsoft.graph.windowsMobileMSI func (m *MobileAppsItemGraphWindowsMobileMSIRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsMobileMSIRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_store_app_assignments_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_store_app_assignments_count_request_builder.go new file mode 100644 index 00000000000..7428e82156e --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_store_app_assignments_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsStoreAppAssignmentsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphWindowsStoreAppAssignmentsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsStoreAppAssignmentsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphWindowsStoreAppAssignmentsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphWindowsStoreAppAssignmentsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsStoreAppAssignmentsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsStoreAppAssignmentsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphWindowsStoreAppAssignmentsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsStoreAppAssignmentsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsStoreAppAssignmentsCountRequestBuilder) { + m := &MobileAppsItemGraphWindowsStoreAppAssignmentsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsStoreApp/assignments/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsStoreAppAssignmentsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsStoreAppAssignmentsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsStoreAppAssignmentsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsStoreAppAssignmentsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphWindowsStoreAppAssignmentsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsStoreAppAssignmentsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphWindowsStoreAppAssignmentsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsStoreAppAssignmentsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsStoreAppAssignmentsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsStoreAppAssignmentsCountRequestBuilder) { + return NewMobileAppsItemGraphWindowsStoreAppAssignmentsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_store_app_assignments_mobile_app_assignment_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_store_app_assignments_mobile_app_assignment_item_request_builder.go new file mode 100644 index 00000000000..d1696efb863 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_store_app_assignments_mobile_app_assignment_item_request_builder.go @@ -0,0 +1,159 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphWindowsStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphWindowsStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters the list of group assignments for this mobile app. +type MobileAppsItemGraphWindowsStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphWindowsStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphWindowsStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphWindowsStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + m := &MobileAppsItemGraphWindowsStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsStoreApp/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property assignments for deviceAppManagement +func (m *MobileAppsItemGraphWindowsStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphWindowsStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// Patch update the navigation property assignments in deviceAppManagement +func (m *MobileAppsItemGraphWindowsStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphWindowsStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// ToDeleteRequestInformation delete navigation property assignments for deviceAppManagement +func (m *MobileAppsItemGraphWindowsStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphWindowsStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property assignments in deviceAppManagement +func (m *MobileAppsItemGraphWindowsStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphWindowsStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + return NewMobileAppsItemGraphWindowsStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_store_app_assignments_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_store_app_assignments_request_builder.go new file mode 100644 index 00000000000..267b75d4703 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_store_app_assignments_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsStoreAppAssignmentsRequestBuilder provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphWindowsStoreAppAssignmentsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsStoreAppAssignmentsRequestBuilderGetQueryParameters the list of group assignments for this mobile app. +type MobileAppsItemGraphWindowsStoreAppAssignmentsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphWindowsStoreAppAssignmentsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsStoreAppAssignmentsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsStoreAppAssignmentsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphWindowsStoreAppAssignmentsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsStoreAppAssignmentsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppAssignmentId provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphWindowsStoreAppAssignmentsRequestBuilder) ByMobileAppAssignmentId(mobileAppAssignmentId string)(*MobileAppsItemGraphWindowsStoreAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppAssignmentId != "" { + urlTplParams["mobileAppAssignment%2Did"] = mobileAppAssignmentId + } + return NewMobileAppsItemGraphWindowsStoreAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphWindowsStoreAppAssignmentsRequestBuilderInternal instantiates a new AssignmentsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsStoreAppAssignmentsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsStoreAppAssignmentsRequestBuilder) { + m := &MobileAppsItemGraphWindowsStoreAppAssignmentsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsStoreApp/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsStoreAppAssignmentsRequestBuilder instantiates a new AssignmentsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsStoreAppAssignmentsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsStoreAppAssignmentsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsStoreAppAssignmentsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphWindowsStoreAppAssignmentsRequestBuilder) Count()(*MobileAppsItemGraphWindowsStoreAppAssignmentsCountRequestBuilder) { + return NewMobileAppsItemGraphWindowsStoreAppAssignmentsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphWindowsStoreAppAssignmentsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsStoreAppAssignmentsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentCollectionResponseable), nil +} +// Post create new navigation property to assignments for deviceAppManagement +func (m *MobileAppsItemGraphWindowsStoreAppAssignmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphWindowsStoreAppAssignmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// ToGetRequestInformation the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphWindowsStoreAppAssignmentsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsStoreAppAssignmentsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to assignments for deviceAppManagement +func (m *MobileAppsItemGraphWindowsStoreAppAssignmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphWindowsStoreAppAssignmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsStoreAppAssignmentsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsStoreAppAssignmentsRequestBuilder) { + return NewMobileAppsItemGraphWindowsStoreAppAssignmentsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_store_app_categories_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_store_app_categories_count_request_builder.go new file mode 100644 index 00000000000..13d2dd84915 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_store_app_categories_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsStoreAppCategoriesCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphWindowsStoreAppCategoriesCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsStoreAppCategoriesCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphWindowsStoreAppCategoriesCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphWindowsStoreAppCategoriesCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsStoreAppCategoriesCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsStoreAppCategoriesCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphWindowsStoreAppCategoriesCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsStoreAppCategoriesCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsStoreAppCategoriesCountRequestBuilder) { + m := &MobileAppsItemGraphWindowsStoreAppCategoriesCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsStoreApp/categories/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsStoreAppCategoriesCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsStoreAppCategoriesCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsStoreAppCategoriesCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsStoreAppCategoriesCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphWindowsStoreAppCategoriesCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsStoreAppCategoriesCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphWindowsStoreAppCategoriesCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsStoreAppCategoriesCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsStoreAppCategoriesCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsStoreAppCategoriesCountRequestBuilder) { + return NewMobileAppsItemGraphWindowsStoreAppCategoriesCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_store_app_categories_mobile_app_category_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_store_app_categories_mobile_app_category_item_request_builder.go new file mode 100644 index 00000000000..5be62d71ee6 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_store_app_categories_mobile_app_category_item_request_builder.go @@ -0,0 +1,81 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsStoreAppCategoriesMobileAppCategoryItemRequestBuilder provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphWindowsStoreAppCategoriesMobileAppCategoryItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsStoreAppCategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters the list of categories for this app. +type MobileAppsItemGraphWindowsStoreAppCategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphWindowsStoreAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsStoreAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsStoreAppCategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphWindowsStoreAppCategoriesMobileAppCategoryItemRequestBuilderInternal instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsStoreAppCategoriesMobileAppCategoryItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsStoreAppCategoriesMobileAppCategoryItemRequestBuilder) { + m := &MobileAppsItemGraphWindowsStoreAppCategoriesMobileAppCategoryItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsStoreApp/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsStoreAppCategoriesMobileAppCategoryItemRequestBuilder instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsStoreAppCategoriesMobileAppCategoryItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsStoreAppCategoriesMobileAppCategoryItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsStoreAppCategoriesMobileAppCategoryItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get the list of categories for this app. +func (m *MobileAppsItemGraphWindowsStoreAppCategoriesMobileAppCategoryItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsStoreAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppCategoryFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryable), nil +} +// ToGetRequestInformation the list of categories for this app. +func (m *MobileAppsItemGraphWindowsStoreAppCategoriesMobileAppCategoryItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsStoreAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsStoreAppCategoriesMobileAppCategoryItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsStoreAppCategoriesMobileAppCategoryItemRequestBuilder) { + return NewMobileAppsItemGraphWindowsStoreAppCategoriesMobileAppCategoryItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_store_app_categories_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_store_app_categories_request_builder.go new file mode 100644 index 00000000000..e367c6f932d --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_store_app_categories_request_builder.go @@ -0,0 +1,108 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsStoreAppCategoriesRequestBuilder provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphWindowsStoreAppCategoriesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsStoreAppCategoriesRequestBuilderGetQueryParameters the list of categories for this app. +type MobileAppsItemGraphWindowsStoreAppCategoriesRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphWindowsStoreAppCategoriesRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsStoreAppCategoriesRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsStoreAppCategoriesRequestBuilderGetQueryParameters +} +// ByMobileAppCategoryId provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphWindowsStoreAppCategoriesRequestBuilder) ByMobileAppCategoryId(mobileAppCategoryId string)(*MobileAppsItemGraphWindowsStoreAppCategoriesMobileAppCategoryItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppCategoryId != "" { + urlTplParams["mobileAppCategory%2Did"] = mobileAppCategoryId + } + return NewMobileAppsItemGraphWindowsStoreAppCategoriesMobileAppCategoryItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphWindowsStoreAppCategoriesRequestBuilderInternal instantiates a new CategoriesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsStoreAppCategoriesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsStoreAppCategoriesRequestBuilder) { + m := &MobileAppsItemGraphWindowsStoreAppCategoriesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsStoreApp/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsStoreAppCategoriesRequestBuilder instantiates a new CategoriesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsStoreAppCategoriesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsStoreAppCategoriesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsStoreAppCategoriesRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphWindowsStoreAppCategoriesRequestBuilder) Count()(*MobileAppsItemGraphWindowsStoreAppCategoriesCountRequestBuilder) { + return NewMobileAppsItemGraphWindowsStoreAppCategoriesCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of categories for this app. +func (m *MobileAppsItemGraphWindowsStoreAppCategoriesRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsStoreAppCategoriesRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppCategoryCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryCollectionResponseable), nil +} +// ToGetRequestInformation the list of categories for this app. +func (m *MobileAppsItemGraphWindowsStoreAppCategoriesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsStoreAppCategoriesRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsStoreAppCategoriesRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsStoreAppCategoriesRequestBuilder) { + return NewMobileAppsItemGraphWindowsStoreAppCategoriesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_store_app_relationships_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_store_app_relationships_count_request_builder.go new file mode 100644 index 00000000000..02e7e1f9306 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_store_app_relationships_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsStoreAppRelationshipsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphWindowsStoreAppRelationshipsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsStoreAppRelationshipsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphWindowsStoreAppRelationshipsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphWindowsStoreAppRelationshipsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsStoreAppRelationshipsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsStoreAppRelationshipsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphWindowsStoreAppRelationshipsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsStoreAppRelationshipsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsStoreAppRelationshipsCountRequestBuilder) { + m := &MobileAppsItemGraphWindowsStoreAppRelationshipsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsStoreApp/relationships/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsStoreAppRelationshipsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsStoreAppRelationshipsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsStoreAppRelationshipsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsStoreAppRelationshipsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphWindowsStoreAppRelationshipsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsStoreAppRelationshipsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphWindowsStoreAppRelationshipsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsStoreAppRelationshipsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsStoreAppRelationshipsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsStoreAppRelationshipsCountRequestBuilder) { + return NewMobileAppsItemGraphWindowsStoreAppRelationshipsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_store_app_relationships_mobile_app_relationship_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_store_app_relationships_mobile_app_relationship_item_request_builder.go new file mode 100644 index 00000000000..5d4de0bc233 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_store_app_relationships_mobile_app_relationship_item_request_builder.go @@ -0,0 +1,159 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphWindowsStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphWindowsStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters list of relationships for this mobile app. +type MobileAppsItemGraphWindowsStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphWindowsStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphWindowsStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphWindowsStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal instantiates a new MobileAppRelationshipItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + m := &MobileAppsItemGraphWindowsStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsStoreApp/relationships/{mobileAppRelationship%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder instantiates a new MobileAppRelationshipItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property relationships for deviceAppManagement +func (m *MobileAppsItemGraphWindowsStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get list of relationships for this mobile app. +func (m *MobileAppsItemGraphWindowsStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// Patch update the navigation property relationships in deviceAppManagement +func (m *MobileAppsItemGraphWindowsStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphWindowsStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// ToDeleteRequestInformation delete navigation property relationships for deviceAppManagement +func (m *MobileAppsItemGraphWindowsStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation list of relationships for this mobile app. +func (m *MobileAppsItemGraphWindowsStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property relationships in deviceAppManagement +func (m *MobileAppsItemGraphWindowsStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphWindowsStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + return NewMobileAppsItemGraphWindowsStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_store_app_relationships_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_store_app_relationships_request_builder.go new file mode 100644 index 00000000000..dc10103827f --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_store_app_relationships_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsStoreAppRelationshipsRequestBuilder provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphWindowsStoreAppRelationshipsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsStoreAppRelationshipsRequestBuilderGetQueryParameters list of relationships for this mobile app. +type MobileAppsItemGraphWindowsStoreAppRelationshipsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphWindowsStoreAppRelationshipsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsStoreAppRelationshipsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsStoreAppRelationshipsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphWindowsStoreAppRelationshipsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsStoreAppRelationshipsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppRelationshipId provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphWindowsStoreAppRelationshipsRequestBuilder) ByMobileAppRelationshipId(mobileAppRelationshipId string)(*MobileAppsItemGraphWindowsStoreAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppRelationshipId != "" { + urlTplParams["mobileAppRelationship%2Did"] = mobileAppRelationshipId + } + return NewMobileAppsItemGraphWindowsStoreAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphWindowsStoreAppRelationshipsRequestBuilderInternal instantiates a new RelationshipsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsStoreAppRelationshipsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsStoreAppRelationshipsRequestBuilder) { + m := &MobileAppsItemGraphWindowsStoreAppRelationshipsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsStoreApp/relationships{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsStoreAppRelationshipsRequestBuilder instantiates a new RelationshipsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsStoreAppRelationshipsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsStoreAppRelationshipsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsStoreAppRelationshipsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphWindowsStoreAppRelationshipsRequestBuilder) Count()(*MobileAppsItemGraphWindowsStoreAppRelationshipsCountRequestBuilder) { + return NewMobileAppsItemGraphWindowsStoreAppRelationshipsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get list of relationships for this mobile app. +func (m *MobileAppsItemGraphWindowsStoreAppRelationshipsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsStoreAppRelationshipsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipCollectionResponseable), nil +} +// Post create new navigation property to relationships for deviceAppManagement +func (m *MobileAppsItemGraphWindowsStoreAppRelationshipsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphWindowsStoreAppRelationshipsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// ToGetRequestInformation list of relationships for this mobile app. +func (m *MobileAppsItemGraphWindowsStoreAppRelationshipsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsStoreAppRelationshipsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to relationships for deviceAppManagement +func (m *MobileAppsItemGraphWindowsStoreAppRelationshipsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphWindowsStoreAppRelationshipsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsStoreAppRelationshipsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsStoreAppRelationshipsRequestBuilder) { + return NewMobileAppsItemGraphWindowsStoreAppRelationshipsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_store_app_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_store_app_request_builder.go index 19fe3b712d1..dbe7e9802cd 100644 --- a/deviceappmanagement/mobile_apps_item_graph_windows_store_app_request_builder.go +++ b/deviceappmanagement/mobile_apps_item_graph_windows_store_app_request_builder.go @@ -27,6 +27,14 @@ type MobileAppsItemGraphWindowsStoreAppRequestBuilderGetRequestConfiguration str // Request query parameters QueryParameters *MobileAppsItemGraphWindowsStoreAppRequestBuilderGetQueryParameters } +// Assignments provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphWindowsStoreAppRequestBuilder) Assignments()(*MobileAppsItemGraphWindowsStoreAppAssignmentsRequestBuilder) { + return NewMobileAppsItemGraphWindowsStoreAppAssignmentsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Categories provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphWindowsStoreAppRequestBuilder) Categories()(*MobileAppsItemGraphWindowsStoreAppCategoriesRequestBuilder) { + return NewMobileAppsItemGraphWindowsStoreAppCategoriesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // NewMobileAppsItemGraphWindowsStoreAppRequestBuilderInternal instantiates a new GraphWindowsStoreAppRequestBuilder and sets the default values. func NewMobileAppsItemGraphWindowsStoreAppRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsStoreAppRequestBuilder) { m := &MobileAppsItemGraphWindowsStoreAppRequestBuilder{ @@ -59,6 +67,10 @@ func (m *MobileAppsItemGraphWindowsStoreAppRequestBuilder) Get(ctx context.Conte } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.WindowsStoreAppable), nil } +// Relationships provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphWindowsStoreAppRequestBuilder) Relationships()(*MobileAppsItemGraphWindowsStoreAppRelationshipsRequestBuilder) { + return NewMobileAppsItemGraphWindowsStoreAppRelationshipsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation get the item of type microsoft.graph.mobileApp as microsoft.graph.windowsStoreApp func (m *MobileAppsItemGraphWindowsStoreAppRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsStoreAppRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_assignments_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_assignments_count_request_builder.go new file mode 100644 index 00000000000..cb25a3d0468 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_assignments_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsUniversalAppXAssignmentsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphWindowsUniversalAppXAssignmentsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsUniversalAppXAssignmentsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphWindowsUniversalAppXAssignmentsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphWindowsUniversalAppXAssignmentsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsUniversalAppXAssignmentsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsUniversalAppXAssignmentsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphWindowsUniversalAppXAssignmentsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsUniversalAppXAssignmentsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsUniversalAppXAssignmentsCountRequestBuilder) { + m := &MobileAppsItemGraphWindowsUniversalAppXAssignmentsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/assignments/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsUniversalAppXAssignmentsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsUniversalAppXAssignmentsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsUniversalAppXAssignmentsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsUniversalAppXAssignmentsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphWindowsUniversalAppXAssignmentsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXAssignmentsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphWindowsUniversalAppXAssignmentsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXAssignmentsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsUniversalAppXAssignmentsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsUniversalAppXAssignmentsCountRequestBuilder) { + return NewMobileAppsItemGraphWindowsUniversalAppXAssignmentsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_assignments_mobile_app_assignment_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_assignments_mobile_app_assignment_item_request_builder.go new file mode 100644 index 00000000000..645fd08e52f --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_assignments_mobile_app_assignment_item_request_builder.go @@ -0,0 +1,159 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsUniversalAppXAssignmentsMobileAppAssignmentItemRequestBuilder provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphWindowsUniversalAppXAssignmentsMobileAppAssignmentItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsUniversalAppXAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsUniversalAppXAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphWindowsUniversalAppXAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters the list of group assignments for this mobile app. +type MobileAppsItemGraphWindowsUniversalAppXAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphWindowsUniversalAppXAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsUniversalAppXAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsUniversalAppXAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphWindowsUniversalAppXAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsUniversalAppXAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphWindowsUniversalAppXAssignmentsMobileAppAssignmentItemRequestBuilderInternal instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsUniversalAppXAssignmentsMobileAppAssignmentItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsUniversalAppXAssignmentsMobileAppAssignmentItemRequestBuilder) { + m := &MobileAppsItemGraphWindowsUniversalAppXAssignmentsMobileAppAssignmentItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsUniversalAppXAssignmentsMobileAppAssignmentItemRequestBuilder instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsUniversalAppXAssignmentsMobileAppAssignmentItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsUniversalAppXAssignmentsMobileAppAssignmentItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsUniversalAppXAssignmentsMobileAppAssignmentItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property assignments for deviceAppManagement +func (m *MobileAppsItemGraphWindowsUniversalAppXAssignmentsMobileAppAssignmentItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphWindowsUniversalAppXAssignmentsMobileAppAssignmentItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// Patch update the navigation property assignments in deviceAppManagement +func (m *MobileAppsItemGraphWindowsUniversalAppXAssignmentsMobileAppAssignmentItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// ToDeleteRequestInformation delete navigation property assignments for deviceAppManagement +func (m *MobileAppsItemGraphWindowsUniversalAppXAssignmentsMobileAppAssignmentItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphWindowsUniversalAppXAssignmentsMobileAppAssignmentItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property assignments in deviceAppManagement +func (m *MobileAppsItemGraphWindowsUniversalAppXAssignmentsMobileAppAssignmentItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsUniversalAppXAssignmentsMobileAppAssignmentItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsUniversalAppXAssignmentsMobileAppAssignmentItemRequestBuilder) { + return NewMobileAppsItemGraphWindowsUniversalAppXAssignmentsMobileAppAssignmentItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_assignments_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_assignments_request_builder.go new file mode 100644 index 00000000000..a0337bad073 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_assignments_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsUniversalAppXAssignmentsRequestBuilder provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphWindowsUniversalAppXAssignmentsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsUniversalAppXAssignmentsRequestBuilderGetQueryParameters the list of group assignments for this mobile app. +type MobileAppsItemGraphWindowsUniversalAppXAssignmentsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphWindowsUniversalAppXAssignmentsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsUniversalAppXAssignmentsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsUniversalAppXAssignmentsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphWindowsUniversalAppXAssignmentsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsUniversalAppXAssignmentsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppAssignmentId provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphWindowsUniversalAppXAssignmentsRequestBuilder) ByMobileAppAssignmentId(mobileAppAssignmentId string)(*MobileAppsItemGraphWindowsUniversalAppXAssignmentsMobileAppAssignmentItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppAssignmentId != "" { + urlTplParams["mobileAppAssignment%2Did"] = mobileAppAssignmentId + } + return NewMobileAppsItemGraphWindowsUniversalAppXAssignmentsMobileAppAssignmentItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphWindowsUniversalAppXAssignmentsRequestBuilderInternal instantiates a new AssignmentsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsUniversalAppXAssignmentsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsUniversalAppXAssignmentsRequestBuilder) { + m := &MobileAppsItemGraphWindowsUniversalAppXAssignmentsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsUniversalAppXAssignmentsRequestBuilder instantiates a new AssignmentsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsUniversalAppXAssignmentsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsUniversalAppXAssignmentsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsUniversalAppXAssignmentsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphWindowsUniversalAppXAssignmentsRequestBuilder) Count()(*MobileAppsItemGraphWindowsUniversalAppXAssignmentsCountRequestBuilder) { + return NewMobileAppsItemGraphWindowsUniversalAppXAssignmentsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphWindowsUniversalAppXAssignmentsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXAssignmentsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentCollectionResponseable), nil +} +// Post create new navigation property to assignments for deviceAppManagement +func (m *MobileAppsItemGraphWindowsUniversalAppXAssignmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXAssignmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// ToGetRequestInformation the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphWindowsUniversalAppXAssignmentsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXAssignmentsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to assignments for deviceAppManagement +func (m *MobileAppsItemGraphWindowsUniversalAppXAssignmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXAssignmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsUniversalAppXAssignmentsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsUniversalAppXAssignmentsRequestBuilder) { + return NewMobileAppsItemGraphWindowsUniversalAppXAssignmentsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_categories_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_categories_count_request_builder.go new file mode 100644 index 00000000000..9dc15802920 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_categories_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsUniversalAppXCategoriesCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphWindowsUniversalAppXCategoriesCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsUniversalAppXCategoriesCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphWindowsUniversalAppXCategoriesCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphWindowsUniversalAppXCategoriesCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsUniversalAppXCategoriesCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsUniversalAppXCategoriesCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphWindowsUniversalAppXCategoriesCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsUniversalAppXCategoriesCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsUniversalAppXCategoriesCountRequestBuilder) { + m := &MobileAppsItemGraphWindowsUniversalAppXCategoriesCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/categories/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsUniversalAppXCategoriesCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsUniversalAppXCategoriesCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsUniversalAppXCategoriesCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsUniversalAppXCategoriesCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphWindowsUniversalAppXCategoriesCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXCategoriesCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphWindowsUniversalAppXCategoriesCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXCategoriesCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsUniversalAppXCategoriesCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsUniversalAppXCategoriesCountRequestBuilder) { + return NewMobileAppsItemGraphWindowsUniversalAppXCategoriesCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_categories_mobile_app_category_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_categories_mobile_app_category_item_request_builder.go new file mode 100644 index 00000000000..e4c4b23d33f --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_categories_mobile_app_category_item_request_builder.go @@ -0,0 +1,81 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsUniversalAppXCategoriesMobileAppCategoryItemRequestBuilder provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphWindowsUniversalAppXCategoriesMobileAppCategoryItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsUniversalAppXCategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters the list of categories for this app. +type MobileAppsItemGraphWindowsUniversalAppXCategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphWindowsUniversalAppXCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsUniversalAppXCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsUniversalAppXCategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphWindowsUniversalAppXCategoriesMobileAppCategoryItemRequestBuilderInternal instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsUniversalAppXCategoriesMobileAppCategoryItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsUniversalAppXCategoriesMobileAppCategoryItemRequestBuilder) { + m := &MobileAppsItemGraphWindowsUniversalAppXCategoriesMobileAppCategoryItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsUniversalAppXCategoriesMobileAppCategoryItemRequestBuilder instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsUniversalAppXCategoriesMobileAppCategoryItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsUniversalAppXCategoriesMobileAppCategoryItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsUniversalAppXCategoriesMobileAppCategoryItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get the list of categories for this app. +func (m *MobileAppsItemGraphWindowsUniversalAppXCategoriesMobileAppCategoryItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppCategoryFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryable), nil +} +// ToGetRequestInformation the list of categories for this app. +func (m *MobileAppsItemGraphWindowsUniversalAppXCategoriesMobileAppCategoryItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsUniversalAppXCategoriesMobileAppCategoryItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsUniversalAppXCategoriesMobileAppCategoryItemRequestBuilder) { + return NewMobileAppsItemGraphWindowsUniversalAppXCategoriesMobileAppCategoryItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_categories_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_categories_request_builder.go new file mode 100644 index 00000000000..98f29b016c1 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_categories_request_builder.go @@ -0,0 +1,108 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsUniversalAppXCategoriesRequestBuilder provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphWindowsUniversalAppXCategoriesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsUniversalAppXCategoriesRequestBuilderGetQueryParameters the list of categories for this app. +type MobileAppsItemGraphWindowsUniversalAppXCategoriesRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphWindowsUniversalAppXCategoriesRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsUniversalAppXCategoriesRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsUniversalAppXCategoriesRequestBuilderGetQueryParameters +} +// ByMobileAppCategoryId provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphWindowsUniversalAppXCategoriesRequestBuilder) ByMobileAppCategoryId(mobileAppCategoryId string)(*MobileAppsItemGraphWindowsUniversalAppXCategoriesMobileAppCategoryItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppCategoryId != "" { + urlTplParams["mobileAppCategory%2Did"] = mobileAppCategoryId + } + return NewMobileAppsItemGraphWindowsUniversalAppXCategoriesMobileAppCategoryItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphWindowsUniversalAppXCategoriesRequestBuilderInternal instantiates a new CategoriesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsUniversalAppXCategoriesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsUniversalAppXCategoriesRequestBuilder) { + m := &MobileAppsItemGraphWindowsUniversalAppXCategoriesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsUniversalAppXCategoriesRequestBuilder instantiates a new CategoriesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsUniversalAppXCategoriesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsUniversalAppXCategoriesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsUniversalAppXCategoriesRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphWindowsUniversalAppXCategoriesRequestBuilder) Count()(*MobileAppsItemGraphWindowsUniversalAppXCategoriesCountRequestBuilder) { + return NewMobileAppsItemGraphWindowsUniversalAppXCategoriesCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of categories for this app. +func (m *MobileAppsItemGraphWindowsUniversalAppXCategoriesRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXCategoriesRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppCategoryCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryCollectionResponseable), nil +} +// ToGetRequestInformation the list of categories for this app. +func (m *MobileAppsItemGraphWindowsUniversalAppXCategoriesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXCategoriesRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsUniversalAppXCategoriesRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsUniversalAppXCategoriesRequestBuilder) { + return NewMobileAppsItemGraphWindowsUniversalAppXCategoriesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_committed_contained_apps_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_committed_contained_apps_count_request_builder.go new file mode 100644 index 00000000000..a2fd88069bd --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_committed_contained_apps_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsCountRequestBuilder) { + m := &MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/committedContainedApps/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsCountRequestBuilder) { + return NewMobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_committed_contained_apps_mobile_contained_app_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_committed_contained_apps_mobile_contained_app_item_request_builder.go new file mode 100644 index 00000000000..5ca0f084bc9 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_committed_contained_apps_mobile_contained_app_item_request_builder.go @@ -0,0 +1,159 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsMobileContainedAppItemRequestBuilder provides operations to manage the committedContainedApps property of the microsoft.graph.windowsUniversalAppX entity. +type MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsMobileContainedAppItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsMobileContainedAppItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsMobileContainedAppItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsMobileContainedAppItemRequestBuilderGetQueryParameters the collection of contained apps in the committed mobileAppContent of a windowsUniversalAppX app. +type MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsMobileContainedAppItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsMobileContainedAppItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsMobileContainedAppItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsMobileContainedAppItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsMobileContainedAppItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsMobileContainedAppItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsMobileContainedAppItemRequestBuilderInternal instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsMobileContainedAppItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsMobileContainedAppItemRequestBuilder) { + m := &MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsMobileContainedAppItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/committedContainedApps/{mobileContainedApp%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsMobileContainedAppItemRequestBuilder instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsMobileContainedAppItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsMobileContainedAppItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsMobileContainedAppItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property committedContainedApps for deviceAppManagement +func (m *MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsMobileContainedAppItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsMobileContainedAppItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get the collection of contained apps in the committed mobileAppContent of a windowsUniversalAppX app. +func (m *MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsMobileContainedAppItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsMobileContainedAppItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileContainedAppFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable), nil +} +// Patch update the navigation property committedContainedApps in deviceAppManagement +func (m *MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsMobileContainedAppItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsMobileContainedAppItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileContainedAppFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable), nil +} +// ToDeleteRequestInformation delete navigation property committedContainedApps for deviceAppManagement +func (m *MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsMobileContainedAppItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsMobileContainedAppItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation the collection of contained apps in the committed mobileAppContent of a windowsUniversalAppX app. +func (m *MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsMobileContainedAppItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsMobileContainedAppItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property committedContainedApps in deviceAppManagement +func (m *MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsMobileContainedAppItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsMobileContainedAppItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsMobileContainedAppItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsMobileContainedAppItemRequestBuilder) { + return NewMobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsMobileContainedAppItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_committed_contained_apps_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_committed_contained_apps_request_builder.go new file mode 100644 index 00000000000..fb13096e520 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_committed_contained_apps_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsRequestBuilder provides operations to manage the committedContainedApps property of the microsoft.graph.windowsUniversalAppX entity. +type MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsRequestBuilderGetQueryParameters the collection of contained apps in the committed mobileAppContent of a windowsUniversalAppX app. +type MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileContainedAppId provides operations to manage the committedContainedApps property of the microsoft.graph.windowsUniversalAppX entity. +func (m *MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsRequestBuilder) ByMobileContainedAppId(mobileContainedAppId string)(*MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsMobileContainedAppItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileContainedAppId != "" { + urlTplParams["mobileContainedApp%2Did"] = mobileContainedAppId + } + return NewMobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsMobileContainedAppItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsRequestBuilderInternal instantiates a new CommittedContainedAppsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsRequestBuilder) { + m := &MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/committedContainedApps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsRequestBuilder instantiates a new CommittedContainedAppsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsRequestBuilder) Count()(*MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsCountRequestBuilder) { + return NewMobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the collection of contained apps in the committed mobileAppContent of a windowsUniversalAppX app. +func (m *MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileContainedAppCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppCollectionResponseable), nil +} +// Post create new navigation property to committedContainedApps for deviceAppManagement +func (m *MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileContainedAppFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable), nil +} +// ToGetRequestInformation the collection of contained apps in the committed mobileAppContent of a windowsUniversalAppX app. +func (m *MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to committedContainedApps for deviceAppManagement +func (m *MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsRequestBuilder) { + return NewMobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_content_versions_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_content_versions_count_request_builder.go new file mode 100644 index 00000000000..5d41fbf70f2 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_content_versions_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsUniversalAppXContentVersionsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphWindowsUniversalAppXContentVersionsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsUniversalAppXContentVersionsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphWindowsUniversalAppXContentVersionsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphWindowsUniversalAppXContentVersionsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsUniversalAppXContentVersionsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsUniversalAppXContentVersionsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsUniversalAppXContentVersionsCountRequestBuilder) { + m := &MobileAppsItemGraphWindowsUniversalAppXContentVersionsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/contentVersions/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsUniversalAppXContentVersionsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXContentVersionsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXContentVersionsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsUniversalAppXContentVersionsCountRequestBuilder) { + return NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_content_versions_item_contained_apps_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_content_versions_item_contained_apps_count_request_builder.go new file mode 100644 index 00000000000..f4ef12fc009 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_content_versions_item_contained_apps_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsCountRequestBuilder) { + m := &MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/contentVersions/{mobileAppContent%2Did}/containedApps/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsCountRequestBuilder) { + return NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_content_versions_item_contained_apps_mobile_contained_app_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_content_versions_item_contained_apps_mobile_contained_app_item_request_builder.go new file mode 100644 index 00000000000..fa7da374d8b --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_content_versions_item_contained_apps_mobile_contained_app_item_request_builder.go @@ -0,0 +1,159 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. +type MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetQueryParameters the collection of contained apps in a MobileLobApp acting as a package. +type MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderInternal instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) { + m := &MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/contentVersions/{mobileAppContent%2Did}/containedApps/{mobileContainedApp%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property containedApps for deviceAppManagement +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get the collection of contained apps in a MobileLobApp acting as a package. +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileContainedAppFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable), nil +} +// Patch update the navigation property containedApps in deviceAppManagement +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileContainedAppFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable), nil +} +// ToDeleteRequestInformation delete navigation property containedApps for deviceAppManagement +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation the collection of contained apps in a MobileLobApp acting as a package. +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property containedApps in deviceAppManagement +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) { + return NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_content_versions_item_contained_apps_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_content_versions_item_contained_apps_request_builder.go new file mode 100644 index 00000000000..2fbd97303f1 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_content_versions_item_contained_apps_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsRequestBuilder provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. +type MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsRequestBuilderGetQueryParameters the collection of contained apps in a MobileLobApp acting as a package. +type MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileContainedAppId provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsRequestBuilder) ByMobileContainedAppId(mobileContainedAppId string)(*MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileContainedAppId != "" { + urlTplParams["mobileContainedApp%2Did"] = mobileContainedAppId + } + return NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsMobileContainedAppItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsRequestBuilderInternal instantiates a new ContainedAppsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsRequestBuilder) { + m := &MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/contentVersions/{mobileAppContent%2Did}/containedApps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsRequestBuilder instantiates a new ContainedAppsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsRequestBuilder) Count()(*MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsCountRequestBuilder) { + return NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the collection of contained apps in a MobileLobApp acting as a package. +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileContainedAppCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppCollectionResponseable), nil +} +// Post create new navigation property to containedApps for deviceAppManagement +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileContainedAppFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable), nil +} +// ToGetRequestInformation the collection of contained apps in a MobileLobApp acting as a package. +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to containedApps for deviceAppManagement +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileContainedAppable, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsRequestBuilder) { + return NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_content_versions_item_files_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_content_versions_item_files_count_request_builder.go new file mode 100644 index 00000000000..68cbd20d54c --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_content_versions_item_files_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesCountRequestBuilder) { + m := &MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/contentVersions/{mobileAppContent%2Did}/files/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesCountRequestBuilder) { + return NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_content_versions_item_files_item_commit_post_request_body.go b/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_content_versions_item_files_item_commit_post_request_body.go new file mode 100644 index 00000000000..c295fcfcdc8 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_content_versions_item_files_item_commit_post_request_body.go @@ -0,0 +1,111 @@ +package deviceappmanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +// MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemCommitPostRequestBody +type MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemCommitPostRequestBody struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemCommitPostRequestBody instantiates a new MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemCommitPostRequestBody and sets the default values. +func NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemCommitPostRequestBody()(*MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemCommitPostRequestBody) { + m := &MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemCommitPostRequestBody{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateMobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemCommitPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemCommitPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemCommitPostRequestBody(), nil +} +// GetAdditionalData gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemCommitPostRequestBody) GetAdditionalData()(map[string]any) { + val , err := m.backingStore.Get("additionalData") + if err != nil { + panic(err) + } + if val == nil { + var value = make(map[string]any); + m.SetAdditionalData(value); + } + return val.(map[string]any) +} +// GetBackingStore gets the backingStore property value. Stores model information. +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemCommitPostRequestBody) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemCommitPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["fileEncryptionInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateFileEncryptionInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetFileEncryptionInfo(val.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable)) + } + return nil + } + return res +} +// GetFileEncryptionInfo gets the fileEncryptionInfo property value. The fileEncryptionInfo property +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemCommitPostRequestBody) GetFileEncryptionInfo()(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable) { + val, err := m.GetBackingStore().Get("fileEncryptionInfo") + if err != nil { + panic(err) + } + if val != nil { + return val.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable) + } + return nil +} +// Serialize serializes information the current object +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemCommitPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("fileEncryptionInfo", m.GetFileEncryptionInfo()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemCommitPostRequestBody) SetAdditionalData(value map[string]any)() { + err := m.GetBackingStore().Set("additionalData", value) + if err != nil { + panic(err) + } +} +// SetBackingStore sets the backingStore property value. Stores model information. +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemCommitPostRequestBody) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetFileEncryptionInfo sets the fileEncryptionInfo property value. The fileEncryptionInfo property +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemCommitPostRequestBody) SetFileEncryptionInfo(value ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable)() { + err := m.GetBackingStore().Set("fileEncryptionInfo", value) + if err != nil { + panic(err) + } +} +// MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemCommitPostRequestBodyable +type MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemCommitPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetFileEncryptionInfo()(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetFileEncryptionInfo(value ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileEncryptionInfoable)() +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_content_versions_item_files_item_commit_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_content_versions_item_files_item_commit_request_builder.go new file mode 100644 index 00000000000..04ebd6520ee --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_content_versions_item_files_item_commit_request_builder.go @@ -0,0 +1,68 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemCommitRequestBuilder provides operations to call the commit method. +type MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemCommitRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemCommitRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemCommitRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemCommitRequestBuilderInternal instantiates a new CommitRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemCommitRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemCommitRequestBuilder) { + m := &MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemCommitRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/commit", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemCommitRequestBuilder instantiates a new CommitRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemCommitRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemCommitRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemCommitRequestBuilderInternal(urlParams, requestAdapter) +} +// Post commits a file of a given app. +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemCommitRequestBuilder) Post(ctx context.Context, body MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemCommitPostRequestBodyable, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemCommitRequestBuilderPostRequestConfiguration)(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation commits a file of a given app. +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemCommitRequestBuilder) ToPostRequestInformation(ctx context.Context, body MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemCommitPostRequestBodyable, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemCommitRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemCommitRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemCommitRequestBuilder) { + return NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemCommitRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_content_versions_item_files_item_renew_upload_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_content_versions_item_files_item_renew_upload_request_builder.go new file mode 100644 index 00000000000..3e20b8ea6fa --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_content_versions_item_files_item_renew_upload_request_builder.go @@ -0,0 +1,64 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemRenewUploadRequestBuilder provides operations to call the renewUpload method. +type MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemRenewUploadRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemRenewUploadRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemRenewUploadRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemRenewUploadRequestBuilderInternal instantiates a new RenewUploadRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemRenewUploadRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemRenewUploadRequestBuilder) { + m := &MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemRenewUploadRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/renewUpload", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemRenewUploadRequestBuilder instantiates a new RenewUploadRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemRenewUploadRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemRenewUploadRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemRenewUploadRequestBuilderInternal(urlParams, requestAdapter) +} +// Post renews the SAS URI for an application file upload. +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemRenewUploadRequestBuilder) Post(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemRenewUploadRequestBuilderPostRequestConfiguration)(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation renews the SAS URI for an application file upload. +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemRenewUploadRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemRenewUploadRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemRenewUploadRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemRenewUploadRequestBuilder) { + return NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemRenewUploadRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_content_versions_item_files_mobile_app_content_file_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_content_versions_item_files_mobile_app_content_file_item_request_builder.go new file mode 100644 index 00000000000..a5596600312 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_content_versions_item_files_mobile_app_content_file_item_request_builder.go @@ -0,0 +1,167 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilder provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. +type MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetQueryParameters the list of files for this app content version. +type MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// Commit provides operations to call the commit method. +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) Commit()(*MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemCommitRequestBuilder) { + return NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemCommitRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilderInternal instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) { + m := &MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilder instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property files for deviceAppManagement +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get the list of files for this app content version. +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFileFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable), nil +} +// Patch update the navigation property files in deviceAppManagement +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFileFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable), nil +} +// RenewUpload provides operations to call the renewUpload method. +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) RenewUpload()(*MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemRenewUploadRequestBuilder) { + return NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesItemRenewUploadRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToDeleteRequestInformation delete navigation property files for deviceAppManagement +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation the list of files for this app content version. +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property files in deviceAppManagement +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) { + return NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_content_versions_item_files_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_content_versions_item_files_request_builder.go new file mode 100644 index 00000000000..e665bc59dae --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_content_versions_item_files_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesRequestBuilder provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. +type MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesRequestBuilderGetQueryParameters the list of files for this app content version. +type MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppContentFileId provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesRequestBuilder) ByMobileAppContentFileId(mobileAppContentFileId string)(*MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppContentFileId != "" { + urlTplParams["mobileAppContentFile%2Did"] = mobileAppContentFileId + } + return NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesMobileAppContentFileItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesRequestBuilderInternal instantiates a new FilesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesRequestBuilder) { + m := &MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/contentVersions/{mobileAppContent%2Did}/files{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesRequestBuilder instantiates a new FilesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesRequestBuilder) Count()(*MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesCountRequestBuilder) { + return NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of files for this app content version. +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFileCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileCollectionResponseable), nil +} +// Post create new navigation property to files for deviceAppManagement +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFileFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable), nil +} +// ToGetRequestInformation the list of files for this app content version. +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to files for deviceAppManagement +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentFileable, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesRequestBuilder) { + return NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_content_versions_mobile_app_content_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_content_versions_mobile_app_content_item_request_builder.go new file mode 100644 index 00000000000..89b891398c2 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_content_versions_mobile_app_content_item_request_builder.go @@ -0,0 +1,167 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsUniversalAppXContentVersionsMobileAppContentItemRequestBuilder provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. +type MobileAppsItemGraphWindowsUniversalAppXContentVersionsMobileAppContentItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsUniversalAppXContentVersionsMobileAppContentItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsUniversalAppXContentVersionsMobileAppContentItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphWindowsUniversalAppXContentVersionsMobileAppContentItemRequestBuilderGetQueryParameters the list of content versions for this app. +type MobileAppsItemGraphWindowsUniversalAppXContentVersionsMobileAppContentItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphWindowsUniversalAppXContentVersionsMobileAppContentItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsUniversalAppXContentVersionsMobileAppContentItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsUniversalAppXContentVersionsMobileAppContentItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphWindowsUniversalAppXContentVersionsMobileAppContentItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsUniversalAppXContentVersionsMobileAppContentItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsMobileAppContentItemRequestBuilderInternal instantiates a new MobileAppContentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsMobileAppContentItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsUniversalAppXContentVersionsMobileAppContentItemRequestBuilder) { + m := &MobileAppsItemGraphWindowsUniversalAppXContentVersionsMobileAppContentItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/contentVersions/{mobileAppContent%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsMobileAppContentItemRequestBuilder instantiates a new MobileAppContentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsMobileAppContentItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsUniversalAppXContentVersionsMobileAppContentItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsMobileAppContentItemRequestBuilderInternal(urlParams, requestAdapter) +} +// ContainedApps provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsMobileAppContentItemRequestBuilder) ContainedApps()(*MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsRequestBuilder) { + return NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsItemContainedAppsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Delete delete navigation property contentVersions for deviceAppManagement +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsMobileAppContentItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXContentVersionsMobileAppContentItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Files provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsMobileAppContentItemRequestBuilder) Files()(*MobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesRequestBuilder) { + return NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsItemFilesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of content versions for this app. +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsMobileAppContentItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXContentVersionsMobileAppContentItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable), nil +} +// Patch update the navigation property contentVersions in deviceAppManagement +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsMobileAppContentItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXContentVersionsMobileAppContentItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable), nil +} +// ToDeleteRequestInformation delete navigation property contentVersions for deviceAppManagement +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsMobileAppContentItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXContentVersionsMobileAppContentItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation the list of content versions for this app. +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsMobileAppContentItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXContentVersionsMobileAppContentItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property contentVersions in deviceAppManagement +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsMobileAppContentItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXContentVersionsMobileAppContentItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsMobileAppContentItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsUniversalAppXContentVersionsMobileAppContentItemRequestBuilder) { + return NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsMobileAppContentItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_content_versions_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_content_versions_request_builder.go new file mode 100644 index 00000000000..76713af3d28 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_content_versions_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsUniversalAppXContentVersionsRequestBuilder provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. +type MobileAppsItemGraphWindowsUniversalAppXContentVersionsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsUniversalAppXContentVersionsRequestBuilderGetQueryParameters the list of content versions for this app. +type MobileAppsItemGraphWindowsUniversalAppXContentVersionsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphWindowsUniversalAppXContentVersionsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsUniversalAppXContentVersionsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsUniversalAppXContentVersionsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphWindowsUniversalAppXContentVersionsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsUniversalAppXContentVersionsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppContentId provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsRequestBuilder) ByMobileAppContentId(mobileAppContentId string)(*MobileAppsItemGraphWindowsUniversalAppXContentVersionsMobileAppContentItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppContentId != "" { + urlTplParams["mobileAppContent%2Did"] = mobileAppContentId + } + return NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsMobileAppContentItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsRequestBuilderInternal instantiates a new ContentVersionsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsUniversalAppXContentVersionsRequestBuilder) { + m := &MobileAppsItemGraphWindowsUniversalAppXContentVersionsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/contentVersions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsRequestBuilder instantiates a new ContentVersionsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsUniversalAppXContentVersionsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsRequestBuilder) Count()(*MobileAppsItemGraphWindowsUniversalAppXContentVersionsCountRequestBuilder) { + return NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of content versions for this app. +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXContentVersionsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentCollectionResponseable), nil +} +// Post create new navigation property to contentVersions for deviceAppManagement +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXContentVersionsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppContentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable), nil +} +// ToGetRequestInformation the list of content versions for this app. +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXContentVersionsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to contentVersions for deviceAppManagement +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppContentable, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXContentVersionsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsUniversalAppXContentVersionsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsUniversalAppXContentVersionsRequestBuilder) { + return NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_relationships_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_relationships_count_request_builder.go new file mode 100644 index 00000000000..67bbe53b585 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_relationships_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsUniversalAppXRelationshipsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphWindowsUniversalAppXRelationshipsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsUniversalAppXRelationshipsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphWindowsUniversalAppXRelationshipsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphWindowsUniversalAppXRelationshipsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsUniversalAppXRelationshipsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsUniversalAppXRelationshipsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphWindowsUniversalAppXRelationshipsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsUniversalAppXRelationshipsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsUniversalAppXRelationshipsCountRequestBuilder) { + m := &MobileAppsItemGraphWindowsUniversalAppXRelationshipsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/relationships/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsUniversalAppXRelationshipsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsUniversalAppXRelationshipsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsUniversalAppXRelationshipsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsUniversalAppXRelationshipsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphWindowsUniversalAppXRelationshipsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXRelationshipsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphWindowsUniversalAppXRelationshipsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXRelationshipsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsUniversalAppXRelationshipsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsUniversalAppXRelationshipsCountRequestBuilder) { + return NewMobileAppsItemGraphWindowsUniversalAppXRelationshipsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_relationships_mobile_app_relationship_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_relationships_mobile_app_relationship_item_request_builder.go new file mode 100644 index 00000000000..cd8d83b627c --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_relationships_mobile_app_relationship_item_request_builder.go @@ -0,0 +1,159 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsUniversalAppXRelationshipsMobileAppRelationshipItemRequestBuilder provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphWindowsUniversalAppXRelationshipsMobileAppRelationshipItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsUniversalAppXRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsUniversalAppXRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphWindowsUniversalAppXRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters list of relationships for this mobile app. +type MobileAppsItemGraphWindowsUniversalAppXRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphWindowsUniversalAppXRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsUniversalAppXRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsUniversalAppXRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphWindowsUniversalAppXRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsUniversalAppXRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphWindowsUniversalAppXRelationshipsMobileAppRelationshipItemRequestBuilderInternal instantiates a new MobileAppRelationshipItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsUniversalAppXRelationshipsMobileAppRelationshipItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsUniversalAppXRelationshipsMobileAppRelationshipItemRequestBuilder) { + m := &MobileAppsItemGraphWindowsUniversalAppXRelationshipsMobileAppRelationshipItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/relationships/{mobileAppRelationship%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsUniversalAppXRelationshipsMobileAppRelationshipItemRequestBuilder instantiates a new MobileAppRelationshipItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsUniversalAppXRelationshipsMobileAppRelationshipItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsUniversalAppXRelationshipsMobileAppRelationshipItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsUniversalAppXRelationshipsMobileAppRelationshipItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property relationships for deviceAppManagement +func (m *MobileAppsItemGraphWindowsUniversalAppXRelationshipsMobileAppRelationshipItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get list of relationships for this mobile app. +func (m *MobileAppsItemGraphWindowsUniversalAppXRelationshipsMobileAppRelationshipItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// Patch update the navigation property relationships in deviceAppManagement +func (m *MobileAppsItemGraphWindowsUniversalAppXRelationshipsMobileAppRelationshipItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// ToDeleteRequestInformation delete navigation property relationships for deviceAppManagement +func (m *MobileAppsItemGraphWindowsUniversalAppXRelationshipsMobileAppRelationshipItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation list of relationships for this mobile app. +func (m *MobileAppsItemGraphWindowsUniversalAppXRelationshipsMobileAppRelationshipItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property relationships in deviceAppManagement +func (m *MobileAppsItemGraphWindowsUniversalAppXRelationshipsMobileAppRelationshipItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsUniversalAppXRelationshipsMobileAppRelationshipItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsUniversalAppXRelationshipsMobileAppRelationshipItemRequestBuilder) { + return NewMobileAppsItemGraphWindowsUniversalAppXRelationshipsMobileAppRelationshipItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_relationships_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_relationships_request_builder.go new file mode 100644 index 00000000000..615afc9d814 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_relationships_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsUniversalAppXRelationshipsRequestBuilder provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphWindowsUniversalAppXRelationshipsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsUniversalAppXRelationshipsRequestBuilderGetQueryParameters list of relationships for this mobile app. +type MobileAppsItemGraphWindowsUniversalAppXRelationshipsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphWindowsUniversalAppXRelationshipsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsUniversalAppXRelationshipsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsUniversalAppXRelationshipsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphWindowsUniversalAppXRelationshipsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsUniversalAppXRelationshipsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppRelationshipId provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphWindowsUniversalAppXRelationshipsRequestBuilder) ByMobileAppRelationshipId(mobileAppRelationshipId string)(*MobileAppsItemGraphWindowsUniversalAppXRelationshipsMobileAppRelationshipItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppRelationshipId != "" { + urlTplParams["mobileAppRelationship%2Did"] = mobileAppRelationshipId + } + return NewMobileAppsItemGraphWindowsUniversalAppXRelationshipsMobileAppRelationshipItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphWindowsUniversalAppXRelationshipsRequestBuilderInternal instantiates a new RelationshipsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsUniversalAppXRelationshipsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsUniversalAppXRelationshipsRequestBuilder) { + m := &MobileAppsItemGraphWindowsUniversalAppXRelationshipsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/relationships{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsUniversalAppXRelationshipsRequestBuilder instantiates a new RelationshipsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsUniversalAppXRelationshipsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsUniversalAppXRelationshipsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsUniversalAppXRelationshipsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphWindowsUniversalAppXRelationshipsRequestBuilder) Count()(*MobileAppsItemGraphWindowsUniversalAppXRelationshipsCountRequestBuilder) { + return NewMobileAppsItemGraphWindowsUniversalAppXRelationshipsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get list of relationships for this mobile app. +func (m *MobileAppsItemGraphWindowsUniversalAppXRelationshipsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXRelationshipsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipCollectionResponseable), nil +} +// Post create new navigation property to relationships for deviceAppManagement +func (m *MobileAppsItemGraphWindowsUniversalAppXRelationshipsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXRelationshipsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// ToGetRequestInformation list of relationships for this mobile app. +func (m *MobileAppsItemGraphWindowsUniversalAppXRelationshipsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXRelationshipsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to relationships for deviceAppManagement +func (m *MobileAppsItemGraphWindowsUniversalAppXRelationshipsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXRelationshipsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsUniversalAppXRelationshipsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsUniversalAppXRelationshipsRequestBuilder) { + return NewMobileAppsItemGraphWindowsUniversalAppXRelationshipsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_request_builder.go index 0aec438cedb..4f90769e715 100644 --- a/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_request_builder.go +++ b/deviceappmanagement/mobile_apps_item_graph_windows_universal_app_x_request_builder.go @@ -27,6 +27,18 @@ type MobileAppsItemGraphWindowsUniversalAppXRequestBuilderGetRequestConfiguratio // Request query parameters QueryParameters *MobileAppsItemGraphWindowsUniversalAppXRequestBuilderGetQueryParameters } +// Assignments provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphWindowsUniversalAppXRequestBuilder) Assignments()(*MobileAppsItemGraphWindowsUniversalAppXAssignmentsRequestBuilder) { + return NewMobileAppsItemGraphWindowsUniversalAppXAssignmentsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Categories provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphWindowsUniversalAppXRequestBuilder) Categories()(*MobileAppsItemGraphWindowsUniversalAppXCategoriesRequestBuilder) { + return NewMobileAppsItemGraphWindowsUniversalAppXCategoriesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// CommittedContainedApps provides operations to manage the committedContainedApps property of the microsoft.graph.windowsUniversalAppX entity. +func (m *MobileAppsItemGraphWindowsUniversalAppXRequestBuilder) CommittedContainedApps()(*MobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsRequestBuilder) { + return NewMobileAppsItemGraphWindowsUniversalAppXCommittedContainedAppsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // NewMobileAppsItemGraphWindowsUniversalAppXRequestBuilderInternal instantiates a new GraphWindowsUniversalAppXRequestBuilder and sets the default values. func NewMobileAppsItemGraphWindowsUniversalAppXRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsUniversalAppXRequestBuilder) { m := &MobileAppsItemGraphWindowsUniversalAppXRequestBuilder{ @@ -40,6 +52,10 @@ func NewMobileAppsItemGraphWindowsUniversalAppXRequestBuilder(rawUrl string, req urlParams["request-raw-url"] = rawUrl return NewMobileAppsItemGraphWindowsUniversalAppXRequestBuilderInternal(urlParams, requestAdapter) } +// ContentVersions provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. +func (m *MobileAppsItemGraphWindowsUniversalAppXRequestBuilder) ContentVersions()(*MobileAppsItemGraphWindowsUniversalAppXContentVersionsRequestBuilder) { + return NewMobileAppsItemGraphWindowsUniversalAppXContentVersionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // Get get the item of type microsoft.graph.mobileApp as microsoft.graph.windowsUniversalAppX func (m *MobileAppsItemGraphWindowsUniversalAppXRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.WindowsUniversalAppXable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); @@ -59,6 +75,10 @@ func (m *MobileAppsItemGraphWindowsUniversalAppXRequestBuilder) Get(ctx context. } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.WindowsUniversalAppXable), nil } +// Relationships provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphWindowsUniversalAppXRequestBuilder) Relationships()(*MobileAppsItemGraphWindowsUniversalAppXRelationshipsRequestBuilder) { + return NewMobileAppsItemGraphWindowsUniversalAppXRelationshipsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation get the item of type microsoft.graph.mobileApp as microsoft.graph.windowsUniversalAppX func (m *MobileAppsItemGraphWindowsUniversalAppXRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsUniversalAppXRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_web_app_assignments_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_web_app_assignments_count_request_builder.go new file mode 100644 index 00000000000..3efd75aa9a0 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_web_app_assignments_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsWebAppAssignmentsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphWindowsWebAppAssignmentsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsWebAppAssignmentsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphWindowsWebAppAssignmentsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphWindowsWebAppAssignmentsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsWebAppAssignmentsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsWebAppAssignmentsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphWindowsWebAppAssignmentsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsWebAppAssignmentsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsWebAppAssignmentsCountRequestBuilder) { + m := &MobileAppsItemGraphWindowsWebAppAssignmentsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsWebApp/assignments/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsWebAppAssignmentsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsWebAppAssignmentsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsWebAppAssignmentsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsWebAppAssignmentsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphWindowsWebAppAssignmentsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsWebAppAssignmentsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphWindowsWebAppAssignmentsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsWebAppAssignmentsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsWebAppAssignmentsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsWebAppAssignmentsCountRequestBuilder) { + return NewMobileAppsItemGraphWindowsWebAppAssignmentsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_web_app_assignments_mobile_app_assignment_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_web_app_assignments_mobile_app_assignment_item_request_builder.go new file mode 100644 index 00000000000..e6b42721d47 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_web_app_assignments_mobile_app_assignment_item_request_builder.go @@ -0,0 +1,159 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsWebAppAssignmentsMobileAppAssignmentItemRequestBuilder provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphWindowsWebAppAssignmentsMobileAppAssignmentItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsWebAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsWebAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphWindowsWebAppAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters the list of group assignments for this mobile app. +type MobileAppsItemGraphWindowsWebAppAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphWindowsWebAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsWebAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsWebAppAssignmentsMobileAppAssignmentItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphWindowsWebAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsWebAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphWindowsWebAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsWebAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsWebAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + m := &MobileAppsItemGraphWindowsWebAppAssignmentsMobileAppAssignmentItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsWebApp/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsWebAppAssignmentsMobileAppAssignmentItemRequestBuilder instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsWebAppAssignmentsMobileAppAssignmentItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsWebAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsWebAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property assignments for deviceAppManagement +func (m *MobileAppsItemGraphWindowsWebAppAssignmentsMobileAppAssignmentItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsWebAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphWindowsWebAppAssignmentsMobileAppAssignmentItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsWebAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// Patch update the navigation property assignments in deviceAppManagement +func (m *MobileAppsItemGraphWindowsWebAppAssignmentsMobileAppAssignmentItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphWindowsWebAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// ToDeleteRequestInformation delete navigation property assignments for deviceAppManagement +func (m *MobileAppsItemGraphWindowsWebAppAssignmentsMobileAppAssignmentItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsWebAppAssignmentsMobileAppAssignmentItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphWindowsWebAppAssignmentsMobileAppAssignmentItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsWebAppAssignmentsMobileAppAssignmentItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property assignments in deviceAppManagement +func (m *MobileAppsItemGraphWindowsWebAppAssignmentsMobileAppAssignmentItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphWindowsWebAppAssignmentsMobileAppAssignmentItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsWebAppAssignmentsMobileAppAssignmentItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsWebAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + return NewMobileAppsItemGraphWindowsWebAppAssignmentsMobileAppAssignmentItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_web_app_assignments_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_web_app_assignments_request_builder.go new file mode 100644 index 00000000000..431a48e3bb2 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_web_app_assignments_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsWebAppAssignmentsRequestBuilder provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphWindowsWebAppAssignmentsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsWebAppAssignmentsRequestBuilderGetQueryParameters the list of group assignments for this mobile app. +type MobileAppsItemGraphWindowsWebAppAssignmentsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphWindowsWebAppAssignmentsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsWebAppAssignmentsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsWebAppAssignmentsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphWindowsWebAppAssignmentsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsWebAppAssignmentsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppAssignmentId provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphWindowsWebAppAssignmentsRequestBuilder) ByMobileAppAssignmentId(mobileAppAssignmentId string)(*MobileAppsItemGraphWindowsWebAppAssignmentsMobileAppAssignmentItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppAssignmentId != "" { + urlTplParams["mobileAppAssignment%2Did"] = mobileAppAssignmentId + } + return NewMobileAppsItemGraphWindowsWebAppAssignmentsMobileAppAssignmentItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphWindowsWebAppAssignmentsRequestBuilderInternal instantiates a new AssignmentsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsWebAppAssignmentsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsWebAppAssignmentsRequestBuilder) { + m := &MobileAppsItemGraphWindowsWebAppAssignmentsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsWebApp/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsWebAppAssignmentsRequestBuilder instantiates a new AssignmentsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsWebAppAssignmentsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsWebAppAssignmentsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsWebAppAssignmentsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphWindowsWebAppAssignmentsRequestBuilder) Count()(*MobileAppsItemGraphWindowsWebAppAssignmentsCountRequestBuilder) { + return NewMobileAppsItemGraphWindowsWebAppAssignmentsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphWindowsWebAppAssignmentsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsWebAppAssignmentsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentCollectionResponseable), nil +} +// Post create new navigation property to assignments for deviceAppManagement +func (m *MobileAppsItemGraphWindowsWebAppAssignmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphWindowsWebAppAssignmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppAssignmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable), nil +} +// ToGetRequestInformation the list of group assignments for this mobile app. +func (m *MobileAppsItemGraphWindowsWebAppAssignmentsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsWebAppAssignmentsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to assignments for deviceAppManagement +func (m *MobileAppsItemGraphWindowsWebAppAssignmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppAssignmentable, requestConfiguration *MobileAppsItemGraphWindowsWebAppAssignmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsWebAppAssignmentsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsWebAppAssignmentsRequestBuilder) { + return NewMobileAppsItemGraphWindowsWebAppAssignmentsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_web_app_categories_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_web_app_categories_count_request_builder.go new file mode 100644 index 00000000000..e0bba65041e --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_web_app_categories_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsWebAppCategoriesCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphWindowsWebAppCategoriesCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsWebAppCategoriesCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphWindowsWebAppCategoriesCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphWindowsWebAppCategoriesCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsWebAppCategoriesCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsWebAppCategoriesCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphWindowsWebAppCategoriesCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsWebAppCategoriesCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsWebAppCategoriesCountRequestBuilder) { + m := &MobileAppsItemGraphWindowsWebAppCategoriesCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsWebApp/categories/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsWebAppCategoriesCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsWebAppCategoriesCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsWebAppCategoriesCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsWebAppCategoriesCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphWindowsWebAppCategoriesCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsWebAppCategoriesCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphWindowsWebAppCategoriesCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsWebAppCategoriesCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsWebAppCategoriesCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsWebAppCategoriesCountRequestBuilder) { + return NewMobileAppsItemGraphWindowsWebAppCategoriesCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_web_app_categories_mobile_app_category_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_web_app_categories_mobile_app_category_item_request_builder.go new file mode 100644 index 00000000000..3ab32cec207 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_web_app_categories_mobile_app_category_item_request_builder.go @@ -0,0 +1,81 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsWebAppCategoriesMobileAppCategoryItemRequestBuilder provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphWindowsWebAppCategoriesMobileAppCategoryItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsWebAppCategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters the list of categories for this app. +type MobileAppsItemGraphWindowsWebAppCategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphWindowsWebAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsWebAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsWebAppCategoriesMobileAppCategoryItemRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphWindowsWebAppCategoriesMobileAppCategoryItemRequestBuilderInternal instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsWebAppCategoriesMobileAppCategoryItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsWebAppCategoriesMobileAppCategoryItemRequestBuilder) { + m := &MobileAppsItemGraphWindowsWebAppCategoriesMobileAppCategoryItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsWebApp/categories/{mobileAppCategory%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsWebAppCategoriesMobileAppCategoryItemRequestBuilder instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsWebAppCategoriesMobileAppCategoryItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsWebAppCategoriesMobileAppCategoryItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsWebAppCategoriesMobileAppCategoryItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get the list of categories for this app. +func (m *MobileAppsItemGraphWindowsWebAppCategoriesMobileAppCategoryItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsWebAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppCategoryFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryable), nil +} +// ToGetRequestInformation the list of categories for this app. +func (m *MobileAppsItemGraphWindowsWebAppCategoriesMobileAppCategoryItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsWebAppCategoriesMobileAppCategoryItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsWebAppCategoriesMobileAppCategoryItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsWebAppCategoriesMobileAppCategoryItemRequestBuilder) { + return NewMobileAppsItemGraphWindowsWebAppCategoriesMobileAppCategoryItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_web_app_categories_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_web_app_categories_request_builder.go new file mode 100644 index 00000000000..b1c4f5cd6ec --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_web_app_categories_request_builder.go @@ -0,0 +1,108 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsWebAppCategoriesRequestBuilder provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphWindowsWebAppCategoriesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsWebAppCategoriesRequestBuilderGetQueryParameters the list of categories for this app. +type MobileAppsItemGraphWindowsWebAppCategoriesRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphWindowsWebAppCategoriesRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsWebAppCategoriesRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsWebAppCategoriesRequestBuilderGetQueryParameters +} +// ByMobileAppCategoryId provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphWindowsWebAppCategoriesRequestBuilder) ByMobileAppCategoryId(mobileAppCategoryId string)(*MobileAppsItemGraphWindowsWebAppCategoriesMobileAppCategoryItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppCategoryId != "" { + urlTplParams["mobileAppCategory%2Did"] = mobileAppCategoryId + } + return NewMobileAppsItemGraphWindowsWebAppCategoriesMobileAppCategoryItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphWindowsWebAppCategoriesRequestBuilderInternal instantiates a new CategoriesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsWebAppCategoriesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsWebAppCategoriesRequestBuilder) { + m := &MobileAppsItemGraphWindowsWebAppCategoriesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsWebApp/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsWebAppCategoriesRequestBuilder instantiates a new CategoriesRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsWebAppCategoriesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsWebAppCategoriesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsWebAppCategoriesRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphWindowsWebAppCategoriesRequestBuilder) Count()(*MobileAppsItemGraphWindowsWebAppCategoriesCountRequestBuilder) { + return NewMobileAppsItemGraphWindowsWebAppCategoriesCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the list of categories for this app. +func (m *MobileAppsItemGraphWindowsWebAppCategoriesRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsWebAppCategoriesRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppCategoryCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppCategoryCollectionResponseable), nil +} +// ToGetRequestInformation the list of categories for this app. +func (m *MobileAppsItemGraphWindowsWebAppCategoriesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsWebAppCategoriesRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsWebAppCategoriesRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsWebAppCategoriesRequestBuilder) { + return NewMobileAppsItemGraphWindowsWebAppCategoriesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_web_app_relationships_count_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_web_app_relationships_count_request_builder.go new file mode 100644 index 00000000000..1b4bb0e572f --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_web_app_relationships_count_request_builder.go @@ -0,0 +1,80 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsWebAppRelationshipsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppsItemGraphWindowsWebAppRelationshipsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsWebAppRelationshipsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppsItemGraphWindowsWebAppRelationshipsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppsItemGraphWindowsWebAppRelationshipsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsWebAppRelationshipsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsWebAppRelationshipsCountRequestBuilderGetQueryParameters +} +// NewMobileAppsItemGraphWindowsWebAppRelationshipsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsWebAppRelationshipsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsWebAppRelationshipsCountRequestBuilder) { + m := &MobileAppsItemGraphWindowsWebAppRelationshipsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsWebApp/relationships/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsWebAppRelationshipsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsWebAppRelationshipsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsWebAppRelationshipsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsWebAppRelationshipsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppsItemGraphWindowsWebAppRelationshipsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsWebAppRelationshipsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppsItemGraphWindowsWebAppRelationshipsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsWebAppRelationshipsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsWebAppRelationshipsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsWebAppRelationshipsCountRequestBuilder) { + return NewMobileAppsItemGraphWindowsWebAppRelationshipsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_web_app_relationships_mobile_app_relationship_item_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_web_app_relationships_mobile_app_relationship_item_request_builder.go new file mode 100644 index 00000000000..baa74f712ef --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_web_app_relationships_mobile_app_relationship_item_request_builder.go @@ -0,0 +1,159 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsWebAppRelationshipsMobileAppRelationshipItemRequestBuilder provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphWindowsWebAppRelationshipsMobileAppRelationshipItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsWebAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsWebAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MobileAppsItemGraphWindowsWebAppRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters list of relationships for this mobile app. +type MobileAppsItemGraphWindowsWebAppRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MobileAppsItemGraphWindowsWebAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsWebAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsWebAppRelationshipsMobileAppRelationshipItemRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphWindowsWebAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsWebAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMobileAppsItemGraphWindowsWebAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal instantiates a new MobileAppRelationshipItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsWebAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsWebAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + m := &MobileAppsItemGraphWindowsWebAppRelationshipsMobileAppRelationshipItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsWebApp/relationships/{mobileAppRelationship%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsWebAppRelationshipsMobileAppRelationshipItemRequestBuilder instantiates a new MobileAppRelationshipItemRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsWebAppRelationshipsMobileAppRelationshipItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsWebAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsWebAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property relationships for deviceAppManagement +func (m *MobileAppsItemGraphWindowsWebAppRelationshipsMobileAppRelationshipItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsWebAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get list of relationships for this mobile app. +func (m *MobileAppsItemGraphWindowsWebAppRelationshipsMobileAppRelationshipItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsWebAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// Patch update the navigation property relationships in deviceAppManagement +func (m *MobileAppsItemGraphWindowsWebAppRelationshipsMobileAppRelationshipItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphWindowsWebAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// ToDeleteRequestInformation delete navigation property relationships for deviceAppManagement +func (m *MobileAppsItemGraphWindowsWebAppRelationshipsMobileAppRelationshipItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsWebAppRelationshipsMobileAppRelationshipItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation list of relationships for this mobile app. +func (m *MobileAppsItemGraphWindowsWebAppRelationshipsMobileAppRelationshipItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsWebAppRelationshipsMobileAppRelationshipItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property relationships in deviceAppManagement +func (m *MobileAppsItemGraphWindowsWebAppRelationshipsMobileAppRelationshipItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphWindowsWebAppRelationshipsMobileAppRelationshipItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsWebAppRelationshipsMobileAppRelationshipItemRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsWebAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + return NewMobileAppsItemGraphWindowsWebAppRelationshipsMobileAppRelationshipItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_web_app_relationships_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_web_app_relationships_request_builder.go new file mode 100644 index 00000000000..7df24581fd3 --- /dev/null +++ b/deviceappmanagement/mobile_apps_item_graph_windows_web_app_relationships_request_builder.go @@ -0,0 +1,151 @@ +package deviceappmanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppsItemGraphWindowsWebAppRelationshipsRequestBuilder provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +type MobileAppsItemGraphWindowsWebAppRelationshipsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppsItemGraphWindowsWebAppRelationshipsRequestBuilderGetQueryParameters list of relationships for this mobile app. +type MobileAppsItemGraphWindowsWebAppRelationshipsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppsItemGraphWindowsWebAppRelationshipsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsWebAppRelationshipsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppsItemGraphWindowsWebAppRelationshipsRequestBuilderGetQueryParameters +} +// MobileAppsItemGraphWindowsWebAppRelationshipsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppsItemGraphWindowsWebAppRelationshipsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMobileAppRelationshipId provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphWindowsWebAppRelationshipsRequestBuilder) ByMobileAppRelationshipId(mobileAppRelationshipId string)(*MobileAppsItemGraphWindowsWebAppRelationshipsMobileAppRelationshipItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if mobileAppRelationshipId != "" { + urlTplParams["mobileAppRelationship%2Did"] = mobileAppRelationshipId + } + return NewMobileAppsItemGraphWindowsWebAppRelationshipsMobileAppRelationshipItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMobileAppsItemGraphWindowsWebAppRelationshipsRequestBuilderInternal instantiates a new RelationshipsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsWebAppRelationshipsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsWebAppRelationshipsRequestBuilder) { + m := &MobileAppsItemGraphWindowsWebAppRelationshipsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsWebApp/relationships{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppsItemGraphWindowsWebAppRelationshipsRequestBuilder instantiates a new RelationshipsRequestBuilder and sets the default values. +func NewMobileAppsItemGraphWindowsWebAppRelationshipsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsWebAppRelationshipsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppsItemGraphWindowsWebAppRelationshipsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppsItemGraphWindowsWebAppRelationshipsRequestBuilder) Count()(*MobileAppsItemGraphWindowsWebAppRelationshipsCountRequestBuilder) { + return NewMobileAppsItemGraphWindowsWebAppRelationshipsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get list of relationships for this mobile app. +func (m *MobileAppsItemGraphWindowsWebAppRelationshipsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsWebAppRelationshipsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipCollectionResponseable), nil +} +// Post create new navigation property to relationships for deviceAppManagement +func (m *MobileAppsItemGraphWindowsWebAppRelationshipsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphWindowsWebAppRelationshipsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMobileAppRelationshipFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable), nil +} +// ToGetRequestInformation list of relationships for this mobile app. +func (m *MobileAppsItemGraphWindowsWebAppRelationshipsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsWebAppRelationshipsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to relationships for deviceAppManagement +func (m *MobileAppsItemGraphWindowsWebAppRelationshipsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MobileAppRelationshipable, requestConfiguration *MobileAppsItemGraphWindowsWebAppRelationshipsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppsItemGraphWindowsWebAppRelationshipsRequestBuilder) WithUrl(rawUrl string)(*MobileAppsItemGraphWindowsWebAppRelationshipsRequestBuilder) { + return NewMobileAppsItemGraphWindowsWebAppRelationshipsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/deviceappmanagement/mobile_apps_item_graph_windows_web_app_request_builder.go b/deviceappmanagement/mobile_apps_item_graph_windows_web_app_request_builder.go index 11642f155e9..559578f6ac4 100644 --- a/deviceappmanagement/mobile_apps_item_graph_windows_web_app_request_builder.go +++ b/deviceappmanagement/mobile_apps_item_graph_windows_web_app_request_builder.go @@ -27,6 +27,14 @@ type MobileAppsItemGraphWindowsWebAppRequestBuilderGetRequestConfiguration struc // Request query parameters QueryParameters *MobileAppsItemGraphWindowsWebAppRequestBuilderGetQueryParameters } +// Assignments provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphWindowsWebAppRequestBuilder) Assignments()(*MobileAppsItemGraphWindowsWebAppAssignmentsRequestBuilder) { + return NewMobileAppsItemGraphWindowsWebAppAssignmentsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Categories provides operations to manage the categories property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphWindowsWebAppRequestBuilder) Categories()(*MobileAppsItemGraphWindowsWebAppCategoriesRequestBuilder) { + return NewMobileAppsItemGraphWindowsWebAppCategoriesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // NewMobileAppsItemGraphWindowsWebAppRequestBuilderInternal instantiates a new GraphWindowsWebAppRequestBuilder and sets the default values. func NewMobileAppsItemGraphWindowsWebAppRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppsItemGraphWindowsWebAppRequestBuilder) { m := &MobileAppsItemGraphWindowsWebAppRequestBuilder{ @@ -59,6 +67,10 @@ func (m *MobileAppsItemGraphWindowsWebAppRequestBuilder) Get(ctx context.Context } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.WindowsWebAppable), nil } +// Relationships provides operations to manage the relationships property of the microsoft.graph.mobileApp entity. +func (m *MobileAppsItemGraphWindowsWebAppRequestBuilder) Relationships()(*MobileAppsItemGraphWindowsWebAppRelationshipsRequestBuilder) { + return NewMobileAppsItemGraphWindowsWebAppRelationshipsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation get the item of type microsoft.graph.mobileApp as microsoft.graph.windowsWebApp func (m *MobileAppsItemGraphWindowsWebAppRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppsItemGraphWindowsWebAppRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/devicemanagement/virtual_endpoint_provisioning_policies_item_assignments_item_assigned_users_item_service_provisioning_errors_count_request_builder.go b/devicemanagement/virtual_endpoint_provisioning_policies_item_assignments_item_assigned_users_item_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..90e445f4dcd --- /dev/null +++ b/devicemanagement/virtual_endpoint_provisioning_policies_item_assignments_item_assigned_users_item_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,83 @@ +package devicemanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// VirtualEndpointProvisioningPoliciesItemAssignmentsItemAssignedUsersItemServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type VirtualEndpointProvisioningPoliciesItemAssignmentsItemAssignedUsersItemServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// VirtualEndpointProvisioningPoliciesItemAssignmentsItemAssignedUsersItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type VirtualEndpointProvisioningPoliciesItemAssignmentsItemAssignedUsersItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// VirtualEndpointProvisioningPoliciesItemAssignmentsItemAssignedUsersItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type VirtualEndpointProvisioningPoliciesItemAssignmentsItemAssignedUsersItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *VirtualEndpointProvisioningPoliciesItemAssignmentsItemAssignedUsersItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewVirtualEndpointProvisioningPoliciesItemAssignmentsItemAssignedUsersItemServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewVirtualEndpointProvisioningPoliciesItemAssignmentsItemAssignedUsersItemServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*VirtualEndpointProvisioningPoliciesItemAssignmentsItemAssignedUsersItemServiceProvisioningErrorsCountRequestBuilder) { + m := &VirtualEndpointProvisioningPoliciesItemAssignmentsItemAssignedUsersItemServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceManagement/virtualEndpoint/provisioningPolicies/{cloudPcProvisioningPolicy%2Did}/assignments/{cloudPcProvisioningPolicyAssignment%2Did}/assignedUsers/{user%2Did}/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewVirtualEndpointProvisioningPoliciesItemAssignmentsItemAssignedUsersItemServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewVirtualEndpointProvisioningPoliciesItemAssignmentsItemAssignedUsersItemServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*VirtualEndpointProvisioningPoliciesItemAssignmentsItemAssignedUsersItemServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewVirtualEndpointProvisioningPoliciesItemAssignmentsItemAssignedUsersItemServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +// Deprecated: The onPremisesConnectionId property is deprecated and will stop returning on July 30, 2023. as of 2023-03/onPremisesConnectionId on 2023-03-16 and will be removed 2023-07-30 +func (m *VirtualEndpointProvisioningPoliciesItemAssignmentsItemAssignedUsersItemServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *VirtualEndpointProvisioningPoliciesItemAssignmentsItemAssignedUsersItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +// Deprecated: The onPremisesConnectionId property is deprecated and will stop returning on July 30, 2023. as of 2023-03/onPremisesConnectionId on 2023-03-16 and will be removed 2023-07-30 +func (m *VirtualEndpointProvisioningPoliciesItemAssignmentsItemAssignedUsersItemServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *VirtualEndpointProvisioningPoliciesItemAssignmentsItemAssignedUsersItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: The onPremisesConnectionId property is deprecated and will stop returning on July 30, 2023. as of 2023-03/onPremisesConnectionId on 2023-03-16 and will be removed 2023-07-30 +func (m *VirtualEndpointProvisioningPoliciesItemAssignmentsItemAssignedUsersItemServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*VirtualEndpointProvisioningPoliciesItemAssignmentsItemAssignedUsersItemServiceProvisioningErrorsCountRequestBuilder) { + return NewVirtualEndpointProvisioningPoliciesItemAssignmentsItemAssignedUsersItemServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/devicemanagement/virtual_endpoint_provisioning_policies_item_assignments_item_assigned_users_item_service_provisioning_errors_request_builder.go b/devicemanagement/virtual_endpoint_provisioning_policies_item_assignments_item_assigned_users_item_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..cca3e0d9411 --- /dev/null +++ b/devicemanagement/virtual_endpoint_provisioning_policies_item_assignments_item_assigned_users_item_service_provisioning_errors_request_builder.go @@ -0,0 +1,100 @@ +package devicemanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// VirtualEndpointProvisioningPoliciesItemAssignmentsItemAssignedUsersItemServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \deviceManagement\virtualEndpoint\provisioningPolicies\{cloudPcProvisioningPolicy-id}\assignments\{cloudPcProvisioningPolicyAssignment-id}\assignedUsers\{user-id}\serviceProvisioningErrors +type VirtualEndpointProvisioningPoliciesItemAssignmentsItemAssignedUsersItemServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// VirtualEndpointProvisioningPoliciesItemAssignmentsItemAssignedUsersItemServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type VirtualEndpointProvisioningPoliciesItemAssignmentsItemAssignedUsersItemServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// VirtualEndpointProvisioningPoliciesItemAssignmentsItemAssignedUsersItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type VirtualEndpointProvisioningPoliciesItemAssignmentsItemAssignedUsersItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *VirtualEndpointProvisioningPoliciesItemAssignmentsItemAssignedUsersItemServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewVirtualEndpointProvisioningPoliciesItemAssignmentsItemAssignedUsersItemServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewVirtualEndpointProvisioningPoliciesItemAssignmentsItemAssignedUsersItemServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*VirtualEndpointProvisioningPoliciesItemAssignmentsItemAssignedUsersItemServiceProvisioningErrorsRequestBuilder) { + m := &VirtualEndpointProvisioningPoliciesItemAssignmentsItemAssignedUsersItemServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceManagement/virtualEndpoint/provisioningPolicies/{cloudPcProvisioningPolicy%2Did}/assignments/{cloudPcProvisioningPolicyAssignment%2Did}/assignedUsers/{user%2Did}/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewVirtualEndpointProvisioningPoliciesItemAssignmentsItemAssignedUsersItemServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewVirtualEndpointProvisioningPoliciesItemAssignmentsItemAssignedUsersItemServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*VirtualEndpointProvisioningPoliciesItemAssignmentsItemAssignedUsersItemServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewVirtualEndpointProvisioningPoliciesItemAssignmentsItemAssignedUsersItemServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *VirtualEndpointProvisioningPoliciesItemAssignmentsItemAssignedUsersItemServiceProvisioningErrorsRequestBuilder) Count()(*VirtualEndpointProvisioningPoliciesItemAssignmentsItemAssignedUsersItemServiceProvisioningErrorsCountRequestBuilder) { + return NewVirtualEndpointProvisioningPoliciesItemAssignmentsItemAssignedUsersItemServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +// Deprecated: The onPremisesConnectionId property is deprecated and will stop returning on July 30, 2023. as of 2023-03/onPremisesConnectionId on 2023-03-16 and will be removed 2023-07-30 +func (m *VirtualEndpointProvisioningPoliciesItemAssignmentsItemAssignedUsersItemServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *VirtualEndpointProvisioningPoliciesItemAssignmentsItemAssignedUsersItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +// Deprecated: The onPremisesConnectionId property is deprecated and will stop returning on July 30, 2023. as of 2023-03/onPremisesConnectionId on 2023-03-16 and will be removed 2023-07-30 +func (m *VirtualEndpointProvisioningPoliciesItemAssignmentsItemAssignedUsersItemServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *VirtualEndpointProvisioningPoliciesItemAssignmentsItemAssignedUsersItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: The onPremisesConnectionId property is deprecated and will stop returning on July 30, 2023. as of 2023-03/onPremisesConnectionId on 2023-03-16 and will be removed 2023-07-30 +func (m *VirtualEndpointProvisioningPoliciesItemAssignmentsItemAssignedUsersItemServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*VirtualEndpointProvisioningPoliciesItemAssignmentsItemAssignedUsersItemServiceProvisioningErrorsRequestBuilder) { + return NewVirtualEndpointProvisioningPoliciesItemAssignmentsItemAssignedUsersItemServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/devicemanagement/virtual_endpoint_provisioning_policies_item_assignments_item_assigned_users_user_item_request_builder.go b/devicemanagement/virtual_endpoint_provisioning_policies_item_assignments_item_assigned_users_user_item_request_builder.go index f836c50ca7e..c14fa20bfa4 100644 --- a/devicemanagement/virtual_endpoint_provisioning_policies_item_assignments_item_assigned_users_user_item_request_builder.go +++ b/devicemanagement/virtual_endpoint_provisioning_policies_item_assignments_item_assigned_users_user_item_request_builder.go @@ -64,6 +64,10 @@ func (m *VirtualEndpointProvisioningPoliciesItemAssignmentsItemAssignedUsersUser func (m *VirtualEndpointProvisioningPoliciesItemAssignmentsItemAssignedUsersUserItemRequestBuilder) MailboxSettings()(*VirtualEndpointProvisioningPoliciesItemAssignmentsItemAssignedUsersItemMailboxSettingsRequestBuilder) { return NewVirtualEndpointProvisioningPoliciesItemAssignmentsItemAssignedUsersItemMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *VirtualEndpointProvisioningPoliciesItemAssignmentsItemAssignedUsersUserItemRequestBuilder) ServiceProvisioningErrors()(*VirtualEndpointProvisioningPoliciesItemAssignmentsItemAssignedUsersItemServiceProvisioningErrorsRequestBuilder) { + return NewVirtualEndpointProvisioningPoliciesItemAssignmentsItemAssignedUsersItemServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation the assignment targeted users for the provisioning policy. This list of users is computed based on assignments, licenses, group memberships, and policies. This property is read-only. Supports$expand. // Deprecated: The onPremisesConnectionId property is deprecated and will stop returning on July 30, 2023. as of 2023-03/onPremisesConnectionId on 2023-03-16 and will be removed 2023-07-30 func (m *VirtualEndpointProvisioningPoliciesItemAssignmentsItemAssignedUsersUserItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *VirtualEndpointProvisioningPoliciesItemAssignmentsItemAssignedUsersUserItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { diff --git a/directory/certificate_authorities_certificate_based_application_configurations_certificate_based_application_configuration_item_request_builder.go b/directory/certificate_authorities_certificate_based_application_configurations_certificate_based_application_configuration_item_request_builder.go index e164ef24ce7..0a293d56f5a 100644 --- a/directory/certificate_authorities_certificate_based_application_configurations_certificate_based_application_configuration_item_request_builder.go +++ b/directory/certificate_authorities_certificate_based_application_configurations_certificate_based_application_configuration_item_request_builder.go @@ -18,7 +18,7 @@ type CertificateAuthoritiesCertificateBasedApplicationConfigurationsCertificateB // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// CertificateAuthoritiesCertificateBasedApplicationConfigurationsCertificateBasedApplicationConfigurationItemRequestBuilderGetQueryParameters read the properties and relationships of a certificateBasedApplicationConfiguration object. +// CertificateAuthoritiesCertificateBasedApplicationConfigurationsCertificateBasedApplicationConfigurationItemRequestBuilderGetQueryParameters get certificateBasedApplicationConfigurations from directory type CertificateAuthoritiesCertificateBasedApplicationConfigurationsCertificateBasedApplicationConfigurationItemRequestBuilderGetQueryParameters struct { // Expand related entities Expand []string `uriparametername:"%24expand"` @@ -54,10 +54,7 @@ func NewCertificateAuthoritiesCertificateBasedApplicationConfigurationsCertifica urlParams["request-raw-url"] = rawUrl return NewCertificateAuthoritiesCertificateBasedApplicationConfigurationsCertificateBasedApplicationConfigurationItemRequestBuilderInternal(urlParams, requestAdapter) } -// Delete delete the properties and relationships of a certificateBasedApplicationConfiguration object. -// [Find more info here] -// -// [Find more info here]: https://learn.microsoft.com/graph/api/certificatebasedapplicationconfiguration-delete?view=graph-rest-1.0 +// Delete delete navigation property certificateBasedApplicationConfigurations for directory func (m *CertificateAuthoritiesCertificateBasedApplicationConfigurationsCertificateBasedApplicationConfigurationItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *CertificateAuthoritiesCertificateBasedApplicationConfigurationsCertificateBasedApplicationConfigurationItemRequestBuilderDeleteRequestConfiguration)(error) { requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); if err != nil { @@ -73,10 +70,7 @@ func (m *CertificateAuthoritiesCertificateBasedApplicationConfigurationsCertific } return nil } -// Get read the properties and relationships of a certificateBasedApplicationConfiguration object. -// [Find more info here] -// -// [Find more info here]: https://learn.microsoft.com/graph/api/certificatebasedapplicationconfiguration-get?view=graph-rest-1.0 +// Get get certificateBasedApplicationConfigurations from directory func (m *CertificateAuthoritiesCertificateBasedApplicationConfigurationsCertificateBasedApplicationConfigurationItemRequestBuilder) Get(ctx context.Context, requestConfiguration *CertificateAuthoritiesCertificateBasedApplicationConfigurationsCertificateBasedApplicationConfigurationItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CertificateBasedApplicationConfigurationable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -95,10 +89,7 @@ func (m *CertificateAuthoritiesCertificateBasedApplicationConfigurationsCertific } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CertificateBasedApplicationConfigurationable), nil } -// Patch update the properties of a certificateBasedApplicationConfiguration object. To update the trustedCertificateAuthorities within a certificateBasedApplicationConfiguration object, use the Update certificateAuthorityAsEntity operation. -// [Find more info here] -// -// [Find more info here]: https://learn.microsoft.com/graph/api/certificatebasedapplicationconfiguration-update?view=graph-rest-1.0 +// Patch update the navigation property certificateBasedApplicationConfigurations in directory func (m *CertificateAuthoritiesCertificateBasedApplicationConfigurationsCertificateBasedApplicationConfigurationItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CertificateBasedApplicationConfigurationable, requestConfiguration *CertificateAuthoritiesCertificateBasedApplicationConfigurationsCertificateBasedApplicationConfigurationItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CertificateBasedApplicationConfigurationable, error) { requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -117,7 +108,7 @@ func (m *CertificateAuthoritiesCertificateBasedApplicationConfigurationsCertific } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CertificateBasedApplicationConfigurationable), nil } -// ToDeleteRequestInformation delete the properties and relationships of a certificateBasedApplicationConfiguration object. +// ToDeleteRequestInformation delete navigation property certificateBasedApplicationConfigurations for directory func (m *CertificateAuthoritiesCertificateBasedApplicationConfigurationsCertificateBasedApplicationConfigurationItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *CertificateAuthoritiesCertificateBasedApplicationConfigurationsCertificateBasedApplicationConfigurationItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate @@ -129,7 +120,7 @@ func (m *CertificateAuthoritiesCertificateBasedApplicationConfigurationsCertific } return requestInfo, nil } -// ToGetRequestInformation read the properties and relationships of a certificateBasedApplicationConfiguration object. +// ToGetRequestInformation get certificateBasedApplicationConfigurations from directory func (m *CertificateAuthoritiesCertificateBasedApplicationConfigurationsCertificateBasedApplicationConfigurationItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *CertificateAuthoritiesCertificateBasedApplicationConfigurationsCertificateBasedApplicationConfigurationItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate @@ -145,7 +136,7 @@ func (m *CertificateAuthoritiesCertificateBasedApplicationConfigurationsCertific } return requestInfo, nil } -// ToPatchRequestInformation update the properties of a certificateBasedApplicationConfiguration object. To update the trustedCertificateAuthorities within a certificateBasedApplicationConfiguration object, use the Update certificateAuthorityAsEntity operation. +// ToPatchRequestInformation update the navigation property certificateBasedApplicationConfigurations in directory func (m *CertificateAuthoritiesCertificateBasedApplicationConfigurationsCertificateBasedApplicationConfigurationItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CertificateBasedApplicationConfigurationable, requestConfiguration *CertificateAuthoritiesCertificateBasedApplicationConfigurationsCertificateBasedApplicationConfigurationItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/directory/certificate_authorities_certificate_based_application_configurations_item_trusted_certificate_authorities_certificate_authority_as_entity_item_request_builder.go b/directory/certificate_authorities_certificate_based_application_configurations_item_trusted_certificate_authorities_certificate_authority_as_entity_item_request_builder.go index 9c90c741fc9..8a3f6379f36 100644 --- a/directory/certificate_authorities_certificate_based_application_configurations_item_trusted_certificate_authorities_certificate_authority_as_entity_item_request_builder.go +++ b/directory/certificate_authorities_certificate_based_application_configurations_item_trusted_certificate_authorities_certificate_authority_as_entity_item_request_builder.go @@ -18,7 +18,7 @@ type CertificateAuthoritiesCertificateBasedApplicationConfigurationsItemTrustedC // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// CertificateAuthoritiesCertificateBasedApplicationConfigurationsItemTrustedCertificateAuthoritiesCertificateAuthorityAsEntityItemRequestBuilderGetQueryParameters collection of trusted certificate authorities. +// CertificateAuthoritiesCertificateBasedApplicationConfigurationsItemTrustedCertificateAuthoritiesCertificateAuthorityAsEntityItemRequestBuilderGetQueryParameters get trustedCertificateAuthorities from directory type CertificateAuthoritiesCertificateBasedApplicationConfigurationsItemTrustedCertificateAuthoritiesCertificateAuthorityAsEntityItemRequestBuilderGetQueryParameters struct { // Expand related entities Expand []string `uriparametername:"%24expand"` @@ -70,7 +70,7 @@ func (m *CertificateAuthoritiesCertificateBasedApplicationConfigurationsItemTrus } return nil } -// Get collection of trusted certificate authorities. +// Get get trustedCertificateAuthorities from directory func (m *CertificateAuthoritiesCertificateBasedApplicationConfigurationsItemTrustedCertificateAuthoritiesCertificateAuthorityAsEntityItemRequestBuilder) Get(ctx context.Context, requestConfiguration *CertificateAuthoritiesCertificateBasedApplicationConfigurationsItemTrustedCertificateAuthoritiesCertificateAuthorityAsEntityItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CertificateAuthorityAsEntityable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -120,7 +120,7 @@ func (m *CertificateAuthoritiesCertificateBasedApplicationConfigurationsItemTrus } return requestInfo, nil } -// ToGetRequestInformation collection of trusted certificate authorities. +// ToGetRequestInformation get trustedCertificateAuthorities from directory func (m *CertificateAuthoritiesCertificateBasedApplicationConfigurationsItemTrustedCertificateAuthoritiesCertificateAuthorityAsEntityItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *CertificateAuthoritiesCertificateBasedApplicationConfigurationsItemTrustedCertificateAuthoritiesCertificateAuthorityAsEntityItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/directory/certificate_authorities_certificate_based_application_configurations_item_trusted_certificate_authorities_request_builder.go b/directory/certificate_authorities_certificate_based_application_configurations_item_trusted_certificate_authorities_request_builder.go index e67dcd8cf43..ff069e282c9 100644 --- a/directory/certificate_authorities_certificate_based_application_configurations_item_trusted_certificate_authorities_request_builder.go +++ b/directory/certificate_authorities_certificate_based_application_configurations_item_trusted_certificate_authorities_request_builder.go @@ -11,7 +11,7 @@ import ( type CertificateAuthoritiesCertificateBasedApplicationConfigurationsItemTrustedCertificateAuthoritiesRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// CertificateAuthoritiesCertificateBasedApplicationConfigurationsItemTrustedCertificateAuthoritiesRequestBuilderGetQueryParameters collection of trusted certificate authorities. +// CertificateAuthoritiesCertificateBasedApplicationConfigurationsItemTrustedCertificateAuthoritiesRequestBuilderGetQueryParameters get trustedCertificateAuthorities from directory type CertificateAuthoritiesCertificateBasedApplicationConfigurationsItemTrustedCertificateAuthoritiesRequestBuilderGetQueryParameters struct { // Include count of items Count *bool `uriparametername:"%24count"` @@ -74,7 +74,7 @@ func NewCertificateAuthoritiesCertificateBasedApplicationConfigurationsItemTrust func (m *CertificateAuthoritiesCertificateBasedApplicationConfigurationsItemTrustedCertificateAuthoritiesRequestBuilder) Count()(*CertificateAuthoritiesCertificateBasedApplicationConfigurationsItemTrustedCertificateAuthoritiesCountRequestBuilder) { return NewCertificateAuthoritiesCertificateBasedApplicationConfigurationsItemTrustedCertificateAuthoritiesCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Get collection of trusted certificate authorities. +// Get get trustedCertificateAuthorities from directory func (m *CertificateAuthoritiesCertificateBasedApplicationConfigurationsItemTrustedCertificateAuthoritiesRequestBuilder) Get(ctx context.Context, requestConfiguration *CertificateAuthoritiesCertificateBasedApplicationConfigurationsItemTrustedCertificateAuthoritiesRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CertificateAuthorityAsEntityCollectionResponseable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -112,7 +112,7 @@ func (m *CertificateAuthoritiesCertificateBasedApplicationConfigurationsItemTrus } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CertificateAuthorityAsEntityable), nil } -// ToGetRequestInformation collection of trusted certificate authorities. +// ToGetRequestInformation get trustedCertificateAuthorities from directory func (m *CertificateAuthoritiesCertificateBasedApplicationConfigurationsItemTrustedCertificateAuthoritiesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *CertificateAuthoritiesCertificateBasedApplicationConfigurationsItemTrustedCertificateAuthoritiesRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/directory/certificate_authorities_certificate_based_application_configurations_request_builder.go b/directory/certificate_authorities_certificate_based_application_configurations_request_builder.go index c0cbbb9687d..75331dacd62 100644 --- a/directory/certificate_authorities_certificate_based_application_configurations_request_builder.go +++ b/directory/certificate_authorities_certificate_based_application_configurations_request_builder.go @@ -11,7 +11,7 @@ import ( type CertificateAuthoritiesCertificateBasedApplicationConfigurationsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// CertificateAuthoritiesCertificateBasedApplicationConfigurationsRequestBuilderGetQueryParameters get a list of certificateBasedApplicationConfiguration objects. +// CertificateAuthoritiesCertificateBasedApplicationConfigurationsRequestBuilderGetQueryParameters get certificateBasedApplicationConfigurations from directory type CertificateAuthoritiesCertificateBasedApplicationConfigurationsRequestBuilderGetQueryParameters struct { // Include count of items Count *bool `uriparametername:"%24count"` @@ -74,10 +74,7 @@ func NewCertificateAuthoritiesCertificateBasedApplicationConfigurationsRequestBu func (m *CertificateAuthoritiesCertificateBasedApplicationConfigurationsRequestBuilder) Count()(*CertificateAuthoritiesCertificateBasedApplicationConfigurationsCountRequestBuilder) { return NewCertificateAuthoritiesCertificateBasedApplicationConfigurationsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Get get a list of certificateBasedApplicationConfiguration objects. -// [Find more info here] -// -// [Find more info here]: https://learn.microsoft.com/graph/api/certificateauthoritypath-list-certificatebasedapplicationconfigurations?view=graph-rest-1.0 +// Get get certificateBasedApplicationConfigurations from directory func (m *CertificateAuthoritiesCertificateBasedApplicationConfigurationsRequestBuilder) Get(ctx context.Context, requestConfiguration *CertificateAuthoritiesCertificateBasedApplicationConfigurationsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CertificateBasedApplicationConfigurationCollectionResponseable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -115,7 +112,7 @@ func (m *CertificateAuthoritiesCertificateBasedApplicationConfigurationsRequestB } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CertificateBasedApplicationConfigurationable), nil } -// ToGetRequestInformation get a list of certificateBasedApplicationConfiguration objects. +// ToGetRequestInformation get certificateBasedApplicationConfigurations from directory func (m *CertificateAuthoritiesCertificateBasedApplicationConfigurationsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *CertificateAuthoritiesCertificateBasedApplicationConfigurationsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/directory/deleted_items_delta_request_builder.go b/directory/deleted_items_delta_request_builder.go deleted file mode 100644 index 55acf4e2a2a..00000000000 --- a/directory/deleted_items_delta_request_builder.go +++ /dev/null @@ -1,90 +0,0 @@ -package directory - -import ( - "context" - i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" - i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" -) - -// DeletedItemsDeltaRequestBuilder provides operations to call the delta method. -type DeletedItemsDeltaRequestBuilder struct { - i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder -} -// DeletedItemsDeltaRequestBuilderGetQueryParameters invoke function delta -type DeletedItemsDeltaRequestBuilderGetQueryParameters struct { - // Include count of items - Count *bool `uriparametername:"%24count"` - // Filter items by property values - Filter *string `uriparametername:"%24filter"` - // Order items by property values - Orderby []string `uriparametername:"%24orderby"` - // Search items by search phrases - Search *string `uriparametername:"%24search"` - // Select properties to be returned - Select []string `uriparametername:"%24select"` - // Skip the first n items - Skip *int32 `uriparametername:"%24skip"` - // Show only the first n items - Top *int32 `uriparametername:"%24top"` -} -// DeletedItemsDeltaRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. -type DeletedItemsDeltaRequestBuilderGetRequestConfiguration struct { - // Request headers - Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders - // Request options - Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption - // Request query parameters - QueryParameters *DeletedItemsDeltaRequestBuilderGetQueryParameters -} -// NewDeletedItemsDeltaRequestBuilderInternal instantiates a new DeltaRequestBuilder and sets the default values. -func NewDeletedItemsDeltaRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*DeletedItemsDeltaRequestBuilder) { - m := &DeletedItemsDeltaRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/directory/deletedItems/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", pathParameters), - } - return m -} -// NewDeletedItemsDeltaRequestBuilder instantiates a new DeltaRequestBuilder and sets the default values. -func NewDeletedItemsDeltaRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*DeletedItemsDeltaRequestBuilder) { - urlParams := make(map[string]string) - urlParams["request-raw-url"] = rawUrl - return NewDeletedItemsDeltaRequestBuilderInternal(urlParams, requestAdapter) -} -// Get invoke function delta -func (m *DeletedItemsDeltaRequestBuilder) Get(ctx context.Context, requestConfiguration *DeletedItemsDeltaRequestBuilderGetRequestConfiguration)(DeletedItemsDeltaResponseable, error) { - requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); - if err != nil { - return nil, err - } - errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { - "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, - "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, - } - res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateDeletedItemsDeltaResponseFromDiscriminatorValue, errorMapping) - if err != nil { - return nil, err - } - if res == nil { - return nil, nil - } - return res.(DeletedItemsDeltaResponseable), nil -} -// ToGetRequestInformation invoke function delta -func (m *DeletedItemsDeltaRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *DeletedItemsDeltaRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() - requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate - requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters - requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET - requestInfo.Headers.Add("Accept", "application/json") - if requestConfiguration != nil { - if requestConfiguration.QueryParameters != nil { - requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) - } - requestInfo.Headers.AddAll(requestConfiguration.Headers) - requestInfo.AddRequestOptions(requestConfiguration.Options) - } - return requestInfo, nil -} -// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. -func (m *DeletedItemsDeltaRequestBuilder) WithUrl(rawUrl string)(*DeletedItemsDeltaRequestBuilder) { - return NewDeletedItemsDeltaRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); -} diff --git a/directory/deleted_items_delta_response.go b/directory/deleted_items_delta_response.go deleted file mode 100644 index 725971d9695..00000000000 --- a/directory/deleted_items_delta_response.go +++ /dev/null @@ -1,88 +0,0 @@ -package directory - -import ( - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" - ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" -) - -// DeletedItemsDeltaResponse -type DeletedItemsDeltaResponse struct { - ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BaseDeltaFunctionResponse -} -// NewDeletedItemsDeltaResponse instantiates a new DeletedItemsDeltaResponse and sets the default values. -func NewDeletedItemsDeltaResponse()(*DeletedItemsDeltaResponse) { - m := &DeletedItemsDeltaResponse{ - BaseDeltaFunctionResponse: *ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.NewBaseDeltaFunctionResponse(), - } - return m -} -// CreateDeletedItemsDeltaResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value -func CreateDeletedItemsDeltaResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewDeletedItemsDeltaResponse(), nil -} -// GetFieldDeserializers the deserialization information for the current model -func (m *DeletedItemsDeltaResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - res := m.BaseDeltaFunctionResponse.GetFieldDeserializers() - res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfObjectValues(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateDirectoryObjectFromDiscriminatorValue) - if err != nil { - return err - } - if val != nil { - res := make([]ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DirectoryObjectable, len(val)) - for i, v := range val { - if v != nil { - res[i] = v.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DirectoryObjectable) - } - } - m.SetValue(res) - } - return nil - } - return res -} -// GetValue gets the value property value. The value property -func (m *DeletedItemsDeltaResponse) GetValue()([]ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DirectoryObjectable) { - val, err := m.GetBackingStore().Get("value") - if err != nil { - panic(err) - } - if val != nil { - return val.([]ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DirectoryObjectable) - } - return nil -} -// Serialize serializes information the current object -func (m *DeletedItemsDeltaResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - err := m.BaseDeltaFunctionResponse.Serialize(writer) - if err != nil { - return err - } - if m.GetValue() != nil { - cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) - for i, v := range m.GetValue() { - if v != nil { - cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) - } - } - err = writer.WriteCollectionOfObjectValues("value", cast) - if err != nil { - return err - } - } - return nil -} -// SetValue sets the value property value. The value property -func (m *DeletedItemsDeltaResponse) SetValue(value []ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DirectoryObjectable)() { - err := m.GetBackingStore().Set("value", value) - if err != nil { - panic(err) - } -} -// DeletedItemsDeltaResponseable -type DeletedItemsDeltaResponseable interface { - ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BaseDeltaFunctionResponseable - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetValue()([]ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DirectoryObjectable) - SetValue(value []ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DirectoryObjectable)() -} diff --git a/directory/deleted_items_directory_object_item_request_builder.go b/directory/deleted_items_directory_object_item_request_builder.go index 907b41a261d..21a1f8cab39 100644 --- a/directory/deleted_items_directory_object_item_request_builder.go +++ b/directory/deleted_items_directory_object_item_request_builder.go @@ -11,13 +11,6 @@ import ( type DeletedItemsDirectoryObjectItemRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// DeletedItemsDirectoryObjectItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. -type DeletedItemsDirectoryObjectItemRequestBuilderDeleteRequestConfiguration struct { - // Request headers - Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders - // Request options - Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption -} // DeletedItemsDirectoryObjectItemRequestBuilderGetQueryParameters get deletedItems from directory type DeletedItemsDirectoryObjectItemRequestBuilderGetQueryParameters struct { // Expand related entities @@ -34,21 +27,6 @@ type DeletedItemsDirectoryObjectItemRequestBuilderGetRequestConfiguration struct // Request query parameters QueryParameters *DeletedItemsDirectoryObjectItemRequestBuilderGetQueryParameters } -// DeletedItemsDirectoryObjectItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. -type DeletedItemsDirectoryObjectItemRequestBuilderPatchRequestConfiguration struct { - // Request headers - Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders - // Request options - Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption -} -// CheckMemberGroups provides operations to call the checkMemberGroups method. -func (m *DeletedItemsDirectoryObjectItemRequestBuilder) CheckMemberGroups()(*DeletedItemsItemCheckMemberGroupsRequestBuilder) { - return NewDeletedItemsItemCheckMemberGroupsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) -} -// CheckMemberObjects provides operations to call the checkMemberObjects method. -func (m *DeletedItemsDirectoryObjectItemRequestBuilder) CheckMemberObjects()(*DeletedItemsItemCheckMemberObjectsRequestBuilder) { - return NewDeletedItemsItemCheckMemberObjectsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) -} // NewDeletedItemsDirectoryObjectItemRequestBuilderInternal instantiates a new DirectoryObjectItemRequestBuilder and sets the default values. func NewDeletedItemsDirectoryObjectItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*DeletedItemsDirectoryObjectItemRequestBuilder) { m := &DeletedItemsDirectoryObjectItemRequestBuilder{ @@ -62,22 +40,6 @@ func NewDeletedItemsDirectoryObjectItemRequestBuilder(rawUrl string, requestAdap urlParams["request-raw-url"] = rawUrl return NewDeletedItemsDirectoryObjectItemRequestBuilderInternal(urlParams, requestAdapter) } -// Delete delete navigation property deletedItems for directory -func (m *DeletedItemsDirectoryObjectItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *DeletedItemsDirectoryObjectItemRequestBuilderDeleteRequestConfiguration)(error) { - requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); - if err != nil { - return err - } - errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { - "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, - "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, - } - err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) - if err != nil { - return err - } - return nil -} // Get get deletedItems from directory func (m *DeletedItemsDirectoryObjectItemRequestBuilder) Get(ctx context.Context, requestConfiguration *DeletedItemsDirectoryObjectItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DirectoryObjectable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); @@ -97,14 +59,6 @@ func (m *DeletedItemsDirectoryObjectItemRequestBuilder) Get(ctx context.Context, } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DirectoryObjectable), nil } -// GetMemberGroups provides operations to call the getMemberGroups method. -func (m *DeletedItemsDirectoryObjectItemRequestBuilder) GetMemberGroups()(*DeletedItemsItemGetMemberGroupsRequestBuilder) { - return NewDeletedItemsItemGetMemberGroupsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) -} -// GetMemberObjects provides operations to call the getMemberObjects method. -func (m *DeletedItemsDirectoryObjectItemRequestBuilder) GetMemberObjects()(*DeletedItemsItemGetMemberObjectsRequestBuilder) { - return NewDeletedItemsItemGetMemberObjectsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) -} // GraphAdministrativeUnit casts the previous resource to administrativeUnit. func (m *DeletedItemsDirectoryObjectItemRequestBuilder) GraphAdministrativeUnit()(*DeletedItemsItemGraphAdministrativeUnitRequestBuilder) { return NewDeletedItemsItemGraphAdministrativeUnitRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) @@ -129,41 +83,6 @@ func (m *DeletedItemsDirectoryObjectItemRequestBuilder) GraphServicePrincipal()( func (m *DeletedItemsDirectoryObjectItemRequestBuilder) GraphUser()(*DeletedItemsItemGraphUserRequestBuilder) { return NewDeletedItemsItemGraphUserRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Patch update the navigation property deletedItems in directory -func (m *DeletedItemsDirectoryObjectItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DirectoryObjectable, requestConfiguration *DeletedItemsDirectoryObjectItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DirectoryObjectable, error) { - requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); - if err != nil { - return nil, err - } - errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { - "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, - "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, - } - res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateDirectoryObjectFromDiscriminatorValue, errorMapping) - if err != nil { - return nil, err - } - if res == nil { - return nil, nil - } - return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DirectoryObjectable), nil -} -// Restore provides operations to call the restore method. -func (m *DeletedItemsDirectoryObjectItemRequestBuilder) Restore()(*DeletedItemsItemRestoreRequestBuilder) { - return NewDeletedItemsItemRestoreRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) -} -// ToDeleteRequestInformation delete navigation property deletedItems for directory -func (m *DeletedItemsDirectoryObjectItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *DeletedItemsDirectoryObjectItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() - requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate - requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters - requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE - if requestConfiguration != nil { - requestInfo.Headers.AddAll(requestConfiguration.Headers) - requestInfo.AddRequestOptions(requestConfiguration.Options) - } - return requestInfo, nil -} // ToGetRequestInformation get deletedItems from directory func (m *DeletedItemsDirectoryObjectItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *DeletedItemsDirectoryObjectItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() @@ -180,23 +99,6 @@ func (m *DeletedItemsDirectoryObjectItemRequestBuilder) ToGetRequestInformation( } return requestInfo, nil } -// ToPatchRequestInformation update the navigation property deletedItems in directory -func (m *DeletedItemsDirectoryObjectItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DirectoryObjectable, requestConfiguration *DeletedItemsDirectoryObjectItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() - requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate - requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters - requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH - requestInfo.Headers.Add("Accept", "application/json") - err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) - if err != nil { - return nil, err - } - if requestConfiguration != nil { - requestInfo.Headers.AddAll(requestConfiguration.Headers) - requestInfo.AddRequestOptions(requestConfiguration.Options) - } - return requestInfo, nil -} // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. func (m *DeletedItemsDirectoryObjectItemRequestBuilder) WithUrl(rawUrl string)(*DeletedItemsDirectoryObjectItemRequestBuilder) { return NewDeletedItemsDirectoryObjectItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); diff --git a/directory/deleted_items_get_by_ids_post_request_body.go b/directory/deleted_items_get_by_ids_post_request_body.go deleted file mode 100644 index aa9fabf6afa..00000000000 --- a/directory/deleted_items_get_by_ids_post_request_body.go +++ /dev/null @@ -1,158 +0,0 @@ -package directory - -import ( - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" - ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" -) - -// DeletedItemsGetByIdsPostRequestBody -type DeletedItemsGetByIdsPostRequestBody struct { - // Stores model information. - backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore -} -// NewDeletedItemsGetByIdsPostRequestBody instantiates a new DeletedItemsGetByIdsPostRequestBody and sets the default values. -func NewDeletedItemsGetByIdsPostRequestBody()(*DeletedItemsGetByIdsPostRequestBody) { - m := &DeletedItemsGetByIdsPostRequestBody{ - } - m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); - m.SetAdditionalData(make(map[string]any)) - return m -} -// CreateDeletedItemsGetByIdsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value -func CreateDeletedItemsGetByIdsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewDeletedItemsGetByIdsPostRequestBody(), nil -} -// GetAdditionalData gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. -func (m *DeletedItemsGetByIdsPostRequestBody) GetAdditionalData()(map[string]any) { - val , err := m.backingStore.Get("additionalData") - if err != nil { - panic(err) - } - if val == nil { - var value = make(map[string]any); - m.SetAdditionalData(value); - } - return val.(map[string]any) -} -// GetBackingStore gets the backingStore property value. Stores model information. -func (m *DeletedItemsGetByIdsPostRequestBody) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { - return m.backingStore -} -// GetFieldDeserializers the deserialization information for the current model -func (m *DeletedItemsGetByIdsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) - res["ids"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfPrimitiveValues("string") - if err != nil { - return err - } - if val != nil { - res := make([]string, len(val)) - for i, v := range val { - if v != nil { - res[i] = *(v.(*string)) - } - } - m.SetIds(res) - } - return nil - } - res["types"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfPrimitiveValues("string") - if err != nil { - return err - } - if val != nil { - res := make([]string, len(val)) - for i, v := range val { - if v != nil { - res[i] = *(v.(*string)) - } - } - m.SetTypes(res) - } - return nil - } - return res -} -// GetIds gets the ids property value. The ids property -func (m *DeletedItemsGetByIdsPostRequestBody) GetIds()([]string) { - val, err := m.GetBackingStore().Get("ids") - if err != nil { - panic(err) - } - if val != nil { - return val.([]string) - } - return nil -} -// GetTypes gets the types property value. The types property -func (m *DeletedItemsGetByIdsPostRequestBody) GetTypes()([]string) { - val, err := m.GetBackingStore().Get("types") - if err != nil { - panic(err) - } - if val != nil { - return val.([]string) - } - return nil -} -// Serialize serializes information the current object -func (m *DeletedItemsGetByIdsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - if m.GetIds() != nil { - err := writer.WriteCollectionOfStringValues("ids", m.GetIds()) - if err != nil { - return err - } - } - if m.GetTypes() != nil { - err := writer.WriteCollectionOfStringValues("types", m.GetTypes()) - if err != nil { - return err - } - } - { - err := writer.WriteAdditionalData(m.GetAdditionalData()) - if err != nil { - return err - } - } - return nil -} -// SetAdditionalData sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. -func (m *DeletedItemsGetByIdsPostRequestBody) SetAdditionalData(value map[string]any)() { - err := m.GetBackingStore().Set("additionalData", value) - if err != nil { - panic(err) - } -} -// SetBackingStore sets the backingStore property value. Stores model information. -func (m *DeletedItemsGetByIdsPostRequestBody) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { - m.backingStore = value -} -// SetIds sets the ids property value. The ids property -func (m *DeletedItemsGetByIdsPostRequestBody) SetIds(value []string)() { - err := m.GetBackingStore().Set("ids", value) - if err != nil { - panic(err) - } -} -// SetTypes sets the types property value. The types property -func (m *DeletedItemsGetByIdsPostRequestBody) SetTypes(value []string)() { - err := m.GetBackingStore().Set("types", value) - if err != nil { - panic(err) - } -} -// DeletedItemsGetByIdsPostRequestBodyable -type DeletedItemsGetByIdsPostRequestBodyable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder - ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) - GetIds()([]string) - GetTypes()([]string) - SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() - SetIds(value []string)() - SetTypes(value []string)() -} diff --git a/directory/deleted_items_get_by_ids_request_builder.go b/directory/deleted_items_get_by_ids_request_builder.go deleted file mode 100644 index b3304abda50..00000000000 --- a/directory/deleted_items_get_by_ids_request_builder.go +++ /dev/null @@ -1,75 +0,0 @@ -package directory - -import ( - "context" - i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" - i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" -) - -// DeletedItemsGetByIdsRequestBuilder provides operations to call the getByIds method. -type DeletedItemsGetByIdsRequestBuilder struct { - i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder -} -// DeletedItemsGetByIdsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. -type DeletedItemsGetByIdsRequestBuilderPostRequestConfiguration struct { - // Request headers - Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders - // Request options - Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption -} -// NewDeletedItemsGetByIdsRequestBuilderInternal instantiates a new GetByIdsRequestBuilder and sets the default values. -func NewDeletedItemsGetByIdsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*DeletedItemsGetByIdsRequestBuilder) { - m := &DeletedItemsGetByIdsRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/directory/deletedItems/getByIds", pathParameters), - } - return m -} -// NewDeletedItemsGetByIdsRequestBuilder instantiates a new GetByIdsRequestBuilder and sets the default values. -func NewDeletedItemsGetByIdsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*DeletedItemsGetByIdsRequestBuilder) { - urlParams := make(map[string]string) - urlParams["request-raw-url"] = rawUrl - return NewDeletedItemsGetByIdsRequestBuilderInternal(urlParams, requestAdapter) -} -// Post return the directory objects specified in a list of IDs. Some common uses for this function are to: -// [Find more info here] -// -// [Find more info here]: https://learn.microsoft.com/graph/api/directoryobject-getbyids?view=graph-rest-1.0 -func (m *DeletedItemsGetByIdsRequestBuilder) Post(ctx context.Context, body DeletedItemsGetByIdsPostRequestBodyable, requestConfiguration *DeletedItemsGetByIdsRequestBuilderPostRequestConfiguration)(DeletedItemsGetByIdsResponseable, error) { - requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); - if err != nil { - return nil, err - } - errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { - "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, - "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, - } - res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateDeletedItemsGetByIdsResponseFromDiscriminatorValue, errorMapping) - if err != nil { - return nil, err - } - if res == nil { - return nil, nil - } - return res.(DeletedItemsGetByIdsResponseable), nil -} -// ToPostRequestInformation return the directory objects specified in a list of IDs. Some common uses for this function are to: -func (m *DeletedItemsGetByIdsRequestBuilder) ToPostRequestInformation(ctx context.Context, body DeletedItemsGetByIdsPostRequestBodyable, requestConfiguration *DeletedItemsGetByIdsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() - requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate - requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters - requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST - requestInfo.Headers.Add("Accept", "application/json") - err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) - if err != nil { - return nil, err - } - if requestConfiguration != nil { - requestInfo.Headers.AddAll(requestConfiguration.Headers) - requestInfo.AddRequestOptions(requestConfiguration.Options) - } - return requestInfo, nil -} -// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. -func (m *DeletedItemsGetByIdsRequestBuilder) WithUrl(rawUrl string)(*DeletedItemsGetByIdsRequestBuilder) { - return NewDeletedItemsGetByIdsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); -} diff --git a/directory/deleted_items_get_by_ids_response.go b/directory/deleted_items_get_by_ids_response.go deleted file mode 100644 index f5518bf1790..00000000000 --- a/directory/deleted_items_get_by_ids_response.go +++ /dev/null @@ -1,88 +0,0 @@ -package directory - -import ( - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" - ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" -) - -// DeletedItemsGetByIdsResponse -type DeletedItemsGetByIdsResponse struct { - ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BaseCollectionPaginationCountResponse -} -// NewDeletedItemsGetByIdsResponse instantiates a new DeletedItemsGetByIdsResponse and sets the default values. -func NewDeletedItemsGetByIdsResponse()(*DeletedItemsGetByIdsResponse) { - m := &DeletedItemsGetByIdsResponse{ - BaseCollectionPaginationCountResponse: *ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.NewBaseCollectionPaginationCountResponse(), - } - return m -} -// CreateDeletedItemsGetByIdsResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value -func CreateDeletedItemsGetByIdsResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewDeletedItemsGetByIdsResponse(), nil -} -// GetFieldDeserializers the deserialization information for the current model -func (m *DeletedItemsGetByIdsResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() - res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfObjectValues(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateDirectoryObjectFromDiscriminatorValue) - if err != nil { - return err - } - if val != nil { - res := make([]ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DirectoryObjectable, len(val)) - for i, v := range val { - if v != nil { - res[i] = v.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DirectoryObjectable) - } - } - m.SetValue(res) - } - return nil - } - return res -} -// GetValue gets the value property value. The value property -func (m *DeletedItemsGetByIdsResponse) GetValue()([]ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DirectoryObjectable) { - val, err := m.GetBackingStore().Get("value") - if err != nil { - panic(err) - } - if val != nil { - return val.([]ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DirectoryObjectable) - } - return nil -} -// Serialize serializes information the current object -func (m *DeletedItemsGetByIdsResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - err := m.BaseCollectionPaginationCountResponse.Serialize(writer) - if err != nil { - return err - } - if m.GetValue() != nil { - cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) - for i, v := range m.GetValue() { - if v != nil { - cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) - } - } - err = writer.WriteCollectionOfObjectValues("value", cast) - if err != nil { - return err - } - } - return nil -} -// SetValue sets the value property value. The value property -func (m *DeletedItemsGetByIdsResponse) SetValue(value []ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DirectoryObjectable)() { - err := m.GetBackingStore().Set("value", value) - if err != nil { - panic(err) - } -} -// DeletedItemsGetByIdsResponseable -type DeletedItemsGetByIdsResponseable interface { - ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BaseCollectionPaginationCountResponseable - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetValue()([]ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DirectoryObjectable) - SetValue(value []ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DirectoryObjectable)() -} diff --git a/directory/deleted_items_get_user_owned_objects_post_request_body.go b/directory/deleted_items_get_user_owned_objects_post_request_body.go deleted file mode 100644 index bcf2d8e2930..00000000000 --- a/directory/deleted_items_get_user_owned_objects_post_request_body.go +++ /dev/null @@ -1,146 +0,0 @@ -package directory - -import ( - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" - ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" -) - -// DeletedItemsGetUserOwnedObjectsPostRequestBody -type DeletedItemsGetUserOwnedObjectsPostRequestBody struct { - // Stores model information. - backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore -} -// NewDeletedItemsGetUserOwnedObjectsPostRequestBody instantiates a new DeletedItemsGetUserOwnedObjectsPostRequestBody and sets the default values. -func NewDeletedItemsGetUserOwnedObjectsPostRequestBody()(*DeletedItemsGetUserOwnedObjectsPostRequestBody) { - m := &DeletedItemsGetUserOwnedObjectsPostRequestBody{ - } - m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); - m.SetAdditionalData(make(map[string]any)) - return m -} -// CreateDeletedItemsGetUserOwnedObjectsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value -func CreateDeletedItemsGetUserOwnedObjectsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewDeletedItemsGetUserOwnedObjectsPostRequestBody(), nil -} -// GetAdditionalData gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. -func (m *DeletedItemsGetUserOwnedObjectsPostRequestBody) GetAdditionalData()(map[string]any) { - val , err := m.backingStore.Get("additionalData") - if err != nil { - panic(err) - } - if val == nil { - var value = make(map[string]any); - m.SetAdditionalData(value); - } - return val.(map[string]any) -} -// GetBackingStore gets the backingStore property value. Stores model information. -func (m *DeletedItemsGetUserOwnedObjectsPostRequestBody) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { - return m.backingStore -} -// GetFieldDeserializers the deserialization information for the current model -func (m *DeletedItemsGetUserOwnedObjectsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) - res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetTypeEscaped(val) - } - return nil - } - res["userId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetUserId(val) - } - return nil - } - return res -} -// GetTypeEscaped gets the type property value. The type property -func (m *DeletedItemsGetUserOwnedObjectsPostRequestBody) GetTypeEscaped()(*string) { - val, err := m.GetBackingStore().Get("typeEscaped") - if err != nil { - panic(err) - } - if val != nil { - return val.(*string) - } - return nil -} -// GetUserId gets the userId property value. The userId property -func (m *DeletedItemsGetUserOwnedObjectsPostRequestBody) GetUserId()(*string) { - val, err := m.GetBackingStore().Get("userId") - if err != nil { - panic(err) - } - if val != nil { - return val.(*string) - } - return nil -} -// Serialize serializes information the current object -func (m *DeletedItemsGetUserOwnedObjectsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - { - err := writer.WriteStringValue("type", m.GetTypeEscaped()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("userId", m.GetUserId()) - if err != nil { - return err - } - } - { - err := writer.WriteAdditionalData(m.GetAdditionalData()) - if err != nil { - return err - } - } - return nil -} -// SetAdditionalData sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. -func (m *DeletedItemsGetUserOwnedObjectsPostRequestBody) SetAdditionalData(value map[string]any)() { - err := m.GetBackingStore().Set("additionalData", value) - if err != nil { - panic(err) - } -} -// SetBackingStore sets the backingStore property value. Stores model information. -func (m *DeletedItemsGetUserOwnedObjectsPostRequestBody) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { - m.backingStore = value -} -// SetTypeEscaped sets the type property value. The type property -func (m *DeletedItemsGetUserOwnedObjectsPostRequestBody) SetTypeEscaped(value *string)() { - err := m.GetBackingStore().Set("typeEscaped", value) - if err != nil { - panic(err) - } -} -// SetUserId sets the userId property value. The userId property -func (m *DeletedItemsGetUserOwnedObjectsPostRequestBody) SetUserId(value *string)() { - err := m.GetBackingStore().Set("userId", value) - if err != nil { - panic(err) - } -} -// DeletedItemsGetUserOwnedObjectsPostRequestBodyable -type DeletedItemsGetUserOwnedObjectsPostRequestBodyable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder - ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) - GetTypeEscaped()(*string) - GetUserId()(*string) - SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() - SetTypeEscaped(value *string)() - SetUserId(value *string)() -} diff --git a/directory/deleted_items_get_user_owned_objects_request_builder.go b/directory/deleted_items_get_user_owned_objects_request_builder.go deleted file mode 100644 index 78505538837..00000000000 --- a/directory/deleted_items_get_user_owned_objects_request_builder.go +++ /dev/null @@ -1,76 +0,0 @@ -package directory - -import ( - "context" - i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" - ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" - i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" -) - -// DeletedItemsGetUserOwnedObjectsRequestBuilder provides operations to call the getUserOwnedObjects method. -type DeletedItemsGetUserOwnedObjectsRequestBuilder struct { - i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder -} -// DeletedItemsGetUserOwnedObjectsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. -type DeletedItemsGetUserOwnedObjectsRequestBuilderPostRequestConfiguration struct { - // Request headers - Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders - // Request options - Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption -} -// NewDeletedItemsGetUserOwnedObjectsRequestBuilderInternal instantiates a new GetUserOwnedObjectsRequestBuilder and sets the default values. -func NewDeletedItemsGetUserOwnedObjectsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*DeletedItemsGetUserOwnedObjectsRequestBuilder) { - m := &DeletedItemsGetUserOwnedObjectsRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/directory/deletedItems/getUserOwnedObjects", pathParameters), - } - return m -} -// NewDeletedItemsGetUserOwnedObjectsRequestBuilder instantiates a new GetUserOwnedObjectsRequestBuilder and sets the default values. -func NewDeletedItemsGetUserOwnedObjectsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*DeletedItemsGetUserOwnedObjectsRequestBuilder) { - urlParams := make(map[string]string) - urlParams["request-raw-url"] = rawUrl - return NewDeletedItemsGetUserOwnedObjectsRequestBuilderInternal(urlParams, requestAdapter) -} -// Post retrieve a list of recently deleted application and group objects owned by the specified user. This API returns up to 1,000 deleted objects owned by the user, sorted by ID, and doesn't support pagination. -// [Find more info here] -// -// [Find more info here]: https://learn.microsoft.com/graph/api/directory-deleteditems-getuserownedobjects?view=graph-rest-1.0 -func (m *DeletedItemsGetUserOwnedObjectsRequestBuilder) Post(ctx context.Context, body DeletedItemsGetUserOwnedObjectsPostRequestBodyable, requestConfiguration *DeletedItemsGetUserOwnedObjectsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DirectoryObjectable, error) { - requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); - if err != nil { - return nil, err - } - errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { - "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, - "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, - } - res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateDirectoryObjectFromDiscriminatorValue, errorMapping) - if err != nil { - return nil, err - } - if res == nil { - return nil, nil - } - return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DirectoryObjectable), nil -} -// ToPostRequestInformation retrieve a list of recently deleted application and group objects owned by the specified user. This API returns up to 1,000 deleted objects owned by the user, sorted by ID, and doesn't support pagination. -func (m *DeletedItemsGetUserOwnedObjectsRequestBuilder) ToPostRequestInformation(ctx context.Context, body DeletedItemsGetUserOwnedObjectsPostRequestBodyable, requestConfiguration *DeletedItemsGetUserOwnedObjectsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() - requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate - requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters - requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST - requestInfo.Headers.Add("Accept", "application/json") - err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) - if err != nil { - return nil, err - } - if requestConfiguration != nil { - requestInfo.Headers.AddAll(requestConfiguration.Headers) - requestInfo.AddRequestOptions(requestConfiguration.Options) - } - return requestInfo, nil -} -// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. -func (m *DeletedItemsGetUserOwnedObjectsRequestBuilder) WithUrl(rawUrl string)(*DeletedItemsGetUserOwnedObjectsRequestBuilder) { - return NewDeletedItemsGetUserOwnedObjectsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); -} diff --git a/directory/deleted_items_item_check_member_groups_post_request_body.go b/directory/deleted_items_item_check_member_groups_post_request_body.go deleted file mode 100644 index 6705b637487..00000000000 --- a/directory/deleted_items_item_check_member_groups_post_request_body.go +++ /dev/null @@ -1,116 +0,0 @@ -package directory - -import ( - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" - ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" -) - -// DeletedItemsItemCheckMemberGroupsPostRequestBody -type DeletedItemsItemCheckMemberGroupsPostRequestBody struct { - // Stores model information. - backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore -} -// NewDeletedItemsItemCheckMemberGroupsPostRequestBody instantiates a new DeletedItemsItemCheckMemberGroupsPostRequestBody and sets the default values. -func NewDeletedItemsItemCheckMemberGroupsPostRequestBody()(*DeletedItemsItemCheckMemberGroupsPostRequestBody) { - m := &DeletedItemsItemCheckMemberGroupsPostRequestBody{ - } - m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); - m.SetAdditionalData(make(map[string]any)) - return m -} -// CreateDeletedItemsItemCheckMemberGroupsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value -func CreateDeletedItemsItemCheckMemberGroupsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewDeletedItemsItemCheckMemberGroupsPostRequestBody(), nil -} -// GetAdditionalData gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. -func (m *DeletedItemsItemCheckMemberGroupsPostRequestBody) GetAdditionalData()(map[string]any) { - val , err := m.backingStore.Get("additionalData") - if err != nil { - panic(err) - } - if val == nil { - var value = make(map[string]any); - m.SetAdditionalData(value); - } - return val.(map[string]any) -} -// GetBackingStore gets the backingStore property value. Stores model information. -func (m *DeletedItemsItemCheckMemberGroupsPostRequestBody) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { - return m.backingStore -} -// GetFieldDeserializers the deserialization information for the current model -func (m *DeletedItemsItemCheckMemberGroupsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) - res["groupIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfPrimitiveValues("string") - if err != nil { - return err - } - if val != nil { - res := make([]string, len(val)) - for i, v := range val { - if v != nil { - res[i] = *(v.(*string)) - } - } - m.SetGroupIds(res) - } - return nil - } - return res -} -// GetGroupIds gets the groupIds property value. The groupIds property -func (m *DeletedItemsItemCheckMemberGroupsPostRequestBody) GetGroupIds()([]string) { - val, err := m.GetBackingStore().Get("groupIds") - if err != nil { - panic(err) - } - if val != nil { - return val.([]string) - } - return nil -} -// Serialize serializes information the current object -func (m *DeletedItemsItemCheckMemberGroupsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - if m.GetGroupIds() != nil { - err := writer.WriteCollectionOfStringValues("groupIds", m.GetGroupIds()) - if err != nil { - return err - } - } - { - err := writer.WriteAdditionalData(m.GetAdditionalData()) - if err != nil { - return err - } - } - return nil -} -// SetAdditionalData sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. -func (m *DeletedItemsItemCheckMemberGroupsPostRequestBody) SetAdditionalData(value map[string]any)() { - err := m.GetBackingStore().Set("additionalData", value) - if err != nil { - panic(err) - } -} -// SetBackingStore sets the backingStore property value. Stores model information. -func (m *DeletedItemsItemCheckMemberGroupsPostRequestBody) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { - m.backingStore = value -} -// SetGroupIds sets the groupIds property value. The groupIds property -func (m *DeletedItemsItemCheckMemberGroupsPostRequestBody) SetGroupIds(value []string)() { - err := m.GetBackingStore().Set("groupIds", value) - if err != nil { - panic(err) - } -} -// DeletedItemsItemCheckMemberGroupsPostRequestBodyable -type DeletedItemsItemCheckMemberGroupsPostRequestBodyable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder - ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) - GetGroupIds()([]string) - SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() - SetGroupIds(value []string)() -} diff --git a/directory/deleted_items_item_check_member_groups_request_builder.go b/directory/deleted_items_item_check_member_groups_request_builder.go deleted file mode 100644 index 110a8fb74c1..00000000000 --- a/directory/deleted_items_item_check_member_groups_request_builder.go +++ /dev/null @@ -1,75 +0,0 @@ -package directory - -import ( - "context" - i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" - i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" -) - -// DeletedItemsItemCheckMemberGroupsRequestBuilder provides operations to call the checkMemberGroups method. -type DeletedItemsItemCheckMemberGroupsRequestBuilder struct { - i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder -} -// DeletedItemsItemCheckMemberGroupsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. -type DeletedItemsItemCheckMemberGroupsRequestBuilderPostRequestConfiguration struct { - // Request headers - Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders - // Request options - Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption -} -// NewDeletedItemsItemCheckMemberGroupsRequestBuilderInternal instantiates a new CheckMemberGroupsRequestBuilder and sets the default values. -func NewDeletedItemsItemCheckMemberGroupsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*DeletedItemsItemCheckMemberGroupsRequestBuilder) { - m := &DeletedItemsItemCheckMemberGroupsRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/directory/deletedItems/{directoryObject%2Did}/checkMemberGroups", pathParameters), - } - return m -} -// NewDeletedItemsItemCheckMemberGroupsRequestBuilder instantiates a new CheckMemberGroupsRequestBuilder and sets the default values. -func NewDeletedItemsItemCheckMemberGroupsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*DeletedItemsItemCheckMemberGroupsRequestBuilder) { - urlParams := make(map[string]string) - urlParams["request-raw-url"] = rawUrl - return NewDeletedItemsItemCheckMemberGroupsRequestBuilderInternal(urlParams, requestAdapter) -} -// Post 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. -// [Find more info here] -// -// [Find more info here]: https://learn.microsoft.com/graph/api/directoryobject-checkmembergroups?view=graph-rest-1.0 -func (m *DeletedItemsItemCheckMemberGroupsRequestBuilder) Post(ctx context.Context, body DeletedItemsItemCheckMemberGroupsPostRequestBodyable, requestConfiguration *DeletedItemsItemCheckMemberGroupsRequestBuilderPostRequestConfiguration)(DeletedItemsItemCheckMemberGroupsResponseable, error) { - requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); - if err != nil { - return nil, err - } - errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { - "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, - "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, - } - res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateDeletedItemsItemCheckMemberGroupsResponseFromDiscriminatorValue, errorMapping) - if err != nil { - return nil, err - } - if res == nil { - return nil, nil - } - return res.(DeletedItemsItemCheckMemberGroupsResponseable), nil -} -// ToPostRequestInformation 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. -func (m *DeletedItemsItemCheckMemberGroupsRequestBuilder) ToPostRequestInformation(ctx context.Context, body DeletedItemsItemCheckMemberGroupsPostRequestBodyable, requestConfiguration *DeletedItemsItemCheckMemberGroupsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() - requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate - requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters - requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST - requestInfo.Headers.Add("Accept", "application/json") - err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) - if err != nil { - return nil, err - } - if requestConfiguration != nil { - requestInfo.Headers.AddAll(requestConfiguration.Headers) - requestInfo.AddRequestOptions(requestConfiguration.Options) - } - return requestInfo, nil -} -// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. -func (m *DeletedItemsItemCheckMemberGroupsRequestBuilder) WithUrl(rawUrl string)(*DeletedItemsItemCheckMemberGroupsRequestBuilder) { - return NewDeletedItemsItemCheckMemberGroupsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); -} diff --git a/directory/deleted_items_item_check_member_groups_response.go b/directory/deleted_items_item_check_member_groups_response.go deleted file mode 100644 index 166425219e8..00000000000 --- a/directory/deleted_items_item_check_member_groups_response.go +++ /dev/null @@ -1,82 +0,0 @@ -package directory - -import ( - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" - ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" -) - -// DeletedItemsItemCheckMemberGroupsResponse -type DeletedItemsItemCheckMemberGroupsResponse struct { - ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BaseCollectionPaginationCountResponse -} -// NewDeletedItemsItemCheckMemberGroupsResponse instantiates a new DeletedItemsItemCheckMemberGroupsResponse and sets the default values. -func NewDeletedItemsItemCheckMemberGroupsResponse()(*DeletedItemsItemCheckMemberGroupsResponse) { - m := &DeletedItemsItemCheckMemberGroupsResponse{ - BaseCollectionPaginationCountResponse: *ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.NewBaseCollectionPaginationCountResponse(), - } - return m -} -// CreateDeletedItemsItemCheckMemberGroupsResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value -func CreateDeletedItemsItemCheckMemberGroupsResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewDeletedItemsItemCheckMemberGroupsResponse(), nil -} -// GetFieldDeserializers the deserialization information for the current model -func (m *DeletedItemsItemCheckMemberGroupsResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() - res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfPrimitiveValues("string") - if err != nil { - return err - } - if val != nil { - res := make([]string, len(val)) - for i, v := range val { - if v != nil { - res[i] = *(v.(*string)) - } - } - m.SetValue(res) - } - return nil - } - return res -} -// GetValue gets the value property value. The value property -func (m *DeletedItemsItemCheckMemberGroupsResponse) GetValue()([]string) { - val, err := m.GetBackingStore().Get("value") - if err != nil { - panic(err) - } - if val != nil { - return val.([]string) - } - return nil -} -// Serialize serializes information the current object -func (m *DeletedItemsItemCheckMemberGroupsResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - err := m.BaseCollectionPaginationCountResponse.Serialize(writer) - if err != nil { - return err - } - if m.GetValue() != nil { - err = writer.WriteCollectionOfStringValues("value", m.GetValue()) - if err != nil { - return err - } - } - return nil -} -// SetValue sets the value property value. The value property -func (m *DeletedItemsItemCheckMemberGroupsResponse) SetValue(value []string)() { - err := m.GetBackingStore().Set("value", value) - if err != nil { - panic(err) - } -} -// DeletedItemsItemCheckMemberGroupsResponseable -type DeletedItemsItemCheckMemberGroupsResponseable interface { - ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BaseCollectionPaginationCountResponseable - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetValue()([]string) - SetValue(value []string)() -} diff --git a/directory/deleted_items_item_check_member_objects_post_request_body.go b/directory/deleted_items_item_check_member_objects_post_request_body.go deleted file mode 100644 index e33eee666b9..00000000000 --- a/directory/deleted_items_item_check_member_objects_post_request_body.go +++ /dev/null @@ -1,116 +0,0 @@ -package directory - -import ( - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" - ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" -) - -// DeletedItemsItemCheckMemberObjectsPostRequestBody -type DeletedItemsItemCheckMemberObjectsPostRequestBody struct { - // Stores model information. - backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore -} -// NewDeletedItemsItemCheckMemberObjectsPostRequestBody instantiates a new DeletedItemsItemCheckMemberObjectsPostRequestBody and sets the default values. -func NewDeletedItemsItemCheckMemberObjectsPostRequestBody()(*DeletedItemsItemCheckMemberObjectsPostRequestBody) { - m := &DeletedItemsItemCheckMemberObjectsPostRequestBody{ - } - m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); - m.SetAdditionalData(make(map[string]any)) - return m -} -// CreateDeletedItemsItemCheckMemberObjectsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value -func CreateDeletedItemsItemCheckMemberObjectsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewDeletedItemsItemCheckMemberObjectsPostRequestBody(), nil -} -// GetAdditionalData gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. -func (m *DeletedItemsItemCheckMemberObjectsPostRequestBody) GetAdditionalData()(map[string]any) { - val , err := m.backingStore.Get("additionalData") - if err != nil { - panic(err) - } - if val == nil { - var value = make(map[string]any); - m.SetAdditionalData(value); - } - return val.(map[string]any) -} -// GetBackingStore gets the backingStore property value. Stores model information. -func (m *DeletedItemsItemCheckMemberObjectsPostRequestBody) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { - return m.backingStore -} -// GetFieldDeserializers the deserialization information for the current model -func (m *DeletedItemsItemCheckMemberObjectsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) - res["ids"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfPrimitiveValues("string") - if err != nil { - return err - } - if val != nil { - res := make([]string, len(val)) - for i, v := range val { - if v != nil { - res[i] = *(v.(*string)) - } - } - m.SetIds(res) - } - return nil - } - return res -} -// GetIds gets the ids property value. The ids property -func (m *DeletedItemsItemCheckMemberObjectsPostRequestBody) GetIds()([]string) { - val, err := m.GetBackingStore().Get("ids") - if err != nil { - panic(err) - } - if val != nil { - return val.([]string) - } - return nil -} -// Serialize serializes information the current object -func (m *DeletedItemsItemCheckMemberObjectsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - if m.GetIds() != nil { - err := writer.WriteCollectionOfStringValues("ids", m.GetIds()) - if err != nil { - return err - } - } - { - err := writer.WriteAdditionalData(m.GetAdditionalData()) - if err != nil { - return err - } - } - return nil -} -// SetAdditionalData sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. -func (m *DeletedItemsItemCheckMemberObjectsPostRequestBody) SetAdditionalData(value map[string]any)() { - err := m.GetBackingStore().Set("additionalData", value) - if err != nil { - panic(err) - } -} -// SetBackingStore sets the backingStore property value. Stores model information. -func (m *DeletedItemsItemCheckMemberObjectsPostRequestBody) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { - m.backingStore = value -} -// SetIds sets the ids property value. The ids property -func (m *DeletedItemsItemCheckMemberObjectsPostRequestBody) SetIds(value []string)() { - err := m.GetBackingStore().Set("ids", value) - if err != nil { - panic(err) - } -} -// DeletedItemsItemCheckMemberObjectsPostRequestBodyable -type DeletedItemsItemCheckMemberObjectsPostRequestBodyable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder - ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) - GetIds()([]string) - SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() - SetIds(value []string)() -} diff --git a/directory/deleted_items_item_check_member_objects_request_builder.go b/directory/deleted_items_item_check_member_objects_request_builder.go deleted file mode 100644 index 3cff305b9ab..00000000000 --- a/directory/deleted_items_item_check_member_objects_request_builder.go +++ /dev/null @@ -1,72 +0,0 @@ -package directory - -import ( - "context" - i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" - i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" -) - -// DeletedItemsItemCheckMemberObjectsRequestBuilder provides operations to call the checkMemberObjects method. -type DeletedItemsItemCheckMemberObjectsRequestBuilder struct { - i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder -} -// DeletedItemsItemCheckMemberObjectsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. -type DeletedItemsItemCheckMemberObjectsRequestBuilderPostRequestConfiguration struct { - // Request headers - Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders - // Request options - Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption -} -// NewDeletedItemsItemCheckMemberObjectsRequestBuilderInternal instantiates a new CheckMemberObjectsRequestBuilder and sets the default values. -func NewDeletedItemsItemCheckMemberObjectsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*DeletedItemsItemCheckMemberObjectsRequestBuilder) { - m := &DeletedItemsItemCheckMemberObjectsRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/directory/deletedItems/{directoryObject%2Did}/checkMemberObjects", pathParameters), - } - return m -} -// NewDeletedItemsItemCheckMemberObjectsRequestBuilder instantiates a new CheckMemberObjectsRequestBuilder and sets the default values. -func NewDeletedItemsItemCheckMemberObjectsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*DeletedItemsItemCheckMemberObjectsRequestBuilder) { - urlParams := make(map[string]string) - urlParams["request-raw-url"] = rawUrl - return NewDeletedItemsItemCheckMemberObjectsRequestBuilderInternal(urlParams, requestAdapter) -} -// Post invoke action checkMemberObjects -func (m *DeletedItemsItemCheckMemberObjectsRequestBuilder) Post(ctx context.Context, body DeletedItemsItemCheckMemberObjectsPostRequestBodyable, requestConfiguration *DeletedItemsItemCheckMemberObjectsRequestBuilderPostRequestConfiguration)(DeletedItemsItemCheckMemberObjectsResponseable, error) { - requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); - if err != nil { - return nil, err - } - errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { - "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, - "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, - } - res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateDeletedItemsItemCheckMemberObjectsResponseFromDiscriminatorValue, errorMapping) - if err != nil { - return nil, err - } - if res == nil { - return nil, nil - } - return res.(DeletedItemsItemCheckMemberObjectsResponseable), nil -} -// ToPostRequestInformation invoke action checkMemberObjects -func (m *DeletedItemsItemCheckMemberObjectsRequestBuilder) ToPostRequestInformation(ctx context.Context, body DeletedItemsItemCheckMemberObjectsPostRequestBodyable, requestConfiguration *DeletedItemsItemCheckMemberObjectsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() - requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate - requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters - requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST - requestInfo.Headers.Add("Accept", "application/json") - err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) - if err != nil { - return nil, err - } - if requestConfiguration != nil { - requestInfo.Headers.AddAll(requestConfiguration.Headers) - requestInfo.AddRequestOptions(requestConfiguration.Options) - } - return requestInfo, nil -} -// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. -func (m *DeletedItemsItemCheckMemberObjectsRequestBuilder) WithUrl(rawUrl string)(*DeletedItemsItemCheckMemberObjectsRequestBuilder) { - return NewDeletedItemsItemCheckMemberObjectsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); -} diff --git a/directory/deleted_items_item_check_member_objects_response.go b/directory/deleted_items_item_check_member_objects_response.go deleted file mode 100644 index 1f4a7c1aae5..00000000000 --- a/directory/deleted_items_item_check_member_objects_response.go +++ /dev/null @@ -1,82 +0,0 @@ -package directory - -import ( - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" - ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" -) - -// DeletedItemsItemCheckMemberObjectsResponse -type DeletedItemsItemCheckMemberObjectsResponse struct { - ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BaseCollectionPaginationCountResponse -} -// NewDeletedItemsItemCheckMemberObjectsResponse instantiates a new DeletedItemsItemCheckMemberObjectsResponse and sets the default values. -func NewDeletedItemsItemCheckMemberObjectsResponse()(*DeletedItemsItemCheckMemberObjectsResponse) { - m := &DeletedItemsItemCheckMemberObjectsResponse{ - BaseCollectionPaginationCountResponse: *ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.NewBaseCollectionPaginationCountResponse(), - } - return m -} -// CreateDeletedItemsItemCheckMemberObjectsResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value -func CreateDeletedItemsItemCheckMemberObjectsResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewDeletedItemsItemCheckMemberObjectsResponse(), nil -} -// GetFieldDeserializers the deserialization information for the current model -func (m *DeletedItemsItemCheckMemberObjectsResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() - res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfPrimitiveValues("string") - if err != nil { - return err - } - if val != nil { - res := make([]string, len(val)) - for i, v := range val { - if v != nil { - res[i] = *(v.(*string)) - } - } - m.SetValue(res) - } - return nil - } - return res -} -// GetValue gets the value property value. The value property -func (m *DeletedItemsItemCheckMemberObjectsResponse) GetValue()([]string) { - val, err := m.GetBackingStore().Get("value") - if err != nil { - panic(err) - } - if val != nil { - return val.([]string) - } - return nil -} -// Serialize serializes information the current object -func (m *DeletedItemsItemCheckMemberObjectsResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - err := m.BaseCollectionPaginationCountResponse.Serialize(writer) - if err != nil { - return err - } - if m.GetValue() != nil { - err = writer.WriteCollectionOfStringValues("value", m.GetValue()) - if err != nil { - return err - } - } - return nil -} -// SetValue sets the value property value. The value property -func (m *DeletedItemsItemCheckMemberObjectsResponse) SetValue(value []string)() { - err := m.GetBackingStore().Set("value", value) - if err != nil { - panic(err) - } -} -// DeletedItemsItemCheckMemberObjectsResponseable -type DeletedItemsItemCheckMemberObjectsResponseable interface { - ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BaseCollectionPaginationCountResponseable - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetValue()([]string) - SetValue(value []string)() -} diff --git a/directory/deleted_items_item_get_member_groups_post_request_body.go b/directory/deleted_items_item_get_member_groups_post_request_body.go deleted file mode 100644 index d34aca1998a..00000000000 --- a/directory/deleted_items_item_get_member_groups_post_request_body.go +++ /dev/null @@ -1,110 +0,0 @@ -package directory - -import ( - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" - ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" -) - -// DeletedItemsItemGetMemberGroupsPostRequestBody -type DeletedItemsItemGetMemberGroupsPostRequestBody struct { - // Stores model information. - backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore -} -// NewDeletedItemsItemGetMemberGroupsPostRequestBody instantiates a new DeletedItemsItemGetMemberGroupsPostRequestBody and sets the default values. -func NewDeletedItemsItemGetMemberGroupsPostRequestBody()(*DeletedItemsItemGetMemberGroupsPostRequestBody) { - m := &DeletedItemsItemGetMemberGroupsPostRequestBody{ - } - m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); - m.SetAdditionalData(make(map[string]any)) - return m -} -// CreateDeletedItemsItemGetMemberGroupsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value -func CreateDeletedItemsItemGetMemberGroupsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewDeletedItemsItemGetMemberGroupsPostRequestBody(), nil -} -// GetAdditionalData gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. -func (m *DeletedItemsItemGetMemberGroupsPostRequestBody) GetAdditionalData()(map[string]any) { - val , err := m.backingStore.Get("additionalData") - if err != nil { - panic(err) - } - if val == nil { - var value = make(map[string]any); - m.SetAdditionalData(value); - } - return val.(map[string]any) -} -// GetBackingStore gets the backingStore property value. Stores model information. -func (m *DeletedItemsItemGetMemberGroupsPostRequestBody) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { - return m.backingStore -} -// GetFieldDeserializers the deserialization information for the current model -func (m *DeletedItemsItemGetMemberGroupsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) - res["securityEnabledOnly"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetBoolValue() - if err != nil { - return err - } - if val != nil { - m.SetSecurityEnabledOnly(val) - } - return nil - } - return res -} -// GetSecurityEnabledOnly gets the securityEnabledOnly property value. The securityEnabledOnly property -func (m *DeletedItemsItemGetMemberGroupsPostRequestBody) GetSecurityEnabledOnly()(*bool) { - val, err := m.GetBackingStore().Get("securityEnabledOnly") - if err != nil { - panic(err) - } - if val != nil { - return val.(*bool) - } - return nil -} -// Serialize serializes information the current object -func (m *DeletedItemsItemGetMemberGroupsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - { - err := writer.WriteBoolValue("securityEnabledOnly", m.GetSecurityEnabledOnly()) - if err != nil { - return err - } - } - { - err := writer.WriteAdditionalData(m.GetAdditionalData()) - if err != nil { - return err - } - } - return nil -} -// SetAdditionalData sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. -func (m *DeletedItemsItemGetMemberGroupsPostRequestBody) SetAdditionalData(value map[string]any)() { - err := m.GetBackingStore().Set("additionalData", value) - if err != nil { - panic(err) - } -} -// SetBackingStore sets the backingStore property value. Stores model information. -func (m *DeletedItemsItemGetMemberGroupsPostRequestBody) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { - m.backingStore = value -} -// SetSecurityEnabledOnly sets the securityEnabledOnly property value. The securityEnabledOnly property -func (m *DeletedItemsItemGetMemberGroupsPostRequestBody) SetSecurityEnabledOnly(value *bool)() { - err := m.GetBackingStore().Set("securityEnabledOnly", value) - if err != nil { - panic(err) - } -} -// DeletedItemsItemGetMemberGroupsPostRequestBodyable -type DeletedItemsItemGetMemberGroupsPostRequestBodyable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder - ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) - GetSecurityEnabledOnly()(*bool) - SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() - SetSecurityEnabledOnly(value *bool)() -} diff --git a/directory/deleted_items_item_get_member_groups_request_builder.go b/directory/deleted_items_item_get_member_groups_request_builder.go deleted file mode 100644 index 6eccf210d7d..00000000000 --- a/directory/deleted_items_item_get_member_groups_request_builder.go +++ /dev/null @@ -1,75 +0,0 @@ -package directory - -import ( - "context" - i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" - i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" -) - -// DeletedItemsItemGetMemberGroupsRequestBuilder provides operations to call the getMemberGroups method. -type DeletedItemsItemGetMemberGroupsRequestBuilder struct { - i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder -} -// DeletedItemsItemGetMemberGroupsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. -type DeletedItemsItemGetMemberGroupsRequestBuilderPostRequestConfiguration struct { - // Request headers - Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders - // Request options - Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption -} -// NewDeletedItemsItemGetMemberGroupsRequestBuilderInternal instantiates a new GetMemberGroupsRequestBuilder and sets the default values. -func NewDeletedItemsItemGetMemberGroupsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*DeletedItemsItemGetMemberGroupsRequestBuilder) { - m := &DeletedItemsItemGetMemberGroupsRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/directory/deletedItems/{directoryObject%2Did}/getMemberGroups", pathParameters), - } - return m -} -// NewDeletedItemsItemGetMemberGroupsRequestBuilder instantiates a new GetMemberGroupsRequestBuilder and sets the default values. -func NewDeletedItemsItemGetMemberGroupsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*DeletedItemsItemGetMemberGroupsRequestBuilder) { - urlParams := make(map[string]string) - urlParams["request-raw-url"] = rawUrl - return NewDeletedItemsItemGetMemberGroupsRequestBuilderInternal(urlParams, requestAdapter) -} -// Post 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. -// [Find more info here] -// -// [Find more info here]: https://learn.microsoft.com/graph/api/directoryobject-getmembergroups?view=graph-rest-1.0 -func (m *DeletedItemsItemGetMemberGroupsRequestBuilder) Post(ctx context.Context, body DeletedItemsItemGetMemberGroupsPostRequestBodyable, requestConfiguration *DeletedItemsItemGetMemberGroupsRequestBuilderPostRequestConfiguration)(DeletedItemsItemGetMemberGroupsResponseable, error) { - requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); - if err != nil { - return nil, err - } - errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { - "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, - "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, - } - res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateDeletedItemsItemGetMemberGroupsResponseFromDiscriminatorValue, errorMapping) - if err != nil { - return nil, err - } - if res == nil { - return nil, nil - } - return res.(DeletedItemsItemGetMemberGroupsResponseable), nil -} -// ToPostRequestInformation 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. -func (m *DeletedItemsItemGetMemberGroupsRequestBuilder) ToPostRequestInformation(ctx context.Context, body DeletedItemsItemGetMemberGroupsPostRequestBodyable, requestConfiguration *DeletedItemsItemGetMemberGroupsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() - requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate - requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters - requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST - requestInfo.Headers.Add("Accept", "application/json") - err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) - if err != nil { - return nil, err - } - if requestConfiguration != nil { - requestInfo.Headers.AddAll(requestConfiguration.Headers) - requestInfo.AddRequestOptions(requestConfiguration.Options) - } - return requestInfo, nil -} -// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. -func (m *DeletedItemsItemGetMemberGroupsRequestBuilder) WithUrl(rawUrl string)(*DeletedItemsItemGetMemberGroupsRequestBuilder) { - return NewDeletedItemsItemGetMemberGroupsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); -} diff --git a/directory/deleted_items_item_get_member_groups_response.go b/directory/deleted_items_item_get_member_groups_response.go deleted file mode 100644 index dbe46462c4d..00000000000 --- a/directory/deleted_items_item_get_member_groups_response.go +++ /dev/null @@ -1,82 +0,0 @@ -package directory - -import ( - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" - ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" -) - -// DeletedItemsItemGetMemberGroupsResponse -type DeletedItemsItemGetMemberGroupsResponse struct { - ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BaseCollectionPaginationCountResponse -} -// NewDeletedItemsItemGetMemberGroupsResponse instantiates a new DeletedItemsItemGetMemberGroupsResponse and sets the default values. -func NewDeletedItemsItemGetMemberGroupsResponse()(*DeletedItemsItemGetMemberGroupsResponse) { - m := &DeletedItemsItemGetMemberGroupsResponse{ - BaseCollectionPaginationCountResponse: *ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.NewBaseCollectionPaginationCountResponse(), - } - return m -} -// CreateDeletedItemsItemGetMemberGroupsResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value -func CreateDeletedItemsItemGetMemberGroupsResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewDeletedItemsItemGetMemberGroupsResponse(), nil -} -// GetFieldDeserializers the deserialization information for the current model -func (m *DeletedItemsItemGetMemberGroupsResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() - res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfPrimitiveValues("string") - if err != nil { - return err - } - if val != nil { - res := make([]string, len(val)) - for i, v := range val { - if v != nil { - res[i] = *(v.(*string)) - } - } - m.SetValue(res) - } - return nil - } - return res -} -// GetValue gets the value property value. The value property -func (m *DeletedItemsItemGetMemberGroupsResponse) GetValue()([]string) { - val, err := m.GetBackingStore().Get("value") - if err != nil { - panic(err) - } - if val != nil { - return val.([]string) - } - return nil -} -// Serialize serializes information the current object -func (m *DeletedItemsItemGetMemberGroupsResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - err := m.BaseCollectionPaginationCountResponse.Serialize(writer) - if err != nil { - return err - } - if m.GetValue() != nil { - err = writer.WriteCollectionOfStringValues("value", m.GetValue()) - if err != nil { - return err - } - } - return nil -} -// SetValue sets the value property value. The value property -func (m *DeletedItemsItemGetMemberGroupsResponse) SetValue(value []string)() { - err := m.GetBackingStore().Set("value", value) - if err != nil { - panic(err) - } -} -// DeletedItemsItemGetMemberGroupsResponseable -type DeletedItemsItemGetMemberGroupsResponseable interface { - ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BaseCollectionPaginationCountResponseable - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetValue()([]string) - SetValue(value []string)() -} diff --git a/directory/deleted_items_item_get_member_objects_post_request_body.go b/directory/deleted_items_item_get_member_objects_post_request_body.go deleted file mode 100644 index 0a92e42aacd..00000000000 --- a/directory/deleted_items_item_get_member_objects_post_request_body.go +++ /dev/null @@ -1,110 +0,0 @@ -package directory - -import ( - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" - ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" -) - -// DeletedItemsItemGetMemberObjectsPostRequestBody -type DeletedItemsItemGetMemberObjectsPostRequestBody struct { - // Stores model information. - backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore -} -// NewDeletedItemsItemGetMemberObjectsPostRequestBody instantiates a new DeletedItemsItemGetMemberObjectsPostRequestBody and sets the default values. -func NewDeletedItemsItemGetMemberObjectsPostRequestBody()(*DeletedItemsItemGetMemberObjectsPostRequestBody) { - m := &DeletedItemsItemGetMemberObjectsPostRequestBody{ - } - m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); - m.SetAdditionalData(make(map[string]any)) - return m -} -// CreateDeletedItemsItemGetMemberObjectsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value -func CreateDeletedItemsItemGetMemberObjectsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewDeletedItemsItemGetMemberObjectsPostRequestBody(), nil -} -// GetAdditionalData gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. -func (m *DeletedItemsItemGetMemberObjectsPostRequestBody) GetAdditionalData()(map[string]any) { - val , err := m.backingStore.Get("additionalData") - if err != nil { - panic(err) - } - if val == nil { - var value = make(map[string]any); - m.SetAdditionalData(value); - } - return val.(map[string]any) -} -// GetBackingStore gets the backingStore property value. Stores model information. -func (m *DeletedItemsItemGetMemberObjectsPostRequestBody) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { - return m.backingStore -} -// GetFieldDeserializers the deserialization information for the current model -func (m *DeletedItemsItemGetMemberObjectsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) - res["securityEnabledOnly"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetBoolValue() - if err != nil { - return err - } - if val != nil { - m.SetSecurityEnabledOnly(val) - } - return nil - } - return res -} -// GetSecurityEnabledOnly gets the securityEnabledOnly property value. The securityEnabledOnly property -func (m *DeletedItemsItemGetMemberObjectsPostRequestBody) GetSecurityEnabledOnly()(*bool) { - val, err := m.GetBackingStore().Get("securityEnabledOnly") - if err != nil { - panic(err) - } - if val != nil { - return val.(*bool) - } - return nil -} -// Serialize serializes information the current object -func (m *DeletedItemsItemGetMemberObjectsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - { - err := writer.WriteBoolValue("securityEnabledOnly", m.GetSecurityEnabledOnly()) - if err != nil { - return err - } - } - { - err := writer.WriteAdditionalData(m.GetAdditionalData()) - if err != nil { - return err - } - } - return nil -} -// SetAdditionalData sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. -func (m *DeletedItemsItemGetMemberObjectsPostRequestBody) SetAdditionalData(value map[string]any)() { - err := m.GetBackingStore().Set("additionalData", value) - if err != nil { - panic(err) - } -} -// SetBackingStore sets the backingStore property value. Stores model information. -func (m *DeletedItemsItemGetMemberObjectsPostRequestBody) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { - m.backingStore = value -} -// SetSecurityEnabledOnly sets the securityEnabledOnly property value. The securityEnabledOnly property -func (m *DeletedItemsItemGetMemberObjectsPostRequestBody) SetSecurityEnabledOnly(value *bool)() { - err := m.GetBackingStore().Set("securityEnabledOnly", value) - if err != nil { - panic(err) - } -} -// DeletedItemsItemGetMemberObjectsPostRequestBodyable -type DeletedItemsItemGetMemberObjectsPostRequestBodyable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder - ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) - GetSecurityEnabledOnly()(*bool) - SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() - SetSecurityEnabledOnly(value *bool)() -} diff --git a/directory/deleted_items_item_get_member_objects_request_builder.go b/directory/deleted_items_item_get_member_objects_request_builder.go deleted file mode 100644 index 39faa794965..00000000000 --- a/directory/deleted_items_item_get_member_objects_request_builder.go +++ /dev/null @@ -1,72 +0,0 @@ -package directory - -import ( - "context" - i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" - i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" -) - -// DeletedItemsItemGetMemberObjectsRequestBuilder provides operations to call the getMemberObjects method. -type DeletedItemsItemGetMemberObjectsRequestBuilder struct { - i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder -} -// DeletedItemsItemGetMemberObjectsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. -type DeletedItemsItemGetMemberObjectsRequestBuilderPostRequestConfiguration struct { - // Request headers - Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders - // Request options - Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption -} -// NewDeletedItemsItemGetMemberObjectsRequestBuilderInternal instantiates a new GetMemberObjectsRequestBuilder and sets the default values. -func NewDeletedItemsItemGetMemberObjectsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*DeletedItemsItemGetMemberObjectsRequestBuilder) { - m := &DeletedItemsItemGetMemberObjectsRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/directory/deletedItems/{directoryObject%2Did}/getMemberObjects", pathParameters), - } - return m -} -// NewDeletedItemsItemGetMemberObjectsRequestBuilder instantiates a new GetMemberObjectsRequestBuilder and sets the default values. -func NewDeletedItemsItemGetMemberObjectsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*DeletedItemsItemGetMemberObjectsRequestBuilder) { - urlParams := make(map[string]string) - urlParams["request-raw-url"] = rawUrl - return NewDeletedItemsItemGetMemberObjectsRequestBuilderInternal(urlParams, requestAdapter) -} -// Post invoke action getMemberObjects -func (m *DeletedItemsItemGetMemberObjectsRequestBuilder) Post(ctx context.Context, body DeletedItemsItemGetMemberObjectsPostRequestBodyable, requestConfiguration *DeletedItemsItemGetMemberObjectsRequestBuilderPostRequestConfiguration)(DeletedItemsItemGetMemberObjectsResponseable, error) { - requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); - if err != nil { - return nil, err - } - errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { - "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, - "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, - } - res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateDeletedItemsItemGetMemberObjectsResponseFromDiscriminatorValue, errorMapping) - if err != nil { - return nil, err - } - if res == nil { - return nil, nil - } - return res.(DeletedItemsItemGetMemberObjectsResponseable), nil -} -// ToPostRequestInformation invoke action getMemberObjects -func (m *DeletedItemsItemGetMemberObjectsRequestBuilder) ToPostRequestInformation(ctx context.Context, body DeletedItemsItemGetMemberObjectsPostRequestBodyable, requestConfiguration *DeletedItemsItemGetMemberObjectsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() - requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate - requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters - requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST - requestInfo.Headers.Add("Accept", "application/json") - err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) - if err != nil { - return nil, err - } - if requestConfiguration != nil { - requestInfo.Headers.AddAll(requestConfiguration.Headers) - requestInfo.AddRequestOptions(requestConfiguration.Options) - } - return requestInfo, nil -} -// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. -func (m *DeletedItemsItemGetMemberObjectsRequestBuilder) WithUrl(rawUrl string)(*DeletedItemsItemGetMemberObjectsRequestBuilder) { - return NewDeletedItemsItemGetMemberObjectsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); -} diff --git a/directory/deleted_items_item_get_member_objects_response.go b/directory/deleted_items_item_get_member_objects_response.go deleted file mode 100644 index 1ee419dac96..00000000000 --- a/directory/deleted_items_item_get_member_objects_response.go +++ /dev/null @@ -1,82 +0,0 @@ -package directory - -import ( - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" - ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" -) - -// DeletedItemsItemGetMemberObjectsResponse -type DeletedItemsItemGetMemberObjectsResponse struct { - ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BaseCollectionPaginationCountResponse -} -// NewDeletedItemsItemGetMemberObjectsResponse instantiates a new DeletedItemsItemGetMemberObjectsResponse and sets the default values. -func NewDeletedItemsItemGetMemberObjectsResponse()(*DeletedItemsItemGetMemberObjectsResponse) { - m := &DeletedItemsItemGetMemberObjectsResponse{ - BaseCollectionPaginationCountResponse: *ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.NewBaseCollectionPaginationCountResponse(), - } - return m -} -// CreateDeletedItemsItemGetMemberObjectsResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value -func CreateDeletedItemsItemGetMemberObjectsResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewDeletedItemsItemGetMemberObjectsResponse(), nil -} -// GetFieldDeserializers the deserialization information for the current model -func (m *DeletedItemsItemGetMemberObjectsResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() - res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfPrimitiveValues("string") - if err != nil { - return err - } - if val != nil { - res := make([]string, len(val)) - for i, v := range val { - if v != nil { - res[i] = *(v.(*string)) - } - } - m.SetValue(res) - } - return nil - } - return res -} -// GetValue gets the value property value. The value property -func (m *DeletedItemsItemGetMemberObjectsResponse) GetValue()([]string) { - val, err := m.GetBackingStore().Get("value") - if err != nil { - panic(err) - } - if val != nil { - return val.([]string) - } - return nil -} -// Serialize serializes information the current object -func (m *DeletedItemsItemGetMemberObjectsResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - err := m.BaseCollectionPaginationCountResponse.Serialize(writer) - if err != nil { - return err - } - if m.GetValue() != nil { - err = writer.WriteCollectionOfStringValues("value", m.GetValue()) - if err != nil { - return err - } - } - return nil -} -// SetValue sets the value property value. The value property -func (m *DeletedItemsItemGetMemberObjectsResponse) SetValue(value []string)() { - err := m.GetBackingStore().Set("value", value) - if err != nil { - panic(err) - } -} -// DeletedItemsItemGetMemberObjectsResponseable -type DeletedItemsItemGetMemberObjectsResponseable interface { - ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BaseCollectionPaginationCountResponseable - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetValue()([]string) - SetValue(value []string)() -} diff --git a/directory/deleted_items_item_restore_request_builder.go b/directory/deleted_items_item_restore_request_builder.go deleted file mode 100644 index 0201254cca5..00000000000 --- a/directory/deleted_items_item_restore_request_builder.go +++ /dev/null @@ -1,72 +0,0 @@ -package directory - -import ( - "context" - i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" - ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" - i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" -) - -// DeletedItemsItemRestoreRequestBuilder provides operations to call the restore method. -type DeletedItemsItemRestoreRequestBuilder struct { - i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder -} -// DeletedItemsItemRestoreRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. -type DeletedItemsItemRestoreRequestBuilderPostRequestConfiguration struct { - // Request headers - Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders - // Request options - Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption -} -// NewDeletedItemsItemRestoreRequestBuilderInternal instantiates a new RestoreRequestBuilder and sets the default values. -func NewDeletedItemsItemRestoreRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*DeletedItemsItemRestoreRequestBuilder) { - m := &DeletedItemsItemRestoreRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/directory/deletedItems/{directoryObject%2Did}/restore", pathParameters), - } - return m -} -// NewDeletedItemsItemRestoreRequestBuilder instantiates a new RestoreRequestBuilder and sets the default values. -func NewDeletedItemsItemRestoreRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*DeletedItemsItemRestoreRequestBuilder) { - urlParams := make(map[string]string) - urlParams["request-raw-url"] = rawUrl - return NewDeletedItemsItemRestoreRequestBuilderInternal(urlParams, requestAdapter) -} -// Post 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. -// [Find more info here] -// -// [Find more info here]: https://learn.microsoft.com/graph/api/directory-deleteditems-restore?view=graph-rest-1.0 -func (m *DeletedItemsItemRestoreRequestBuilder) Post(ctx context.Context, requestConfiguration *DeletedItemsItemRestoreRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DirectoryObjectable, error) { - requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); - if err != nil { - return nil, err - } - errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { - "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, - "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, - } - res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateDirectoryObjectFromDiscriminatorValue, errorMapping) - if err != nil { - return nil, err - } - if res == nil { - return nil, nil - } - return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DirectoryObjectable), nil -} -// ToPostRequestInformation 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. -func (m *DeletedItemsItemRestoreRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *DeletedItemsItemRestoreRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() - requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate - requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters - requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST - requestInfo.Headers.Add("Accept", "application/json") - if requestConfiguration != nil { - requestInfo.Headers.AddAll(requestConfiguration.Headers) - requestInfo.AddRequestOptions(requestConfiguration.Options) - } - return requestInfo, nil -} -// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. -func (m *DeletedItemsItemRestoreRequestBuilder) WithUrl(rawUrl string)(*DeletedItemsItemRestoreRequestBuilder) { - return NewDeletedItemsItemRestoreRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); -} diff --git a/directory/deleted_items_request_builder.go b/directory/deleted_items_request_builder.go index 5542707108b..b91bb5db409 100644 --- a/directory/deleted_items_request_builder.go +++ b/directory/deleted_items_request_builder.go @@ -39,13 +39,6 @@ type DeletedItemsRequestBuilderGetRequestConfiguration struct { // Request query parameters QueryParameters *DeletedItemsRequestBuilderGetQueryParameters } -// DeletedItemsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. -type DeletedItemsRequestBuilderPostRequestConfiguration struct { - // Request headers - Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders - // Request options - Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption -} // ByDirectoryObjectId provides operations to manage the deletedItems property of the microsoft.graph.directory entity. func (m *DeletedItemsRequestBuilder) ByDirectoryObjectId(directoryObjectId string)(*DeletedItemsDirectoryObjectItemRequestBuilder) { urlTplParams := make(map[string]string) @@ -74,10 +67,6 @@ func NewDeletedItemsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee2 func (m *DeletedItemsRequestBuilder) Count()(*DeletedItemsCountRequestBuilder) { return NewDeletedItemsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Delta provides operations to call the delta method. -func (m *DeletedItemsRequestBuilder) Delta()(*DeletedItemsDeltaRequestBuilder) { - return NewDeletedItemsDeltaRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) -} // Get get deletedItems from directory func (m *DeletedItemsRequestBuilder) Get(ctx context.Context, requestConfiguration *DeletedItemsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DirectoryObjectCollectionResponseable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); @@ -97,14 +86,6 @@ func (m *DeletedItemsRequestBuilder) Get(ctx context.Context, requestConfigurati } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DirectoryObjectCollectionResponseable), nil } -// GetByIds provides operations to call the getByIds method. -func (m *DeletedItemsRequestBuilder) GetByIds()(*DeletedItemsGetByIdsRequestBuilder) { - return NewDeletedItemsGetByIdsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) -} -// GetUserOwnedObjects provides operations to call the getUserOwnedObjects method. -func (m *DeletedItemsRequestBuilder) GetUserOwnedObjects()(*DeletedItemsGetUserOwnedObjectsRequestBuilder) { - return NewDeletedItemsGetUserOwnedObjectsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) -} // GraphAdministrativeUnit casts the previous resource to administrativeUnit. func (m *DeletedItemsRequestBuilder) GraphAdministrativeUnit()(*DeletedItemsGraphAdministrativeUnitRequestBuilder) { return NewDeletedItemsGraphAdministrativeUnitRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) @@ -129,25 +110,6 @@ func (m *DeletedItemsRequestBuilder) GraphServicePrincipal()(*DeletedItemsGraphS func (m *DeletedItemsRequestBuilder) GraphUser()(*DeletedItemsGraphUserRequestBuilder) { return NewDeletedItemsGraphUserRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Post create new navigation property to deletedItems for directory -func (m *DeletedItemsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DirectoryObjectable, requestConfiguration *DeletedItemsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DirectoryObjectable, error) { - requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); - if err != nil { - return nil, err - } - errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { - "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, - "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, - } - res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateDirectoryObjectFromDiscriminatorValue, errorMapping) - if err != nil { - return nil, err - } - if res == nil { - return nil, nil - } - return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DirectoryObjectable), nil -} // ToGetRequestInformation get deletedItems from directory func (m *DeletedItemsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *DeletedItemsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() @@ -164,27 +126,6 @@ func (m *DeletedItemsRequestBuilder) ToGetRequestInformation(ctx context.Context } return requestInfo, nil } -// ToPostRequestInformation create new navigation property to deletedItems for directory -func (m *DeletedItemsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DirectoryObjectable, requestConfiguration *DeletedItemsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() - requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate - requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters - requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST - requestInfo.Headers.Add("Accept", "application/json") - err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) - if err != nil { - return nil, err - } - if requestConfiguration != nil { - requestInfo.Headers.AddAll(requestConfiguration.Headers) - requestInfo.AddRequestOptions(requestConfiguration.Options) - } - return requestInfo, nil -} -// ValidateProperties provides operations to call the validateProperties method. -func (m *DeletedItemsRequestBuilder) ValidateProperties()(*DeletedItemsValidatePropertiesRequestBuilder) { - return NewDeletedItemsValidatePropertiesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) -} // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. func (m *DeletedItemsRequestBuilder) WithUrl(rawUrl string)(*DeletedItemsRequestBuilder) { return NewDeletedItemsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); diff --git a/directory/deleted_items_validate_properties_post_request_body.go b/directory/deleted_items_validate_properties_post_request_body.go deleted file mode 100644 index a8172944b52..00000000000 --- a/directory/deleted_items_validate_properties_post_request_body.go +++ /dev/null @@ -1,219 +0,0 @@ -package directory - -import ( - i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" - ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" -) - -// DeletedItemsValidatePropertiesPostRequestBody -type DeletedItemsValidatePropertiesPostRequestBody struct { - // Stores model information. - backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore -} -// NewDeletedItemsValidatePropertiesPostRequestBody instantiates a new DeletedItemsValidatePropertiesPostRequestBody and sets the default values. -func NewDeletedItemsValidatePropertiesPostRequestBody()(*DeletedItemsValidatePropertiesPostRequestBody) { - m := &DeletedItemsValidatePropertiesPostRequestBody{ - } - m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); - m.SetAdditionalData(make(map[string]any)) - return m -} -// CreateDeletedItemsValidatePropertiesPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value -func CreateDeletedItemsValidatePropertiesPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewDeletedItemsValidatePropertiesPostRequestBody(), nil -} -// GetAdditionalData gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. -func (m *DeletedItemsValidatePropertiesPostRequestBody) GetAdditionalData()(map[string]any) { - val , err := m.backingStore.Get("additionalData") - if err != nil { - panic(err) - } - if val == nil { - var value = make(map[string]any); - m.SetAdditionalData(value); - } - return val.(map[string]any) -} -// GetBackingStore gets the backingStore property value. Stores model information. -func (m *DeletedItemsValidatePropertiesPostRequestBody) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { - return m.backingStore -} -// GetDisplayName gets the displayName property value. The displayName property -func (m *DeletedItemsValidatePropertiesPostRequestBody) GetDisplayName()(*string) { - val, err := m.GetBackingStore().Get("displayName") - if err != nil { - panic(err) - } - if val != nil { - return val.(*string) - } - return nil -} -// GetEntityType gets the entityType property value. The entityType property -func (m *DeletedItemsValidatePropertiesPostRequestBody) GetEntityType()(*string) { - val, err := m.GetBackingStore().Get("entityType") - if err != nil { - panic(err) - } - if val != nil { - return val.(*string) - } - return nil -} -// GetFieldDeserializers the deserialization information for the current model -func (m *DeletedItemsValidatePropertiesPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) - res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetDisplayName(val) - } - return nil - } - res["entityType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetEntityType(val) - } - return nil - } - res["mailNickname"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetMailNickname(val) - } - return nil - } - res["onBehalfOfUserId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetUUIDValue() - if err != nil { - return err - } - if val != nil { - m.SetOnBehalfOfUserId(val) - } - return nil - } - return res -} -// GetMailNickname gets the mailNickname property value. The mailNickname property -func (m *DeletedItemsValidatePropertiesPostRequestBody) GetMailNickname()(*string) { - val, err := m.GetBackingStore().Get("mailNickname") - if err != nil { - panic(err) - } - if val != nil { - return val.(*string) - } - return nil -} -// GetOnBehalfOfUserId gets the onBehalfOfUserId property value. The onBehalfOfUserId property -func (m *DeletedItemsValidatePropertiesPostRequestBody) GetOnBehalfOfUserId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { - val, err := m.GetBackingStore().Get("onBehalfOfUserId") - if err != nil { - panic(err) - } - if val != nil { - return val.(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) - } - return nil -} -// Serialize serializes information the current object -func (m *DeletedItemsValidatePropertiesPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - { - err := writer.WriteStringValue("displayName", m.GetDisplayName()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("entityType", m.GetEntityType()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("mailNickname", m.GetMailNickname()) - if err != nil { - return err - } - } - { - err := writer.WriteUUIDValue("onBehalfOfUserId", m.GetOnBehalfOfUserId()) - if err != nil { - return err - } - } - { - err := writer.WriteAdditionalData(m.GetAdditionalData()) - if err != nil { - return err - } - } - return nil -} -// SetAdditionalData sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. -func (m *DeletedItemsValidatePropertiesPostRequestBody) SetAdditionalData(value map[string]any)() { - err := m.GetBackingStore().Set("additionalData", value) - if err != nil { - panic(err) - } -} -// SetBackingStore sets the backingStore property value. Stores model information. -func (m *DeletedItemsValidatePropertiesPostRequestBody) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { - m.backingStore = value -} -// SetDisplayName sets the displayName property value. The displayName property -func (m *DeletedItemsValidatePropertiesPostRequestBody) SetDisplayName(value *string)() { - err := m.GetBackingStore().Set("displayName", value) - if err != nil { - panic(err) - } -} -// SetEntityType sets the entityType property value. The entityType property -func (m *DeletedItemsValidatePropertiesPostRequestBody) SetEntityType(value *string)() { - err := m.GetBackingStore().Set("entityType", value) - if err != nil { - panic(err) - } -} -// SetMailNickname sets the mailNickname property value. The mailNickname property -func (m *DeletedItemsValidatePropertiesPostRequestBody) SetMailNickname(value *string)() { - err := m.GetBackingStore().Set("mailNickname", value) - if err != nil { - panic(err) - } -} -// SetOnBehalfOfUserId sets the onBehalfOfUserId property value. The onBehalfOfUserId property -func (m *DeletedItemsValidatePropertiesPostRequestBody) SetOnBehalfOfUserId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { - err := m.GetBackingStore().Set("onBehalfOfUserId", value) - if err != nil { - panic(err) - } -} -// DeletedItemsValidatePropertiesPostRequestBodyable -type DeletedItemsValidatePropertiesPostRequestBodyable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder - ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) - GetDisplayName()(*string) - GetEntityType()(*string) - GetMailNickname()(*string) - GetOnBehalfOfUserId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) - SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() - SetDisplayName(value *string)() - SetEntityType(value *string)() - SetMailNickname(value *string)() - SetOnBehalfOfUserId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() -} diff --git a/directory/deleted_items_validate_properties_request_builder.go b/directory/deleted_items_validate_properties_request_builder.go deleted file mode 100644 index 6ddb8f82090..00000000000 --- a/directory/deleted_items_validate_properties_request_builder.go +++ /dev/null @@ -1,71 +0,0 @@ -package directory - -import ( - "context" - i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" - i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" -) - -// DeletedItemsValidatePropertiesRequestBuilder provides operations to call the validateProperties method. -type DeletedItemsValidatePropertiesRequestBuilder struct { - i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder -} -// DeletedItemsValidatePropertiesRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. -type DeletedItemsValidatePropertiesRequestBuilderPostRequestConfiguration struct { - // Request headers - Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders - // Request options - Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption -} -// NewDeletedItemsValidatePropertiesRequestBuilderInternal instantiates a new ValidatePropertiesRequestBuilder and sets the default values. -func NewDeletedItemsValidatePropertiesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*DeletedItemsValidatePropertiesRequestBuilder) { - m := &DeletedItemsValidatePropertiesRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/directory/deletedItems/validateProperties", pathParameters), - } - return m -} -// NewDeletedItemsValidatePropertiesRequestBuilder instantiates a new ValidatePropertiesRequestBuilder and sets the default values. -func NewDeletedItemsValidatePropertiesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*DeletedItemsValidatePropertiesRequestBuilder) { - urlParams := make(map[string]string) - urlParams["request-raw-url"] = rawUrl - return NewDeletedItemsValidatePropertiesRequestBuilderInternal(urlParams, requestAdapter) -} -// Post 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. For validating properties of an existing group, use the validateProperties function for groups. The following 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 the mail nickname is unique This API returns with the first failure encountered. If one or more properties fail multiple validations, only the property with 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. -// [Find more info here] -// -// [Find more info here]: https://learn.microsoft.com/graph/api/directoryobject-validateproperties?view=graph-rest-1.0 -func (m *DeletedItemsValidatePropertiesRequestBuilder) Post(ctx context.Context, body DeletedItemsValidatePropertiesPostRequestBodyable, requestConfiguration *DeletedItemsValidatePropertiesRequestBuilderPostRequestConfiguration)(error) { - requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); - if err != nil { - return err - } - errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { - "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, - "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, - } - err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) - if err != nil { - return err - } - return nil -} -// ToPostRequestInformation 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. For validating properties of an existing group, use the validateProperties function for groups. The following 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 the mail nickname is unique This API returns with the first failure encountered. If one or more properties fail multiple validations, only the property with 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. -func (m *DeletedItemsValidatePropertiesRequestBuilder) ToPostRequestInformation(ctx context.Context, body DeletedItemsValidatePropertiesPostRequestBodyable, requestConfiguration *DeletedItemsValidatePropertiesRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { - requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() - requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate - requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters - requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST - err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) - if err != nil { - return nil, err - } - if requestConfiguration != nil { - requestInfo.Headers.AddAll(requestConfiguration.Headers) - requestInfo.AddRequestOptions(requestConfiguration.Options) - } - return requestInfo, nil -} -// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. -func (m *DeletedItemsValidatePropertiesRequestBuilder) WithUrl(rawUrl string)(*DeletedItemsValidatePropertiesRequestBuilder) { - return NewDeletedItemsValidatePropertiesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); -} diff --git a/directoryroles/directory_role_item_request_builder.go b/directoryroles/directory_role_item_request_builder.go index 567be2aefb6..9fc0d64f22e 100644 --- a/directoryroles/directory_role_item_request_builder.go +++ b/directoryroles/directory_role_item_request_builder.go @@ -18,7 +18,7 @@ type DirectoryRoleItemRequestBuilderDeleteRequestConfiguration struct { // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// DirectoryRoleItemRequestBuilderGetQueryParameters retrieve the properties of a directoryRole object. 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. +// DirectoryRoleItemRequestBuilderGetQueryParameters retrieve the properties of a directoryRole object. 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. type DirectoryRoleItemRequestBuilderGetQueryParameters struct { // Expand related entities Expand []string `uriparametername:"%24expand"` @@ -78,7 +78,7 @@ func (m *DirectoryRoleItemRequestBuilder) Delete(ctx context.Context, requestCon } return nil } -// Get retrieve the properties of a directoryRole object. 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. +// Get retrieve the properties of a directoryRole object. 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. // [Find more info here] // // [Find more info here]: https://learn.microsoft.com/graph/api/directoryrole-get?view=graph-rest-1.0 @@ -151,7 +151,7 @@ func (m *DirectoryRoleItemRequestBuilder) ToDeleteRequestInformation(ctx context } return requestInfo, nil } -// ToGetRequestInformation retrieve the properties of a directoryRole object. 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. +// ToGetRequestInformation retrieve the properties of a directoryRole object. 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. func (m *DirectoryRoleItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *DirectoryRoleItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/directoryroles/directory_roles_request_builder.go b/directoryroles/directory_roles_request_builder.go index 22727356605..c55367f4ad6 100644 --- a/directoryroles/directory_roles_request_builder.go +++ b/directoryroles/directory_roles_request_builder.go @@ -11,7 +11,7 @@ import ( type DirectoryRolesRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// 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. +// 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 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 Azure AD, use List directoryRoleTemplates. type DirectoryRolesRequestBuilderGetQueryParameters struct { // Include count of items Count *bool `uriparametername:"%24count"` @@ -76,7 +76,7 @@ func (m *DirectoryRolesRequestBuilder) Count()(*CountRequestBuilder) { func (m *DirectoryRolesRequestBuilder) Delta()(*DeltaRequestBuilder) { return NewDeltaRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Get 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. +// Get 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 Azure AD, use List directoryRoleTemplates. // [Find more info here] // // [Find more info here]: https://learn.microsoft.com/graph/api/directoryrole-list?view=graph-rest-1.0 @@ -128,7 +128,7 @@ func (m *DirectoryRolesRequestBuilder) Post(ctx context.Context, body ie233ee762 } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DirectoryRoleable), nil } -// ToGetRequestInformation 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. +// ToGetRequestInformation 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 Azure AD, use List directoryRoleTemplates. func (m *DirectoryRolesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *DirectoryRolesRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/directoryroles/item_members_item_ref_request_builder.go b/directoryroles/item_members_item_ref_request_builder.go index 02cd6de929a..1fa606976e9 100644 --- a/directoryroles/item_members_item_ref_request_builder.go +++ b/directoryroles/item_members_item_ref_request_builder.go @@ -10,7 +10,7 @@ import ( type ItemMembersItemRefRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ItemMembersItemRefRequestBuilderDeleteQueryParameters 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. +// ItemMembersItemRefRequestBuilderDeleteQueryParameters 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. type ItemMembersItemRefRequestBuilderDeleteQueryParameters struct { // Delete Uri Id *string `uriparametername:"%40id"` @@ -37,7 +37,7 @@ func NewItemMembersItemRefRequestBuilder(rawUrl string, requestAdapter i2ae4187f urlParams["request-raw-url"] = rawUrl return NewItemMembersItemRefRequestBuilderInternal(urlParams, requestAdapter) } -// Delete 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. +// Delete 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. // [Find more info here] // // [Find more info here]: https://learn.microsoft.com/graph/api/directoryrole-delete-member?view=graph-rest-1.0 @@ -56,7 +56,7 @@ func (m *ItemMembersItemRefRequestBuilder) Delete(ctx context.Context, requestCo } return nil } -// ToDeleteRequestInformation 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. +// ToDeleteRequestInformation 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. func (m *ItemMembersItemRefRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *ItemMembersItemRefRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/directoryroles/item_members_ref_request_builder.go b/directoryroles/item_members_ref_request_builder.go index 79aaa69b6c0..efca4cdde5a 100644 --- a/directoryroles/item_members_ref_request_builder.go +++ b/directoryroles/item_members_ref_request_builder.go @@ -77,7 +77,7 @@ func (m *ItemMembersRefRequestBuilder) Get(ctx context.Context, requestConfigura } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.StringCollectionResponseable), nil } -// Post 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. +// Post 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. // [Find more info here] // // [Find more info here]: https://learn.microsoft.com/graph/api/directoryrole-post-members?view=graph-rest-1.0 @@ -112,7 +112,7 @@ func (m *ItemMembersRefRequestBuilder) ToGetRequestInformation(ctx context.Conte } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation 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. func (m *ItemMembersRefRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ReferenceCreateable, requestConfiguration *ItemMembersRefRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/directoryroleswithroletemplateid/directory_roles_with_role_template_id_request_builder.go b/directoryroleswithroletemplateid/directory_roles_with_role_template_id_request_builder.go index 22634729962..8292b730d8f 100644 --- a/directoryroleswithroletemplateid/directory_roles_with_role_template_id_request_builder.go +++ b/directoryroleswithroletemplateid/directory_roles_with_role_template_id_request_builder.go @@ -18,7 +18,7 @@ type DirectoryRolesWithRoleTemplateIdRequestBuilderDeleteRequestConfiguration st // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// DirectoryRolesWithRoleTemplateIdRequestBuilderGetQueryParameters retrieve the properties of a directoryRole object. 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. +// DirectoryRolesWithRoleTemplateIdRequestBuilderGetQueryParameters retrieve the properties of a directoryRole object. 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. type DirectoryRolesWithRoleTemplateIdRequestBuilderGetQueryParameters struct { // Expand related entities Expand []string `uriparametername:"%24expand"` @@ -73,7 +73,7 @@ func (m *DirectoryRolesWithRoleTemplateIdRequestBuilder) Delete(ctx context.Cont } return nil } -// Get retrieve the properties of a directoryRole object. 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. +// Get retrieve the properties of a directoryRole object. 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. // [Find more info here] // // [Find more info here]: https://learn.microsoft.com/graph/api/directoryrole-get?view=graph-rest-1.0 @@ -126,7 +126,7 @@ func (m *DirectoryRolesWithRoleTemplateIdRequestBuilder) ToDeleteRequestInformat } return requestInfo, nil } -// ToGetRequestInformation retrieve the properties of a directoryRole object. 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. +// ToGetRequestInformation retrieve the properties of a directoryRole object. 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. func (m *DirectoryRolesWithRoleTemplateIdRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *DirectoryRolesWithRoleTemplateIdRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/drives/item_created_by_user_request_builder.go b/drives/item_created_by_user_request_builder.go index 9304cc56a3f..b2170f82a0a 100644 --- a/drives/item_created_by_user_request_builder.go +++ b/drives/item_created_by_user_request_builder.go @@ -63,6 +63,10 @@ func (m *ItemCreatedByUserRequestBuilder) Get(ctx context.Context, requestConfig func (m *ItemCreatedByUserRequestBuilder) MailboxSettings()(*ItemCreatedByUserMailboxSettingsRequestBuilder) { return NewItemCreatedByUserMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *ItemCreatedByUserRequestBuilder) ServiceProvisioningErrors()(*ItemCreatedByUserServiceProvisioningErrorsRequestBuilder) { + return NewItemCreatedByUserServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation get createdByUser from drives func (m *ItemCreatedByUserRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemCreatedByUserRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/drives/item_created_by_user_service_provisioning_errors_count_request_builder.go b/drives/item_created_by_user_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..67c0bcae709 --- /dev/null +++ b/drives/item_created_by_user_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package drives + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type ItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type ItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// ItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) { + m := &ItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/drives/{drive%2Did}/createdByUser/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *ItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *ItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*ItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/drives/item_created_by_user_service_provisioning_errors_request_builder.go b/drives/item_created_by_user_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..c2ab2b1ad10 --- /dev/null +++ b/drives/item_created_by_user_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package drives + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemCreatedByUserServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \drives\{drive-id}\createdByUser\serviceProvisioningErrors +type ItemCreatedByUserServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type ItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// ItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewItemCreatedByUserServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemCreatedByUserServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCreatedByUserServiceProvisioningErrorsRequestBuilder) { + m := &ItemCreatedByUserServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/drives/{drive%2Did}/createdByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewItemCreatedByUserServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemCreatedByUserServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCreatedByUserServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemCreatedByUserServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *ItemCreatedByUserServiceProvisioningErrorsRequestBuilder) Count()(*ItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemCreatedByUserServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemCreatedByUserServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemCreatedByUserServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*ItemCreatedByUserServiceProvisioningErrorsRequestBuilder) { + return NewItemCreatedByUserServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/drives/item_items_drive_item_item_request_builder.go b/drives/item_items_drive_item_item_request_builder.go index 5970b564ce2..1f4a9bbad36 100644 --- a/drives/item_items_drive_item_item_request_builder.go +++ b/drives/item_items_drive_item_item_request_builder.go @@ -168,10 +168,10 @@ func (m *ItemItemsDriveItemItemRequestBuilder) LastModifiedByUser()(*ItemItemsIt func (m *ItemItemsDriveItemItemRequestBuilder) ListItem()(*ItemItemsItemListItemRequestBuilder) { return NewItemItemsItemListItemRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Patch 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. +// Patch update the metadata for a DriveItem by ID or path. You can also use update to move an item to another parent by updating the item's parentReference property. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/driveitem-move?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/driveitem-update?view=graph-rest-1.0 func (m *ItemItemsDriveItemItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DriveItemable, requestConfiguration *ItemItemsDriveItemItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DriveItemable, error) { requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -250,7 +250,7 @@ func (m *ItemItemsDriveItemItemRequestBuilder) ToGetRequestInformation(ctx conte } return requestInfo, nil } -// ToPatchRequestInformation 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. +// ToPatchRequestInformation update the metadata for a DriveItem by ID or path. You can also use update to move an item to another parent by updating the item's parentReference property. func (m *ItemItemsDriveItemItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DriveItemable, requestConfiguration *ItemItemsDriveItemItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/drives/item_items_item_created_by_user_request_builder.go b/drives/item_items_item_created_by_user_request_builder.go index 7e1ab65301e..1f582323cc0 100644 --- a/drives/item_items_item_created_by_user_request_builder.go +++ b/drives/item_items_item_created_by_user_request_builder.go @@ -63,6 +63,10 @@ func (m *ItemItemsItemCreatedByUserRequestBuilder) Get(ctx context.Context, requ func (m *ItemItemsItemCreatedByUserRequestBuilder) MailboxSettings()(*ItemItemsItemCreatedByUserMailboxSettingsRequestBuilder) { return NewItemItemsItemCreatedByUserMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *ItemItemsItemCreatedByUserRequestBuilder) ServiceProvisioningErrors()(*ItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder) { + return NewItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation get createdByUser from drives func (m *ItemItemsItemCreatedByUserRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemItemsItemCreatedByUserRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/drives/item_items_item_created_by_user_service_provisioning_errors_count_request_builder.go b/drives/item_items_item_created_by_user_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..c4a39e1e841 --- /dev/null +++ b/drives/item_items_item_created_by_user_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package drives + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type ItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type ItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// ItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) { + m := &ItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/createdByUser/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *ItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *ItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*ItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/drives/item_items_item_created_by_user_service_provisioning_errors_request_builder.go b/drives/item_items_item_created_by_user_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..7288c8549e6 --- /dev/null +++ b/drives/item_items_item_created_by_user_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package drives + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \drives\{drive-id}\items\{driveItem-id}\createdByUser\serviceProvisioningErrors +type ItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type ItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// ItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder) { + m := &ItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/createdByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *ItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder) Count()(*ItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*ItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder) { + return NewItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/drives/item_items_item_last_modified_by_user_request_builder.go b/drives/item_items_item_last_modified_by_user_request_builder.go index 96d41e8a58d..646f84666d6 100644 --- a/drives/item_items_item_last_modified_by_user_request_builder.go +++ b/drives/item_items_item_last_modified_by_user_request_builder.go @@ -63,6 +63,10 @@ func (m *ItemItemsItemLastModifiedByUserRequestBuilder) Get(ctx context.Context, func (m *ItemItemsItemLastModifiedByUserRequestBuilder) MailboxSettings()(*ItemItemsItemLastModifiedByUserMailboxSettingsRequestBuilder) { return NewItemItemsItemLastModifiedByUserMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *ItemItemsItemLastModifiedByUserRequestBuilder) ServiceProvisioningErrors()(*ItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) { + return NewItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation get lastModifiedByUser from drives func (m *ItemItemsItemLastModifiedByUserRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemItemsItemLastModifiedByUserRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/drives/item_items_item_last_modified_by_user_service_provisioning_errors_count_request_builder.go b/drives/item_items_item_last_modified_by_user_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..5c0b51adfcc --- /dev/null +++ b/drives/item_items_item_last_modified_by_user_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package drives + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type ItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type ItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// ItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) { + m := &ItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/lastModifiedByUser/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *ItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *ItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*ItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/drives/item_items_item_last_modified_by_user_service_provisioning_errors_request_builder.go b/drives/item_items_item_last_modified_by_user_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..85b6cdeec45 --- /dev/null +++ b/drives/item_items_item_last_modified_by_user_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package drives + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \drives\{drive-id}\items\{driveItem-id}\lastModifiedByUser\serviceProvisioningErrors +type ItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type ItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// ItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) { + m := &ItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/lastModifiedByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *ItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) Count()(*ItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*ItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) { + return NewItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/drives/item_items_item_retention_label_request_builder.go b/drives/item_items_item_retention_label_request_builder.go index 40a97630bc9..acf1c9ed390 100644 --- a/drives/item_items_item_retention_label_request_builder.go +++ b/drives/item_items_item_retention_label_request_builder.go @@ -92,10 +92,10 @@ func (m *ItemItemsItemRetentionLabelRequestBuilder) Get(ctx context.Context, req } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ItemRetentionLabelable), nil } -// Patch apply (set) a retention label on a driveItem (files and folders). Retention labels don't need to be published in a retention label policy to be applied using this method. When a retention label is applied to a folder, all the items in the folder are tagged with the same retention label. Conflict resolution is based on the following principle: explicit wins over implicit. For example, if a file in the folder has already been explicitly tagged with a label, that file doesn't inherit the label of the parent. For information about retention labels from an administrator's perspective, see Use retention labels to manage the lifecycle of documents stored in SharePoint. +// Patch lock or unlock a retention label on a driveItem that classifies content as records. For information about retention labels from an administrator's perspective, see Use retention labels to manage the lifecycle of documents stored in SharePoint. For information about how you can lock and unlock retention labels, see Use record versioning to update records stored in SharePoint or OneDrive. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/driveitem-setretentionlabel?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/driveitem-lockorunlockrecord?view=graph-rest-1.0 func (m *ItemItemsItemRetentionLabelRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ItemRetentionLabelable, requestConfiguration *ItemItemsItemRetentionLabelRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ItemRetentionLabelable, error) { requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -142,7 +142,7 @@ func (m *ItemItemsItemRetentionLabelRequestBuilder) ToGetRequestInformation(ctx } return requestInfo, nil } -// ToPatchRequestInformation apply (set) a retention label on a driveItem (files and folders). Retention labels don't need to be published in a retention label policy to be applied using this method. When a retention label is applied to a folder, all the items in the folder are tagged with the same retention label. Conflict resolution is based on the following principle: explicit wins over implicit. For example, if a file in the folder has already been explicitly tagged with a label, that file doesn't inherit the label of the parent. For information about retention labels from an administrator's perspective, see Use retention labels to manage the lifecycle of documents stored in SharePoint. +// ToPatchRequestInformation lock or unlock a retention label on a driveItem that classifies content as records. For information about retention labels from an administrator's perspective, see Use retention labels to manage the lifecycle of documents stored in SharePoint. For information about how you can lock and unlock retention labels, see Use record versioning to update records stored in SharePoint or OneDrive. func (m *ItemItemsItemRetentionLabelRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ItemRetentionLabelable, requestConfiguration *ItemItemsItemRetentionLabelRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/drives/item_items_item_workbook_names_request_builder.go b/drives/item_items_item_workbook_names_request_builder.go index e7b1a1ae92f..62b6886e238 100644 --- a/drives/item_items_item_workbook_names_request_builder.go +++ b/drives/item_items_item_workbook_names_request_builder.go @@ -85,7 +85,7 @@ func (m *ItemItemsItemWorkbookNamesRequestBuilder) Count()(*ItemItemsItemWorkboo // Get retrieve a list of nameditem objects. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/workbook-list-names?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/nameditem-list?view=graph-rest-1.0 func (m *ItemItemsItemWorkbookNamesRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemItemsItemWorkbookNamesRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.WorkbookNamedItemCollectionResponseable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { diff --git a/drives/item_items_item_workbook_tables_item_columns_request_builder.go b/drives/item_items_item_workbook_tables_item_columns_request_builder.go index f3933ca66df..451936215db 100644 --- a/drives/item_items_item_workbook_tables_item_columns_request_builder.go +++ b/drives/item_items_item_workbook_tables_item_columns_request_builder.go @@ -81,7 +81,7 @@ func (m *ItemItemsItemWorkbookTablesItemColumnsRequestBuilder) Count()(*ItemItem // Get retrieve a list of tablecolumn objects. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/tablecolumn-list?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/table-list-columns?view=graph-rest-1.0 func (m *ItemItemsItemWorkbookTablesItemColumnsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemItemsItemWorkbookTablesItemColumnsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.WorkbookTableColumnCollectionResponseable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { diff --git a/drives/item_items_item_workbook_tables_item_rows_request_builder.go b/drives/item_items_item_workbook_tables_item_rows_request_builder.go index fa45d9d0734..7c0a5543c74 100644 --- a/drives/item_items_item_workbook_tables_item_rows_request_builder.go +++ b/drives/item_items_item_workbook_tables_item_rows_request_builder.go @@ -81,7 +81,7 @@ func (m *ItemItemsItemWorkbookTablesItemRowsRequestBuilder) Count()(*ItemItemsIt // Get retrieve a list of tablerow objects. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/table-list-rows?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/tablerow-list?view=graph-rest-1.0 func (m *ItemItemsItemWorkbookTablesItemRowsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemItemsItemWorkbookTablesItemRowsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.WorkbookTableRowCollectionResponseable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { diff --git a/drives/item_items_item_workbook_worksheets_add_request_builder.go b/drives/item_items_item_workbook_worksheets_add_request_builder.go index 1070dca7d11..7cd6ea7c82c 100644 --- a/drives/item_items_item_workbook_worksheets_add_request_builder.go +++ b/drives/item_items_item_workbook_worksheets_add_request_builder.go @@ -31,7 +31,7 @@ func NewItemItemsItemWorkbookWorksheetsAddRequestBuilder(rawUrl string, requestA urlParams["request-raw-url"] = rawUrl return NewItemItemsItemWorkbookWorksheetsAddRequestBuilderInternal(urlParams, requestAdapter) } -// Post adds a new worksheet to the workbook. The worksheet will be added at the end of existing worksheets. If you wish to activate the newly added worksheet, call '.activate() on it. +// Post 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. // [Find more info here] // // [Find more info here]: https://learn.microsoft.com/graph/api/worksheetcollection-add?view=graph-rest-1.0 @@ -53,7 +53,7 @@ func (m *ItemItemsItemWorkbookWorksheetsAddRequestBuilder) Post(ctx context.Cont } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.WorkbookWorksheetable), nil } -// ToPostRequestInformation adds a new worksheet to the workbook. The worksheet will be added at the end of existing worksheets. If you wish to activate the newly added worksheet, call '.activate() on it. +// ToPostRequestInformation 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. func (m *ItemItemsItemWorkbookWorksheetsAddRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemsItemWorkbookWorksheetsAddPostRequestBodyable, requestConfiguration *ItemItemsItemWorkbookWorksheetsAddRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/drives/item_items_item_workbook_worksheets_item_charts_item_series_item_points_request_builder.go b/drives/item_items_item_workbook_worksheets_item_charts_item_series_item_points_request_builder.go index c2f86005a3f..ff71dc69d23 100644 --- a/drives/item_items_item_workbook_worksheets_item_charts_item_series_item_points_request_builder.go +++ b/drives/item_items_item_workbook_worksheets_item_charts_item_series_item_points_request_builder.go @@ -11,7 +11,7 @@ import ( type ItemItemsItemWorkbookWorksheetsItemChartsItemSeriesItemPointsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ItemItemsItemWorkbookWorksheetsItemChartsItemSeriesItemPointsRequestBuilderGetQueryParameters retrieve a list of chartpoint objects. +// ItemItemsItemWorkbookWorksheetsItemChartsItemSeriesItemPointsRequestBuilderGetQueryParameters retrieve a list of chartpoints objects. type ItemItemsItemWorkbookWorksheetsItemChartsItemSeriesItemPointsRequestBuilderGetQueryParameters struct { // Include count of items Count *bool `uriparametername:"%24count"` @@ -74,10 +74,10 @@ func NewItemItemsItemWorkbookWorksheetsItemChartsItemSeriesItemPointsRequestBuil func (m *ItemItemsItemWorkbookWorksheetsItemChartsItemSeriesItemPointsRequestBuilder) Count()(*ItemItemsItemWorkbookWorksheetsItemChartsItemSeriesItemPointsCountRequestBuilder) { return NewItemItemsItemWorkbookWorksheetsItemChartsItemSeriesItemPointsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Get retrieve a list of chartpoint objects. +// Get retrieve a list of chartpoints objects. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/chartpoint-list?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/chartseries-list-points?view=graph-rest-1.0 func (m *ItemItemsItemWorkbookWorksheetsItemChartsItemSeriesItemPointsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemItemsItemWorkbookWorksheetsItemChartsItemSeriesItemPointsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.WorkbookChartPointCollectionResponseable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -122,7 +122,7 @@ func (m *ItemItemsItemWorkbookWorksheetsItemChartsItemSeriesItemPointsRequestBui } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.WorkbookChartPointable), nil } -// ToGetRequestInformation retrieve a list of chartpoint objects. +// ToGetRequestInformation retrieve a list of chartpoints objects. func (m *ItemItemsItemWorkbookWorksheetsItemChartsItemSeriesItemPointsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemItemsItemWorkbookWorksheetsItemChartsItemSeriesItemPointsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/drives/item_items_item_workbook_worksheets_item_charts_item_series_request_builder.go b/drives/item_items_item_workbook_worksheets_item_charts_item_series_request_builder.go index 72fc54371ec..66ddaa9255c 100644 --- a/drives/item_items_item_workbook_worksheets_item_charts_item_series_request_builder.go +++ b/drives/item_items_item_workbook_worksheets_item_charts_item_series_request_builder.go @@ -77,7 +77,7 @@ func (m *ItemItemsItemWorkbookWorksheetsItemChartsItemSeriesRequestBuilder) Coun // Get retrieve a list of chartseries objects. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/chart-list-series?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/chartseries-list?view=graph-rest-1.0 func (m *ItemItemsItemWorkbookWorksheetsItemChartsItemSeriesRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemItemsItemWorkbookWorksheetsItemChartsItemSeriesRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.WorkbookChartSeriesCollectionResponseable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { diff --git a/drives/item_items_item_workbook_worksheets_item_charts_request_builder.go b/drives/item_items_item_workbook_worksheets_item_charts_request_builder.go index 0bbcaa25f51..bafbf03cabb 100644 --- a/drives/item_items_item_workbook_worksheets_item_charts_request_builder.go +++ b/drives/item_items_item_workbook_worksheets_item_charts_request_builder.go @@ -81,7 +81,7 @@ func (m *ItemItemsItemWorkbookWorksheetsItemChartsRequestBuilder) Count()(*ItemI // Get retrieve a list of chart objects. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/worksheet-list-charts?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/chart-list?view=graph-rest-1.0 func (m *ItemItemsItemWorkbookWorksheetsItemChartsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemItemsItemWorkbookWorksheetsItemChartsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.WorkbookChartCollectionResponseable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { diff --git a/drives/item_items_item_workbook_worksheets_item_tables_item_columns_request_builder.go b/drives/item_items_item_workbook_worksheets_item_tables_item_columns_request_builder.go index eb71079bbc2..374e367c2ca 100644 --- a/drives/item_items_item_workbook_worksheets_item_tables_item_columns_request_builder.go +++ b/drives/item_items_item_workbook_worksheets_item_tables_item_columns_request_builder.go @@ -81,7 +81,7 @@ func (m *ItemItemsItemWorkbookWorksheetsItemTablesItemColumnsRequestBuilder) Cou // Get retrieve a list of tablecolumn objects. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/tablecolumn-list?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/table-list-columns?view=graph-rest-1.0 func (m *ItemItemsItemWorkbookWorksheetsItemTablesItemColumnsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemItemsItemWorkbookWorksheetsItemTablesItemColumnsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.WorkbookTableColumnCollectionResponseable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { diff --git a/drives/item_items_item_workbook_worksheets_item_tables_item_rows_request_builder.go b/drives/item_items_item_workbook_worksheets_item_tables_item_rows_request_builder.go index 30d3d038fd9..c159c49f3c1 100644 --- a/drives/item_items_item_workbook_worksheets_item_tables_item_rows_request_builder.go +++ b/drives/item_items_item_workbook_worksheets_item_tables_item_rows_request_builder.go @@ -81,7 +81,7 @@ func (m *ItemItemsItemWorkbookWorksheetsItemTablesItemRowsRequestBuilder) Count( // Get retrieve a list of tablerow objects. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/table-list-rows?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/tablerow-list?view=graph-rest-1.0 func (m *ItemItemsItemWorkbookWorksheetsItemTablesItemRowsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemItemsItemWorkbookWorksheetsItemTablesItemRowsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.WorkbookTableRowCollectionResponseable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { diff --git a/drives/item_items_item_workbook_worksheets_request_builder.go b/drives/item_items_item_workbook_worksheets_request_builder.go index 331cdc7d5b8..bc43f724c33 100644 --- a/drives/item_items_item_workbook_worksheets_request_builder.go +++ b/drives/item_items_item_workbook_worksheets_request_builder.go @@ -81,7 +81,7 @@ func (m *ItemItemsItemWorkbookWorksheetsRequestBuilder) Count()(*ItemItemsItemWo // Get retrieve a list of worksheet objects. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/workbook-list-worksheets?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/worksheet-list?view=graph-rest-1.0 func (m *ItemItemsItemWorkbookWorksheetsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemItemsItemWorkbookWorksheetsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.WorkbookWorksheetCollectionResponseable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { diff --git a/drives/item_last_modified_by_user_request_builder.go b/drives/item_last_modified_by_user_request_builder.go index a8a75d1d493..e1db74cf5a0 100644 --- a/drives/item_last_modified_by_user_request_builder.go +++ b/drives/item_last_modified_by_user_request_builder.go @@ -63,6 +63,10 @@ func (m *ItemLastModifiedByUserRequestBuilder) Get(ctx context.Context, requestC func (m *ItemLastModifiedByUserRequestBuilder) MailboxSettings()(*ItemLastModifiedByUserMailboxSettingsRequestBuilder) { return NewItemLastModifiedByUserMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *ItemLastModifiedByUserRequestBuilder) ServiceProvisioningErrors()(*ItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) { + return NewItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation get lastModifiedByUser from drives func (m *ItemLastModifiedByUserRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemLastModifiedByUserRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/drives/item_last_modified_by_user_service_provisioning_errors_count_request_builder.go b/drives/item_last_modified_by_user_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..c9bb8a7777f --- /dev/null +++ b/drives/item_last_modified_by_user_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package drives + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type ItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type ItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// ItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) { + m := &ItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/drives/{drive%2Did}/lastModifiedByUser/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *ItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *ItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*ItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/drives/item_last_modified_by_user_service_provisioning_errors_request_builder.go b/drives/item_last_modified_by_user_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..e0b7407d756 --- /dev/null +++ b/drives/item_last_modified_by_user_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package drives + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \drives\{drive-id}\lastModifiedByUser\serviceProvisioningErrors +type ItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type ItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// ItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) { + m := &ItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/drives/{drive%2Did}/lastModifiedByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *ItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) Count()(*ItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*ItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) { + return NewItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/drives/item_list_created_by_user_request_builder.go b/drives/item_list_created_by_user_request_builder.go index f183bee4ec2..b080049b79e 100644 --- a/drives/item_list_created_by_user_request_builder.go +++ b/drives/item_list_created_by_user_request_builder.go @@ -63,6 +63,10 @@ func (m *ItemListCreatedByUserRequestBuilder) Get(ctx context.Context, requestCo func (m *ItemListCreatedByUserRequestBuilder) MailboxSettings()(*ItemListCreatedByUserMailboxSettingsRequestBuilder) { return NewItemListCreatedByUserMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *ItemListCreatedByUserRequestBuilder) ServiceProvisioningErrors()(*ItemListCreatedByUserServiceProvisioningErrorsRequestBuilder) { + return NewItemListCreatedByUserServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation get createdByUser from drives func (m *ItemListCreatedByUserRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemListCreatedByUserRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/drives/item_list_created_by_user_service_provisioning_errors_count_request_builder.go b/drives/item_list_created_by_user_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..9f800a91428 --- /dev/null +++ b/drives/item_list_created_by_user_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package drives + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemListCreatedByUserServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type ItemListCreatedByUserServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemListCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type ItemListCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// ItemListCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemListCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemListCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewItemListCreatedByUserServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewItemListCreatedByUserServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemListCreatedByUserServiceProvisioningErrorsCountRequestBuilder) { + m := &ItemListCreatedByUserServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/drives/{drive%2Did}/list/createdByUser/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewItemListCreatedByUserServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewItemListCreatedByUserServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemListCreatedByUserServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemListCreatedByUserServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *ItemListCreatedByUserServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemListCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *ItemListCreatedByUserServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemListCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemListCreatedByUserServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*ItemListCreatedByUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemListCreatedByUserServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/drives/item_list_created_by_user_service_provisioning_errors_request_builder.go b/drives/item_list_created_by_user_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..8cdba058d99 --- /dev/null +++ b/drives/item_list_created_by_user_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package drives + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemListCreatedByUserServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \drives\{drive-id}\list\createdByUser\serviceProvisioningErrors +type ItemListCreatedByUserServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemListCreatedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type ItemListCreatedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// ItemListCreatedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemListCreatedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemListCreatedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewItemListCreatedByUserServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemListCreatedByUserServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemListCreatedByUserServiceProvisioningErrorsRequestBuilder) { + m := &ItemListCreatedByUserServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/drives/{drive%2Did}/list/createdByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewItemListCreatedByUserServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemListCreatedByUserServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemListCreatedByUserServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemListCreatedByUserServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *ItemListCreatedByUserServiceProvisioningErrorsRequestBuilder) Count()(*ItemListCreatedByUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemListCreatedByUserServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemListCreatedByUserServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemListCreatedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemListCreatedByUserServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemListCreatedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemListCreatedByUserServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*ItemListCreatedByUserServiceProvisioningErrorsRequestBuilder) { + return NewItemListCreatedByUserServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/drives/item_list_items_item_created_by_user_request_builder.go b/drives/item_list_items_item_created_by_user_request_builder.go index d1abc2ebffd..d01494f81ba 100644 --- a/drives/item_list_items_item_created_by_user_request_builder.go +++ b/drives/item_list_items_item_created_by_user_request_builder.go @@ -63,6 +63,10 @@ func (m *ItemListItemsItemCreatedByUserRequestBuilder) Get(ctx context.Context, func (m *ItemListItemsItemCreatedByUserRequestBuilder) MailboxSettings()(*ItemListItemsItemCreatedByUserMailboxSettingsRequestBuilder) { return NewItemListItemsItemCreatedByUserMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *ItemListItemsItemCreatedByUserRequestBuilder) ServiceProvisioningErrors()(*ItemListItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder) { + return NewItemListItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation get createdByUser from drives func (m *ItemListItemsItemCreatedByUserRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemListItemsItemCreatedByUserRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/drives/item_list_items_item_created_by_user_service_provisioning_errors_count_request_builder.go b/drives/item_list_items_item_created_by_user_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..0d5fbfd4bcd --- /dev/null +++ b/drives/item_list_items_item_created_by_user_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package drives + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemListItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type ItemListItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemListItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type ItemListItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// ItemListItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemListItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemListItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewItemListItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewItemListItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemListItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) { + m := &ItemListItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/drives/{drive%2Did}/list/items/{listItem%2Did}/createdByUser/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewItemListItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewItemListItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemListItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemListItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *ItemListItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemListItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *ItemListItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemListItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemListItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*ItemListItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemListItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/drives/item_list_items_item_created_by_user_service_provisioning_errors_request_builder.go b/drives/item_list_items_item_created_by_user_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..b73e302e40e --- /dev/null +++ b/drives/item_list_items_item_created_by_user_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package drives + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemListItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \drives\{drive-id}\list\items\{listItem-id}\createdByUser\serviceProvisioningErrors +type ItemListItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemListItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type ItemListItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// ItemListItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemListItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemListItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewItemListItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemListItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemListItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder) { + m := &ItemListItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/drives/{drive%2Did}/list/items/{listItem%2Did}/createdByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewItemListItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemListItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemListItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemListItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *ItemListItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder) Count()(*ItemListItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemListItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemListItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemListItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemListItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemListItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemListItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*ItemListItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder) { + return NewItemListItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/drives/item_list_items_item_last_modified_by_user_request_builder.go b/drives/item_list_items_item_last_modified_by_user_request_builder.go index 17615704d42..ac156cbe60f 100644 --- a/drives/item_list_items_item_last_modified_by_user_request_builder.go +++ b/drives/item_list_items_item_last_modified_by_user_request_builder.go @@ -63,6 +63,10 @@ func (m *ItemListItemsItemLastModifiedByUserRequestBuilder) Get(ctx context.Cont func (m *ItemListItemsItemLastModifiedByUserRequestBuilder) MailboxSettings()(*ItemListItemsItemLastModifiedByUserMailboxSettingsRequestBuilder) { return NewItemListItemsItemLastModifiedByUserMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *ItemListItemsItemLastModifiedByUserRequestBuilder) ServiceProvisioningErrors()(*ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) { + return NewItemListItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation get lastModifiedByUser from drives func (m *ItemListItemsItemLastModifiedByUserRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemListItemsItemLastModifiedByUserRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/drives/item_list_items_item_last_modified_by_user_service_provisioning_errors_count_request_builder.go b/drives/item_list_items_item_last_modified_by_user_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..01a73504e90 --- /dev/null +++ b/drives/item_list_items_item_last_modified_by_user_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package drives + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewItemListItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewItemListItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) { + m := &ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/drives/{drive%2Did}/list/items/{listItem%2Did}/lastModifiedByUser/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewItemListItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewItemListItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemListItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemListItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/drives/item_list_items_item_last_modified_by_user_service_provisioning_errors_request_builder.go b/drives/item_list_items_item_last_modified_by_user_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..b143ab21c21 --- /dev/null +++ b/drives/item_list_items_item_last_modified_by_user_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package drives + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \drives\{drive-id}\list\items\{listItem-id}\lastModifiedByUser\serviceProvisioningErrors +type ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewItemListItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemListItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) { + m := &ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/drives/{drive%2Did}/list/items/{listItem%2Did}/lastModifiedByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewItemListItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemListItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemListItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) Count()(*ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemListItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) { + return NewItemListItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/drives/item_list_last_modified_by_user_request_builder.go b/drives/item_list_last_modified_by_user_request_builder.go index 2ddcdefcb49..bfc3a4ba203 100644 --- a/drives/item_list_last_modified_by_user_request_builder.go +++ b/drives/item_list_last_modified_by_user_request_builder.go @@ -63,6 +63,10 @@ func (m *ItemListLastModifiedByUserRequestBuilder) Get(ctx context.Context, requ func (m *ItemListLastModifiedByUserRequestBuilder) MailboxSettings()(*ItemListLastModifiedByUserMailboxSettingsRequestBuilder) { return NewItemListLastModifiedByUserMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *ItemListLastModifiedByUserRequestBuilder) ServiceProvisioningErrors()(*ItemListLastModifiedByUserServiceProvisioningErrorsRequestBuilder) { + return NewItemListLastModifiedByUserServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation get lastModifiedByUser from drives func (m *ItemListLastModifiedByUserRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemListLastModifiedByUserRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/drives/item_list_last_modified_by_user_service_provisioning_errors_count_request_builder.go b/drives/item_list_last_modified_by_user_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..0c8ef363be5 --- /dev/null +++ b/drives/item_list_last_modified_by_user_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package drives + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemListLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type ItemListLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemListLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type ItemListLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// ItemListLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemListLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemListLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewItemListLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewItemListLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemListLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) { + m := &ItemListLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/drives/{drive%2Did}/list/lastModifiedByUser/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewItemListLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewItemListLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemListLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemListLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *ItemListLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemListLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *ItemListLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemListLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemListLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*ItemListLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemListLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/drives/item_list_last_modified_by_user_service_provisioning_errors_request_builder.go b/drives/item_list_last_modified_by_user_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..19964725689 --- /dev/null +++ b/drives/item_list_last_modified_by_user_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package drives + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemListLastModifiedByUserServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \drives\{drive-id}\list\lastModifiedByUser\serviceProvisioningErrors +type ItemListLastModifiedByUserServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemListLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type ItemListLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// ItemListLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemListLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemListLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewItemListLastModifiedByUserServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemListLastModifiedByUserServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemListLastModifiedByUserServiceProvisioningErrorsRequestBuilder) { + m := &ItemListLastModifiedByUserServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/drives/{drive%2Did}/list/lastModifiedByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewItemListLastModifiedByUserServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemListLastModifiedByUserServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemListLastModifiedByUserServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemListLastModifiedByUserServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *ItemListLastModifiedByUserServiceProvisioningErrorsRequestBuilder) Count()(*ItemListLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemListLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemListLastModifiedByUserServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemListLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemListLastModifiedByUserServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemListLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemListLastModifiedByUserServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*ItemListLastModifiedByUserServiceProvisioningErrorsRequestBuilder) { + return NewItemListLastModifiedByUserServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/education/classes_item_group_request_builder.go b/education/classes_item_group_request_builder.go index 8c076c16fd3..74c9e0e1d86 100644 --- a/education/classes_item_group_request_builder.go +++ b/education/classes_item_group_request_builder.go @@ -62,6 +62,10 @@ func (m *ClassesItemGroupRequestBuilder) Get(ctx context.Context, requestConfigu } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Groupable), nil } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *ClassesItemGroupRequestBuilder) ServiceProvisioningErrors()(*ClassesItemGroupServiceProvisioningErrorsRequestBuilder) { + return NewClassesItemGroupServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation retrieve the Microsoft 365 group that corresponds to this educationClass. func (m *ClassesItemGroupRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ClassesItemGroupRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/education/classes_item_group_service_provisioning_errors_count_request_builder.go b/education/classes_item_group_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..0b06d98303e --- /dev/null +++ b/education/classes_item_group_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package education + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ClassesItemGroupServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type ClassesItemGroupServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ClassesItemGroupServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type ClassesItemGroupServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// ClassesItemGroupServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ClassesItemGroupServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ClassesItemGroupServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewClassesItemGroupServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewClassesItemGroupServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ClassesItemGroupServiceProvisioningErrorsCountRequestBuilder) { + m := &ClassesItemGroupServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/education/classes/{educationClass%2Did}/group/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewClassesItemGroupServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewClassesItemGroupServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ClassesItemGroupServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewClassesItemGroupServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *ClassesItemGroupServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ClassesItemGroupServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *ClassesItemGroupServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ClassesItemGroupServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ClassesItemGroupServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*ClassesItemGroupServiceProvisioningErrorsCountRequestBuilder) { + return NewClassesItemGroupServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/education/classes_item_group_service_provisioning_errors_request_builder.go b/education/classes_item_group_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..82355ea4e07 --- /dev/null +++ b/education/classes_item_group_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package education + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ClassesItemGroupServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \education\classes\{educationClass-id}\group\serviceProvisioningErrors +type ClassesItemGroupServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ClassesItemGroupServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +type ClassesItemGroupServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// ClassesItemGroupServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ClassesItemGroupServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ClassesItemGroupServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewClassesItemGroupServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewClassesItemGroupServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ClassesItemGroupServiceProvisioningErrorsRequestBuilder) { + m := &ClassesItemGroupServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/education/classes/{educationClass%2Did}/group/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewClassesItemGroupServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewClassesItemGroupServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ClassesItemGroupServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewClassesItemGroupServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *ClassesItemGroupServiceProvisioningErrorsRequestBuilder) Count()(*ClassesItemGroupServiceProvisioningErrorsCountRequestBuilder) { + return NewClassesItemGroupServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ClassesItemGroupServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *ClassesItemGroupServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ClassesItemGroupServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ClassesItemGroupServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ClassesItemGroupServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*ClassesItemGroupServiceProvisioningErrorsRequestBuilder) { + return NewClassesItemGroupServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/education/classes_item_modules_request_builder.go b/education/classes_item_modules_request_builder.go index 4972167a90f..f3677b9ca5a 100644 --- a/education/classes_item_modules_request_builder.go +++ b/education/classes_item_modules_request_builder.go @@ -96,7 +96,7 @@ func (m *ClassesItemModulesRequestBuilder) Get(ctx context.Context, requestConfi } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.EducationModuleCollectionResponseable), nil } -// Post create a new module in a class. Only teachers in a class can create a module. Modules start in the draft state, which means that students will not see the modules until publication. +// Post create a new module in a class. Only teachers in a class can create a module. Modules start in the draft state, which means that students won't see the modules until publication. // [Find more info here] // // [Find more info here]: https://learn.microsoft.com/graph/api/educationclass-post-module?view=graph-rest-1.0 @@ -134,7 +134,7 @@ func (m *ClassesItemModulesRequestBuilder) ToGetRequestInformation(ctx context.C } return requestInfo, nil } -// ToPostRequestInformation create a new module in a class. Only teachers in a class can create a module. Modules start in the draft state, which means that students will not see the modules until publication. +// ToPostRequestInformation create a new module in a class. Only teachers in a class can create a module. Modules start in the draft state, which means that students won't see the modules until publication. func (m *ClassesItemModulesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.EducationModuleable, requestConfiguration *ClassesItemModulesRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/education/me_user_request_builder.go b/education/me_user_request_builder.go index 4c0fc9c400b..ddef48c73d6 100644 --- a/education/me_user_request_builder.go +++ b/education/me_user_request_builder.go @@ -66,6 +66,10 @@ func (m *MeUserRequestBuilder) Get(ctx context.Context, requestConfiguration *Me func (m *MeUserRequestBuilder) MailboxSettings()(*MeUserMailboxSettingsRequestBuilder) { return NewMeUserMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *MeUserRequestBuilder) ServiceProvisioningErrors()(*MeUserServiceProvisioningErrorsRequestBuilder) { + return NewMeUserServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation retrieve the simple directory user that corresponds to this educationUser. func (m *MeUserRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MeUserRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/education/me_user_service_provisioning_errors_count_request_builder.go b/education/me_user_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..0e5917fa320 --- /dev/null +++ b/education/me_user_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package education + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MeUserServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type MeUserServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MeUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type MeUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MeUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MeUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MeUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewMeUserServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMeUserServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MeUserServiceProvisioningErrorsCountRequestBuilder) { + m := &MeUserServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/education/me/user/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMeUserServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMeUserServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MeUserServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMeUserServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MeUserServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MeUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MeUserServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MeUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MeUserServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*MeUserServiceProvisioningErrorsCountRequestBuilder) { + return NewMeUserServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/education/me_user_service_provisioning_errors_request_builder.go b/education/me_user_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..0ead34ad088 --- /dev/null +++ b/education/me_user_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package education + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MeUserServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \education\me\user\serviceProvisioningErrors +type MeUserServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MeUserServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type MeUserServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MeUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MeUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MeUserServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewMeUserServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewMeUserServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MeUserServiceProvisioningErrorsRequestBuilder) { + m := &MeUserServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/education/me/user/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMeUserServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewMeUserServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MeUserServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMeUserServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MeUserServiceProvisioningErrorsRequestBuilder) Count()(*MeUserServiceProvisioningErrorsCountRequestBuilder) { + return NewMeUserServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *MeUserServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *MeUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *MeUserServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MeUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MeUserServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*MeUserServiceProvisioningErrorsRequestBuilder) { + return NewMeUserServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/education/synchronization_profiles_item_start_request_builder.go b/education/synchronization_profiles_item_start_request_builder.go index f154fb5d9fb..58acd6581e0 100644 --- a/education/synchronization_profiles_item_start_request_builder.go +++ b/education/synchronization_profiles_item_start_request_builder.go @@ -30,7 +30,7 @@ func NewSynchronizationProfilesItemStartRequestBuilder(rawUrl string, requestAda urlParams["request-raw-url"] = rawUrl return NewSynchronizationProfilesItemStartRequestBuilderInternal(urlParams, requestAdapter) } -// Post verify the files uploaded to a specific school data synchronization profile in the tenant. If the verification is successful, synchronization will start on the profile. Otherwise, the response will contain errors and warnings. If the response contains errors, the synchronization will not start. If the response contains only warnings, synchronization will start. +// Post verify the files uploaded to a specific school data synchronization profile in the tenant. If the verification is successful, synchronization starts on the profile. Otherwise, the response contains errors and warnings. If the response contains errors, the synchronization won't start. If the response contains only warnings, synchronization starts. // [Find more info here] // // [Find more info here]: https://learn.microsoft.com/graph/api/educationsynchronizationprofile-start?view=graph-rest-1.0 @@ -52,7 +52,7 @@ func (m *SynchronizationProfilesItemStartRequestBuilder) Post(ctx context.Contex } return res.(SynchronizationProfilesItemStartResponseable), nil } -// ToPostRequestInformation verify the files uploaded to a specific school data synchronization profile in the tenant. If the verification is successful, synchronization will start on the profile. Otherwise, the response will contain errors and warnings. If the response contains errors, the synchronization will not start. If the response contains only warnings, synchronization will start. +// ToPostRequestInformation verify the files uploaded to a specific school data synchronization profile in the tenant. If the verification is successful, synchronization starts on the profile. Otherwise, the response contains errors and warnings. If the response contains errors, the synchronization won't start. If the response contains only warnings, synchronization starts. func (m *SynchronizationProfilesItemStartRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *SynchronizationProfilesItemStartRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/education/users_item_user_request_builder.go b/education/users_item_user_request_builder.go index 4eaf823102a..c1734688bd2 100644 --- a/education/users_item_user_request_builder.go +++ b/education/users_item_user_request_builder.go @@ -66,6 +66,10 @@ func (m *UsersItemUserRequestBuilder) Get(ctx context.Context, requestConfigurat func (m *UsersItemUserRequestBuilder) MailboxSettings()(*UsersItemUserMailboxSettingsRequestBuilder) { return NewUsersItemUserMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *UsersItemUserRequestBuilder) ServiceProvisioningErrors()(*UsersItemUserServiceProvisioningErrorsRequestBuilder) { + return NewUsersItemUserServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation retrieve the simple directory user that corresponds to this educationUser. func (m *UsersItemUserRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *UsersItemUserRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/education/users_item_user_service_provisioning_errors_count_request_builder.go b/education/users_item_user_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..9b81e83b36c --- /dev/null +++ b/education/users_item_user_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package education + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// UsersItemUserServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type UsersItemUserServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// UsersItemUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type UsersItemUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// UsersItemUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type UsersItemUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *UsersItemUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewUsersItemUserServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewUsersItemUserServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*UsersItemUserServiceProvisioningErrorsCountRequestBuilder) { + m := &UsersItemUserServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/education/users/{educationUser%2Did}/user/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewUsersItemUserServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewUsersItemUserServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*UsersItemUserServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewUsersItemUserServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *UsersItemUserServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *UsersItemUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *UsersItemUserServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *UsersItemUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *UsersItemUserServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*UsersItemUserServiceProvisioningErrorsCountRequestBuilder) { + return NewUsersItemUserServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/education/users_item_user_service_provisioning_errors_request_builder.go b/education/users_item_user_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..0ea20486801 --- /dev/null +++ b/education/users_item_user_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package education + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// UsersItemUserServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \education\users\{educationUser-id}\user\serviceProvisioningErrors +type UsersItemUserServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// UsersItemUserServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type UsersItemUserServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// UsersItemUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type UsersItemUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *UsersItemUserServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewUsersItemUserServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewUsersItemUserServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*UsersItemUserServiceProvisioningErrorsRequestBuilder) { + m := &UsersItemUserServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/education/users/{educationUser%2Did}/user/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewUsersItemUserServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewUsersItemUserServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*UsersItemUserServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewUsersItemUserServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *UsersItemUserServiceProvisioningErrorsRequestBuilder) Count()(*UsersItemUserServiceProvisioningErrorsCountRequestBuilder) { + return NewUsersItemUserServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *UsersItemUserServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *UsersItemUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *UsersItemUserServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *UsersItemUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *UsersItemUserServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*UsersItemUserServiceProvisioningErrorsRequestBuilder) { + return NewUsersItemUserServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/external/industry_data_inbound_flows_inbound_flow_item_request_builder.go b/external/industry_data_inbound_flows_inbound_flow_item_request_builder.go index bc38ce73429..23386d3b732 100644 --- a/external/industry_data_inbound_flows_inbound_flow_item_request_builder.go +++ b/external/industry_data_inbound_flows_inbound_flow_item_request_builder.go @@ -18,7 +18,7 @@ type IndustryDataInboundFlowsInboundFlowItemRequestBuilderDeleteRequestConfigura // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// IndustryDataInboundFlowsInboundFlowItemRequestBuilderGetQueryParameters read the properties and relationships of an inboundFileFlow object. +// IndustryDataInboundFlowsInboundFlowItemRequestBuilderGetQueryParameters read the properties and relationships of an inboundFlow object. type IndustryDataInboundFlowsInboundFlowItemRequestBuilderGetQueryParameters struct { // Expand related entities Expand []string `uriparametername:"%24expand"` @@ -58,10 +58,10 @@ func NewIndustryDataInboundFlowsInboundFlowItemRequestBuilder(rawUrl string, req func (m *IndustryDataInboundFlowsInboundFlowItemRequestBuilder) DataConnector()(*IndustryDataInboundFlowsItemDataConnectorRequestBuilder) { return NewIndustryDataInboundFlowsItemDataConnectorRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Delete delete an inboundFileFlow object. +// Delete delete an inboundFlow object. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/industrydata-inboundfileflow-delete?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/industrydata-inboundflow-delete?view=graph-rest-1.0 func (m *IndustryDataInboundFlowsInboundFlowItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *IndustryDataInboundFlowsInboundFlowItemRequestBuilderDeleteRequestConfiguration)(error) { requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); if err != nil { @@ -77,10 +77,10 @@ func (m *IndustryDataInboundFlowsInboundFlowItemRequestBuilder) Delete(ctx conte } return nil } -// Get read the properties and relationships of an inboundFileFlow object. +// Get read the properties and relationships of an inboundFlow object. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/industrydata-inboundfileflow-get?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/industrydata-inboundflow-get?view=graph-rest-1.0 func (m *IndustryDataInboundFlowsInboundFlowItemRequestBuilder) Get(ctx context.Context, requestConfiguration *IndustryDataInboundFlowsInboundFlowItemRequestBuilderGetRequestConfiguration)(id2b46acaed365d10a0a4cc89e0aa6f2f76ad54e2147428aee709d25e554da66a.InboundFlowable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -121,7 +121,7 @@ func (m *IndustryDataInboundFlowsInboundFlowItemRequestBuilder) Patch(ctx contex } return res.(id2b46acaed365d10a0a4cc89e0aa6f2f76ad54e2147428aee709d25e554da66a.InboundFlowable), nil } -// ToDeleteRequestInformation delete an inboundFileFlow object. +// ToDeleteRequestInformation delete an inboundFlow object. func (m *IndustryDataInboundFlowsInboundFlowItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *IndustryDataInboundFlowsInboundFlowItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate @@ -133,7 +133,7 @@ func (m *IndustryDataInboundFlowsInboundFlowItemRequestBuilder) ToDeleteRequestI } return requestInfo, nil } -// ToGetRequestInformation read the properties and relationships of an inboundFileFlow object. +// ToGetRequestInformation read the properties and relationships of an inboundFlow object. func (m *IndustryDataInboundFlowsInboundFlowItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *IndustryDataInboundFlowsInboundFlowItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/external/industry_data_inbound_flows_request_builder.go b/external/industry_data_inbound_flows_request_builder.go index e712f9ef46e..a6ec7575b85 100644 --- a/external/industry_data_inbound_flows_request_builder.go +++ b/external/industry_data_inbound_flows_request_builder.go @@ -11,7 +11,7 @@ import ( type IndustryDataInboundFlowsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// IndustryDataInboundFlowsRequestBuilderGetQueryParameters get a list of the inboundFileFlow objects and their properties. +// IndustryDataInboundFlowsRequestBuilderGetQueryParameters get a list of the inboundFlow objects and their properties. type IndustryDataInboundFlowsRequestBuilderGetQueryParameters struct { // Include count of items Count *bool `uriparametername:"%24count"` @@ -74,10 +74,10 @@ func NewIndustryDataInboundFlowsRequestBuilder(rawUrl string, requestAdapter i2a func (m *IndustryDataInboundFlowsRequestBuilder) Count()(*IndustryDataInboundFlowsCountRequestBuilder) { return NewIndustryDataInboundFlowsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Get get a list of the inboundFileFlow objects and their properties. +// Get get a list of the inboundFlow objects and their properties. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/industrydata-inboundfileflow-list?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/industrydata-inboundflow-list?view=graph-rest-1.0 func (m *IndustryDataInboundFlowsRequestBuilder) Get(ctx context.Context, requestConfiguration *IndustryDataInboundFlowsRequestBuilderGetRequestConfiguration)(id2b46acaed365d10a0a4cc89e0aa6f2f76ad54e2147428aee709d25e554da66a.InboundFlowCollectionResponseable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -118,7 +118,7 @@ func (m *IndustryDataInboundFlowsRequestBuilder) Post(ctx context.Context, body } return res.(id2b46acaed365d10a0a4cc89e0aa6f2f76ad54e2147428aee709d25e554da66a.InboundFlowable), nil } -// ToGetRequestInformation get a list of the inboundFileFlow objects and their properties. +// ToGetRequestInformation get a list of the inboundFlow objects and their properties. func (m *IndustryDataInboundFlowsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *IndustryDataInboundFlowsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/graph_request_adapter.go b/graph_request_adapter.go index 0c63e2a650a..4bb496d991b 100644 --- a/graph_request_adapter.go +++ b/graph_request_adapter.go @@ -10,7 +10,7 @@ import ( var clientOptions = core.GraphClientOptions{ GraphServiceVersion: "beta", - GraphServiceLibraryVersion: "0.79.0", + GraphServiceLibraryVersion: "0.80.0", } // GetDefaultClientOptions returns the default client options used by the GraphRequestAdapterBase and the middleware. @@ -108,5 +108,6 @@ func NewGraphRequestAdapterWithParseNodeFactoryAndSerializationWriterFactoryAndH + diff --git a/groups/group_item_request_builder.go b/groups/group_item_request_builder.go index b90afbb4e80..fbb2fa59537 100644 --- a/groups/group_item_request_builder.go +++ b/groups/group_item_request_builder.go @@ -257,6 +257,10 @@ func (m *GroupItemRequestBuilder) Restore()(*ItemRestoreRequestBuilder) { func (m *GroupItemRequestBuilder) RetryServiceProvisioning()(*ItemRetryServiceProvisioningRequestBuilder) { return NewItemRetryServiceProvisioningRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *GroupItemRequestBuilder) ServiceProvisioningErrors()(*ItemServiceProvisioningErrorsRequestBuilder) { + return NewItemServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // Settings provides operations to manage the settings property of the microsoft.graph.group entity. func (m *GroupItemRequestBuilder) Settings()(*ItemSettingsRequestBuilder) { return NewItemSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) diff --git a/groups/item_calendar_calendar_view_item_attachments_request_builder.go b/groups/item_calendar_calendar_view_item_attachments_request_builder.go index 23e841839b1..72951fcc570 100644 --- a/groups/item_calendar_calendar_view_item_attachments_request_builder.go +++ b/groups/item_calendar_calendar_view_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarCalendarViewItemAttachmentsRequestBuilder) Get(ctx context. } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarCalendarViewItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarCalendarViewItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -136,7 +136,7 @@ func (m *ItemCalendarCalendarViewItemAttachmentsRequestBuilder) ToGetRequestInfo } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. func (m *ItemCalendarCalendarViewItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarCalendarViewItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/groups/item_calendar_calendar_view_item_exception_occurrences_item_attachments_request_builder.go b/groups/item_calendar_calendar_view_item_exception_occurrences_item_attachments_request_builder.go index 75359d79a70..13cfcefee8e 100644 --- a/groups/item_calendar_calendar_view_item_exception_occurrences_item_attachments_request_builder.go +++ b/groups/item_calendar_calendar_view_item_exception_occurrences_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarCalendarViewItemExceptionOccurrencesItemAttachmentsRequestB } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarCalendarViewItemExceptionOccurrencesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarCalendarViewItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -136,7 +136,7 @@ func (m *ItemCalendarCalendarViewItemExceptionOccurrencesItemAttachmentsRequestB } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. func (m *ItemCalendarCalendarViewItemExceptionOccurrencesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarCalendarViewItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/groups/item_calendar_calendar_view_item_exception_occurrences_item_instances_item_attachments_request_builder.go b/groups/item_calendar_calendar_view_item_exception_occurrences_item_instances_item_attachments_request_builder.go index 3aef414b7f8..c50ce468909 100644 --- a/groups/item_calendar_calendar_view_item_exception_occurrences_item_instances_item_attachments_request_builder.go +++ b/groups/item_calendar_calendar_view_item_exception_occurrences_item_instances_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarCalendarViewItemExceptionOccurrencesItemInstancesItemAttach } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarCalendarViewItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarCalendarViewItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -136,7 +136,7 @@ func (m *ItemCalendarCalendarViewItemExceptionOccurrencesItemInstancesItemAttach } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. func (m *ItemCalendarCalendarViewItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarCalendarViewItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/groups/item_calendar_calendar_view_item_instances_item_attachments_request_builder.go b/groups/item_calendar_calendar_view_item_instances_item_attachments_request_builder.go index 6316bd1d7eb..09e736610ed 100644 --- a/groups/item_calendar_calendar_view_item_instances_item_attachments_request_builder.go +++ b/groups/item_calendar_calendar_view_item_instances_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarCalendarViewItemInstancesItemAttachmentsRequestBuilder) Get } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarCalendarViewItemInstancesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarCalendarViewItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -136,7 +136,7 @@ func (m *ItemCalendarCalendarViewItemInstancesItemAttachmentsRequestBuilder) ToG } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. func (m *ItemCalendarCalendarViewItemInstancesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarCalendarViewItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/groups/item_calendar_calendar_view_item_instances_item_exception_occurrences_item_attachments_request_builder.go b/groups/item_calendar_calendar_view_item_instances_item_exception_occurrences_item_attachments_request_builder.go index 3df7f5ebe4e..55d501d0253 100644 --- a/groups/item_calendar_calendar_view_item_instances_item_exception_occurrences_item_attachments_request_builder.go +++ b/groups/item_calendar_calendar_view_item_instances_item_exception_occurrences_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarCalendarViewItemInstancesItemExceptionOccurrencesItemAttach } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarCalendarViewItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarCalendarViewItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -136,7 +136,7 @@ func (m *ItemCalendarCalendarViewItemInstancesItemExceptionOccurrencesItemAttach } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. func (m *ItemCalendarCalendarViewItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarCalendarViewItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/groups/item_calendar_events_item_attachments_request_builder.go b/groups/item_calendar_events_item_attachments_request_builder.go index 889d0dc8622..c3c673680f7 100644 --- a/groups/item_calendar_events_item_attachments_request_builder.go +++ b/groups/item_calendar_events_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarEventsItemAttachmentsRequestBuilder) Get(ctx context.Contex } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarEventsItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarEventsItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -136,7 +136,7 @@ func (m *ItemCalendarEventsItemAttachmentsRequestBuilder) ToGetRequestInformatio } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. func (m *ItemCalendarEventsItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarEventsItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/groups/item_calendar_events_item_exception_occurrences_item_attachments_request_builder.go b/groups/item_calendar_events_item_exception_occurrences_item_attachments_request_builder.go index f75e70ab941..11405ae52fa 100644 --- a/groups/item_calendar_events_item_exception_occurrences_item_attachments_request_builder.go +++ b/groups/item_calendar_events_item_exception_occurrences_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarEventsItemExceptionOccurrencesItemAttachmentsRequestBuilder } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarEventsItemExceptionOccurrencesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarEventsItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -136,7 +136,7 @@ func (m *ItemCalendarEventsItemExceptionOccurrencesItemAttachmentsRequestBuilder } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. func (m *ItemCalendarEventsItemExceptionOccurrencesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarEventsItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/groups/item_calendar_events_item_exception_occurrences_item_instances_item_attachments_request_builder.go b/groups/item_calendar_events_item_exception_occurrences_item_instances_item_attachments_request_builder.go index 35522473d28..e2fc4462383 100644 --- a/groups/item_calendar_events_item_exception_occurrences_item_instances_item_attachments_request_builder.go +++ b/groups/item_calendar_events_item_exception_occurrences_item_instances_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarEventsItemExceptionOccurrencesItemInstancesItemAttachmentsR } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarEventsItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarEventsItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -136,7 +136,7 @@ func (m *ItemCalendarEventsItemExceptionOccurrencesItemInstancesItemAttachmentsR } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. func (m *ItemCalendarEventsItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarEventsItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/groups/item_calendar_events_item_instances_item_attachments_request_builder.go b/groups/item_calendar_events_item_instances_item_attachments_request_builder.go index b4aab647084..54a12d7f5eb 100644 --- a/groups/item_calendar_events_item_instances_item_attachments_request_builder.go +++ b/groups/item_calendar_events_item_instances_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarEventsItemInstancesItemAttachmentsRequestBuilder) Get(ctx c } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarEventsItemInstancesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarEventsItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -136,7 +136,7 @@ func (m *ItemCalendarEventsItemInstancesItemAttachmentsRequestBuilder) ToGetRequ } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. func (m *ItemCalendarEventsItemInstancesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarEventsItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/groups/item_calendar_events_item_instances_item_exception_occurrences_item_attachments_request_builder.go b/groups/item_calendar_events_item_instances_item_exception_occurrences_item_attachments_request_builder.go index 04d69037439..ecedbebee61 100644 --- a/groups/item_calendar_events_item_instances_item_exception_occurrences_item_attachments_request_builder.go +++ b/groups/item_calendar_events_item_instances_item_exception_occurrences_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarEventsItemInstancesItemExceptionOccurrencesItemAttachmentsR } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarEventsItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarEventsItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -136,7 +136,7 @@ func (m *ItemCalendarEventsItemInstancesItemExceptionOccurrencesItemAttachmentsR } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. func (m *ItemCalendarEventsItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarEventsItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/groups/item_calendar_view_item_attachments_request_builder.go b/groups/item_calendar_view_item_attachments_request_builder.go index 199c207c416..db63b70e237 100644 --- a/groups/item_calendar_view_item_attachments_request_builder.go +++ b/groups/item_calendar_view_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarViewItemAttachmentsRequestBuilder) Get(ctx context.Context, } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarViewItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarViewItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -136,7 +136,7 @@ func (m *ItemCalendarViewItemAttachmentsRequestBuilder) ToGetRequestInformation( } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. func (m *ItemCalendarViewItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarViewItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/groups/item_calendar_view_item_exception_occurrences_item_attachments_request_builder.go b/groups/item_calendar_view_item_exception_occurrences_item_attachments_request_builder.go index 11a8521ad89..28227c66253 100644 --- a/groups/item_calendar_view_item_exception_occurrences_item_attachments_request_builder.go +++ b/groups/item_calendar_view_item_exception_occurrences_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarViewItemExceptionOccurrencesItemAttachmentsRequestBuilder) } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarViewItemExceptionOccurrencesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarViewItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -136,7 +136,7 @@ func (m *ItemCalendarViewItemExceptionOccurrencesItemAttachmentsRequestBuilder) } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. func (m *ItemCalendarViewItemExceptionOccurrencesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarViewItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/groups/item_calendar_view_item_exception_occurrences_item_instances_item_attachments_request_builder.go b/groups/item_calendar_view_item_exception_occurrences_item_instances_item_attachments_request_builder.go index d25376019d0..94bda8c5c76 100644 --- a/groups/item_calendar_view_item_exception_occurrences_item_instances_item_attachments_request_builder.go +++ b/groups/item_calendar_view_item_exception_occurrences_item_instances_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarViewItemExceptionOccurrencesItemInstancesItemAttachmentsReq } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarViewItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarViewItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -136,7 +136,7 @@ func (m *ItemCalendarViewItemExceptionOccurrencesItemInstancesItemAttachmentsReq } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. func (m *ItemCalendarViewItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarViewItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/groups/item_calendar_view_item_instances_item_attachments_request_builder.go b/groups/item_calendar_view_item_instances_item_attachments_request_builder.go index 65e702bef6c..02c9598e335 100644 --- a/groups/item_calendar_view_item_instances_item_attachments_request_builder.go +++ b/groups/item_calendar_view_item_instances_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarViewItemInstancesItemAttachmentsRequestBuilder) Get(ctx con } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarViewItemInstancesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarViewItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -136,7 +136,7 @@ func (m *ItemCalendarViewItemInstancesItemAttachmentsRequestBuilder) ToGetReques } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. func (m *ItemCalendarViewItemInstancesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarViewItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/groups/item_calendar_view_item_instances_item_exception_occurrences_item_attachments_request_builder.go b/groups/item_calendar_view_item_instances_item_exception_occurrences_item_attachments_request_builder.go index e868bdb47f9..ba21740c81c 100644 --- a/groups/item_calendar_view_item_instances_item_exception_occurrences_item_attachments_request_builder.go +++ b/groups/item_calendar_view_item_instances_item_exception_occurrences_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarViewItemInstancesItemExceptionOccurrencesItemAttachmentsReq } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarViewItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarViewItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -136,7 +136,7 @@ func (m *ItemCalendarViewItemInstancesItemExceptionOccurrencesItemAttachmentsReq } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. func (m *ItemCalendarViewItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarViewItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/groups/item_conversations_item_threads_item_reply_request_builder.go b/groups/item_conversations_item_threads_item_reply_request_builder.go index ce7b292ab44..c989420c996 100644 --- a/groups/item_conversations_item_threads_item_reply_request_builder.go +++ b/groups/item_conversations_item_threads_item_reply_request_builder.go @@ -30,10 +30,10 @@ func NewItemConversationsItemThreadsItemReplyRequestBuilder(rawUrl string, reque urlParams["request-raw-url"] = rawUrl return NewItemConversationsItemThreadsItemReplyRequestBuilderInternal(urlParams, requestAdapter) } -// Post reply to a thread in a group conversation and add a new post to it. You can specify the parent conversation in the request, or, you can specify just the thread without the parent conversation. +// Post 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. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/conversationthread-reply?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/post-post-attachments?view=graph-rest-1.0 func (m *ItemConversationsItemThreadsItemReplyRequestBuilder) Post(ctx context.Context, body ItemConversationsItemThreadsItemReplyPostRequestBodyable, requestConfiguration *ItemConversationsItemThreadsItemReplyRequestBuilderPostRequestConfiguration)(error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -49,7 +49,7 @@ func (m *ItemConversationsItemThreadsItemReplyRequestBuilder) Post(ctx context.C } return nil } -// ToPostRequestInformation reply to a thread in a group conversation and add a new post to it. You can specify the parent conversation in the request, or, you can specify just the thread without the parent conversation. +// ToPostRequestInformation 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. func (m *ItemConversationsItemThreadsItemReplyRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemConversationsItemThreadsItemReplyPostRequestBodyable, requestConfiguration *ItemConversationsItemThreadsItemReplyRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/groups/item_conversations_request_builder.go b/groups/item_conversations_request_builder.go index 7fa4d744649..f6ea275d9c4 100644 --- a/groups/item_conversations_request_builder.go +++ b/groups/item_conversations_request_builder.go @@ -94,10 +94,10 @@ func (m *ItemConversationsRequestBuilder) Get(ctx context.Context, requestConfig } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationCollectionResponseable), nil } -// Post create a new conversation by including a thread and a post. Use reply thread or reply post to further post to that conversation. +// Post 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. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/group-post-conversations?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/opentypeextension-post-opentypeextension?view=graph-rest-1.0 func (m *ItemConversationsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Conversationable, requestConfiguration *ItemConversationsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Conversationable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -132,7 +132,7 @@ func (m *ItemConversationsRequestBuilder) ToGetRequestInformation(ctx context.Co } return requestInfo, nil } -// ToPostRequestInformation create a new conversation by including a thread and a post. Use reply thread or reply post to further post to that conversation. +// ToPostRequestInformation 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. func (m *ItemConversationsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Conversationable, requestConfiguration *ItemConversationsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/groups/item_events_item_attachments_request_builder.go b/groups/item_events_item_attachments_request_builder.go index 5d61713615a..7c00126ef5e 100644 --- a/groups/item_events_item_attachments_request_builder.go +++ b/groups/item_events_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemEventsItemAttachmentsRequestBuilder) Get(ctx context.Context, reque } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 func (m *ItemEventsItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemEventsItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -136,7 +136,7 @@ func (m *ItemEventsItemAttachmentsRequestBuilder) ToGetRequestInformation(ctx co } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. func (m *ItemEventsItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemEventsItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/groups/item_events_item_exception_occurrences_item_attachments_request_builder.go b/groups/item_events_item_exception_occurrences_item_attachments_request_builder.go index 97992d6cffd..1d164cd9f3f 100644 --- a/groups/item_events_item_exception_occurrences_item_attachments_request_builder.go +++ b/groups/item_events_item_exception_occurrences_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemEventsItemExceptionOccurrencesItemAttachmentsRequestBuilder) Get(ct } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 func (m *ItemEventsItemExceptionOccurrencesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemEventsItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -136,7 +136,7 @@ func (m *ItemEventsItemExceptionOccurrencesItemAttachmentsRequestBuilder) ToGetR } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. func (m *ItemEventsItemExceptionOccurrencesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemEventsItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/groups/item_events_item_exception_occurrences_item_instances_item_attachments_request_builder.go b/groups/item_events_item_exception_occurrences_item_instances_item_attachments_request_builder.go index ebbef727b12..4ead2188800 100644 --- a/groups/item_events_item_exception_occurrences_item_instances_item_attachments_request_builder.go +++ b/groups/item_events_item_exception_occurrences_item_instances_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemEventsItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBu } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 func (m *ItemEventsItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemEventsItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -136,7 +136,7 @@ func (m *ItemEventsItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBu } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. func (m *ItemEventsItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemEventsItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/groups/item_events_item_instances_item_attachments_request_builder.go b/groups/item_events_item_instances_item_attachments_request_builder.go index d14a4c4e601..6e5dea90bbd 100644 --- a/groups/item_events_item_instances_item_attachments_request_builder.go +++ b/groups/item_events_item_instances_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemEventsItemInstancesItemAttachmentsRequestBuilder) Get(ctx context.C } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 func (m *ItemEventsItemInstancesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemEventsItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -136,7 +136,7 @@ func (m *ItemEventsItemInstancesItemAttachmentsRequestBuilder) ToGetRequestInfor } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. func (m *ItemEventsItemInstancesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemEventsItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/groups/item_events_item_instances_item_exception_occurrences_item_attachments_request_builder.go b/groups/item_events_item_instances_item_exception_occurrences_item_attachments_request_builder.go index 8e900594322..717ad886649 100644 --- a/groups/item_events_item_instances_item_exception_occurrences_item_attachments_request_builder.go +++ b/groups/item_events_item_instances_item_exception_occurrences_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemEventsItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBu } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 func (m *ItemEventsItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemEventsItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -136,7 +136,7 @@ func (m *ItemEventsItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBu } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. func (m *ItemEventsItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemEventsItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/groups/item_service_provisioning_errors_count_request_builder.go b/groups/item_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..b8969f495fa --- /dev/null +++ b/groups/item_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,78 @@ +package groups + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type ItemServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type ItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` +} +// ItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewItemServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewItemServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemServiceProvisioningErrorsCountRequestBuilder) { + m := &ItemServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{group%2Did}/serviceProvisioningErrors/$count{?%24filter}", pathParameters), + } + return m +} +// NewItemServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewItemServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *ItemServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *ItemServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*ItemServiceProvisioningErrorsCountRequestBuilder) { + return NewItemServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/groups/item_service_provisioning_errors_request_builder.go b/groups/item_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..795876e14cf --- /dev/null +++ b/groups/item_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package groups + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \groups\{group-id}\serviceProvisioningErrors +type ItemServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +type ItemServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// ItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewItemServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemServiceProvisioningErrorsRequestBuilder) { + m := &ItemServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{group%2Did}/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewItemServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *ItemServiceProvisioningErrorsRequestBuilder) Count()(*ItemServiceProvisioningErrorsCountRequestBuilder) { + return NewItemServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*ItemServiceProvisioningErrorsRequestBuilder) { + return NewItemServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/groups/item_sites_item_created_by_user_request_builder.go b/groups/item_sites_item_created_by_user_request_builder.go index 8583c55715d..c800bb5dcc5 100644 --- a/groups/item_sites_item_created_by_user_request_builder.go +++ b/groups/item_sites_item_created_by_user_request_builder.go @@ -63,6 +63,10 @@ func (m *ItemSitesItemCreatedByUserRequestBuilder) Get(ctx context.Context, requ func (m *ItemSitesItemCreatedByUserRequestBuilder) MailboxSettings()(*ItemSitesItemCreatedByUserMailboxSettingsRequestBuilder) { return NewItemSitesItemCreatedByUserMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *ItemSitesItemCreatedByUserRequestBuilder) ServiceProvisioningErrors()(*ItemSitesItemCreatedByUserServiceProvisioningErrorsRequestBuilder) { + return NewItemSitesItemCreatedByUserServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation get createdByUser from groups func (m *ItemSitesItemCreatedByUserRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemCreatedByUserRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/groups/item_sites_item_created_by_user_service_provisioning_errors_count_request_builder.go b/groups/item_sites_item_created_by_user_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..c9fe6a850c0 --- /dev/null +++ b/groups/item_sites_item_created_by_user_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package groups + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemSitesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type ItemSitesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemSitesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type ItemSitesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// ItemSitesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemSitesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemSitesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewItemSitesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewItemSitesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) { + m := &ItemSitesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/createdByUser/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewItemSitesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewItemSitesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemSitesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *ItemSitesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *ItemSitesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemSitesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*ItemSitesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemSitesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/groups/item_sites_item_created_by_user_service_provisioning_errors_request_builder.go b/groups/item_sites_item_created_by_user_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..514e167bb6a --- /dev/null +++ b/groups/item_sites_item_created_by_user_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package groups + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemSitesItemCreatedByUserServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \groups\{group-id}\sites\{site-id}\createdByUser\serviceProvisioningErrors +type ItemSitesItemCreatedByUserServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemSitesItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type ItemSitesItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// ItemSitesItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemSitesItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemSitesItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewItemSitesItemCreatedByUserServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemSitesItemCreatedByUserServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemCreatedByUserServiceProvisioningErrorsRequestBuilder) { + m := &ItemSitesItemCreatedByUserServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/createdByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewItemSitesItemCreatedByUserServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemSitesItemCreatedByUserServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemCreatedByUserServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemSitesItemCreatedByUserServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *ItemSitesItemCreatedByUserServiceProvisioningErrorsRequestBuilder) Count()(*ItemSitesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemSitesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemSitesItemCreatedByUserServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemSitesItemCreatedByUserServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemSitesItemCreatedByUserServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*ItemSitesItemCreatedByUserServiceProvisioningErrorsRequestBuilder) { + return NewItemSitesItemCreatedByUserServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/groups/item_sites_item_last_modified_by_user_request_builder.go b/groups/item_sites_item_last_modified_by_user_request_builder.go index 0266e03f8ca..c28444ad00a 100644 --- a/groups/item_sites_item_last_modified_by_user_request_builder.go +++ b/groups/item_sites_item_last_modified_by_user_request_builder.go @@ -63,6 +63,10 @@ func (m *ItemSitesItemLastModifiedByUserRequestBuilder) Get(ctx context.Context, func (m *ItemSitesItemLastModifiedByUserRequestBuilder) MailboxSettings()(*ItemSitesItemLastModifiedByUserMailboxSettingsRequestBuilder) { return NewItemSitesItemLastModifiedByUserMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *ItemSitesItemLastModifiedByUserRequestBuilder) ServiceProvisioningErrors()(*ItemSitesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) { + return NewItemSitesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation get lastModifiedByUser from groups func (m *ItemSitesItemLastModifiedByUserRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemLastModifiedByUserRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/groups/item_sites_item_last_modified_by_user_service_provisioning_errors_count_request_builder.go b/groups/item_sites_item_last_modified_by_user_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..3998f869f17 --- /dev/null +++ b/groups/item_sites_item_last_modified_by_user_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package groups + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemSitesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type ItemSitesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemSitesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type ItemSitesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// ItemSitesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemSitesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemSitesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewItemSitesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewItemSitesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) { + m := &ItemSitesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/lastModifiedByUser/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewItemSitesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewItemSitesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemSitesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *ItemSitesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *ItemSitesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemSitesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*ItemSitesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemSitesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/groups/item_sites_item_last_modified_by_user_service_provisioning_errors_request_builder.go b/groups/item_sites_item_last_modified_by_user_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..a3fe5aa2b61 --- /dev/null +++ b/groups/item_sites_item_last_modified_by_user_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package groups + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemSitesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \groups\{group-id}\sites\{site-id}\lastModifiedByUser\serviceProvisioningErrors +type ItemSitesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemSitesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type ItemSitesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// ItemSitesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemSitesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemSitesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewItemSitesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemSitesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) { + m := &ItemSitesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/lastModifiedByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewItemSitesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemSitesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemSitesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *ItemSitesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) Count()(*ItemSitesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemSitesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemSitesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemSitesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemSitesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*ItemSitesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) { + return NewItemSitesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/groups/item_sites_item_lists_item_created_by_user_request_builder.go b/groups/item_sites_item_lists_item_created_by_user_request_builder.go index 7d8ff530ddf..414d4324314 100644 --- a/groups/item_sites_item_lists_item_created_by_user_request_builder.go +++ b/groups/item_sites_item_lists_item_created_by_user_request_builder.go @@ -63,6 +63,10 @@ func (m *ItemSitesItemListsItemCreatedByUserRequestBuilder) Get(ctx context.Cont func (m *ItemSitesItemListsItemCreatedByUserRequestBuilder) MailboxSettings()(*ItemSitesItemListsItemCreatedByUserMailboxSettingsRequestBuilder) { return NewItemSitesItemListsItemCreatedByUserMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *ItemSitesItemListsItemCreatedByUserRequestBuilder) ServiceProvisioningErrors()(*ItemSitesItemListsItemCreatedByUserServiceProvisioningErrorsRequestBuilder) { + return NewItemSitesItemListsItemCreatedByUserServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation get createdByUser from groups func (m *ItemSitesItemListsItemCreatedByUserRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemListsItemCreatedByUserRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/groups/item_sites_item_lists_item_created_by_user_service_provisioning_errors_count_request_builder.go b/groups/item_sites_item_lists_item_created_by_user_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..7785b2a62a4 --- /dev/null +++ b/groups/item_sites_item_lists_item_created_by_user_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package groups + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemSitesItemListsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type ItemSitesItemListsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemSitesItemListsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type ItemSitesItemListsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// ItemSitesItemListsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemSitesItemListsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemSitesItemListsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewItemSitesItemListsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewItemSitesItemListsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemListsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) { + m := &ItemSitesItemListsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/lists/{list%2Did}/createdByUser/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewItemSitesItemListsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewItemSitesItemListsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemListsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemSitesItemListsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *ItemSitesItemListsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesItemListsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *ItemSitesItemListsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemListsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemSitesItemListsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*ItemSitesItemListsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemSitesItemListsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/groups/item_sites_item_lists_item_created_by_user_service_provisioning_errors_request_builder.go b/groups/item_sites_item_lists_item_created_by_user_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..39f8154038c --- /dev/null +++ b/groups/item_sites_item_lists_item_created_by_user_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package groups + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemSitesItemListsItemCreatedByUserServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \groups\{group-id}\sites\{site-id}\lists\{list-id}\createdByUser\serviceProvisioningErrors +type ItemSitesItemListsItemCreatedByUserServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemSitesItemListsItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type ItemSitesItemListsItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// ItemSitesItemListsItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemSitesItemListsItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemSitesItemListsItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewItemSitesItemListsItemCreatedByUserServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemSitesItemListsItemCreatedByUserServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemListsItemCreatedByUserServiceProvisioningErrorsRequestBuilder) { + m := &ItemSitesItemListsItemCreatedByUserServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/lists/{list%2Did}/createdByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewItemSitesItemListsItemCreatedByUserServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemSitesItemListsItemCreatedByUserServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemListsItemCreatedByUserServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemSitesItemListsItemCreatedByUserServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *ItemSitesItemListsItemCreatedByUserServiceProvisioningErrorsRequestBuilder) Count()(*ItemSitesItemListsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemSitesItemListsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemSitesItemListsItemCreatedByUserServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesItemListsItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemSitesItemListsItemCreatedByUserServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemListsItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemSitesItemListsItemCreatedByUserServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*ItemSitesItemListsItemCreatedByUserServiceProvisioningErrorsRequestBuilder) { + return NewItemSitesItemListsItemCreatedByUserServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/groups/item_sites_item_lists_item_items_item_created_by_user_request_builder.go b/groups/item_sites_item_lists_item_items_item_created_by_user_request_builder.go index 21b5ca7ea49..8e6bb912fd3 100644 --- a/groups/item_sites_item_lists_item_items_item_created_by_user_request_builder.go +++ b/groups/item_sites_item_lists_item_items_item_created_by_user_request_builder.go @@ -63,6 +63,10 @@ func (m *ItemSitesItemListsItemItemsItemCreatedByUserRequestBuilder) Get(ctx con func (m *ItemSitesItemListsItemItemsItemCreatedByUserRequestBuilder) MailboxSettings()(*ItemSitesItemListsItemItemsItemCreatedByUserMailboxSettingsRequestBuilder) { return NewItemSitesItemListsItemItemsItemCreatedByUserMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *ItemSitesItemListsItemItemsItemCreatedByUserRequestBuilder) ServiceProvisioningErrors()(*ItemSitesItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder) { + return NewItemSitesItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation get createdByUser from groups func (m *ItemSitesItemListsItemItemsItemCreatedByUserRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemListsItemItemsItemCreatedByUserRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/groups/item_sites_item_lists_item_items_item_created_by_user_service_provisioning_errors_count_request_builder.go b/groups/item_sites_item_lists_item_items_item_created_by_user_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..189d33a142b --- /dev/null +++ b/groups/item_sites_item_lists_item_items_item_created_by_user_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package groups + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemSitesItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type ItemSitesItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemSitesItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type ItemSitesItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// ItemSitesItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemSitesItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemSitesItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewItemSitesItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewItemSitesItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) { + m := &ItemSitesItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/lists/{list%2Did}/items/{listItem%2Did}/createdByUser/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewItemSitesItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewItemSitesItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemSitesItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *ItemSitesItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *ItemSitesItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemSitesItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*ItemSitesItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemSitesItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/groups/item_sites_item_lists_item_items_item_created_by_user_service_provisioning_errors_request_builder.go b/groups/item_sites_item_lists_item_items_item_created_by_user_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..1a0c7e0b53b --- /dev/null +++ b/groups/item_sites_item_lists_item_items_item_created_by_user_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package groups + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemSitesItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \groups\{group-id}\sites\{site-id}\lists\{list-id}\items\{listItem-id}\createdByUser\serviceProvisioningErrors +type ItemSitesItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemSitesItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type ItemSitesItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// ItemSitesItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemSitesItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemSitesItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewItemSitesItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemSitesItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder) { + m := &ItemSitesItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/lists/{list%2Did}/items/{listItem%2Did}/createdByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewItemSitesItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemSitesItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemSitesItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *ItemSitesItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder) Count()(*ItemSitesItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemSitesItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemSitesItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemSitesItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemSitesItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*ItemSitesItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder) { + return NewItemSitesItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/groups/item_sites_item_lists_item_items_item_last_modified_by_user_request_builder.go b/groups/item_sites_item_lists_item_items_item_last_modified_by_user_request_builder.go index 16080cd102d..e7c52d22600 100644 --- a/groups/item_sites_item_lists_item_items_item_last_modified_by_user_request_builder.go +++ b/groups/item_sites_item_lists_item_items_item_last_modified_by_user_request_builder.go @@ -63,6 +63,10 @@ func (m *ItemSitesItemListsItemItemsItemLastModifiedByUserRequestBuilder) Get(ct func (m *ItemSitesItemListsItemItemsItemLastModifiedByUserRequestBuilder) MailboxSettings()(*ItemSitesItemListsItemItemsItemLastModifiedByUserMailboxSettingsRequestBuilder) { return NewItemSitesItemListsItemItemsItemLastModifiedByUserMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *ItemSitesItemListsItemItemsItemLastModifiedByUserRequestBuilder) ServiceProvisioningErrors()(*ItemSitesItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) { + return NewItemSitesItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation get lastModifiedByUser from groups func (m *ItemSitesItemListsItemItemsItemLastModifiedByUserRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemListsItemItemsItemLastModifiedByUserRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/groups/item_sites_item_lists_item_items_item_last_modified_by_user_service_provisioning_errors_count_request_builder.go b/groups/item_sites_item_lists_item_items_item_last_modified_by_user_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..94d4f0e72f0 --- /dev/null +++ b/groups/item_sites_item_lists_item_items_item_last_modified_by_user_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package groups + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemSitesItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type ItemSitesItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemSitesItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type ItemSitesItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// ItemSitesItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemSitesItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemSitesItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewItemSitesItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewItemSitesItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) { + m := &ItemSitesItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/lists/{list%2Did}/items/{listItem%2Did}/lastModifiedByUser/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewItemSitesItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewItemSitesItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemSitesItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *ItemSitesItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *ItemSitesItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemSitesItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*ItemSitesItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemSitesItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/groups/item_sites_item_lists_item_items_item_last_modified_by_user_service_provisioning_errors_request_builder.go b/groups/item_sites_item_lists_item_items_item_last_modified_by_user_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..b1561526341 --- /dev/null +++ b/groups/item_sites_item_lists_item_items_item_last_modified_by_user_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package groups + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemSitesItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \groups\{group-id}\sites\{site-id}\lists\{list-id}\items\{listItem-id}\lastModifiedByUser\serviceProvisioningErrors +type ItemSitesItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemSitesItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type ItemSitesItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// ItemSitesItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemSitesItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemSitesItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewItemSitesItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemSitesItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) { + m := &ItemSitesItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/lists/{list%2Did}/items/{listItem%2Did}/lastModifiedByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewItemSitesItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemSitesItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemSitesItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *ItemSitesItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) Count()(*ItemSitesItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemSitesItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemSitesItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemSitesItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemSitesItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*ItemSitesItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) { + return NewItemSitesItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/groups/item_sites_item_lists_item_last_modified_by_user_request_builder.go b/groups/item_sites_item_lists_item_last_modified_by_user_request_builder.go index b1812b9f128..441f1159c48 100644 --- a/groups/item_sites_item_lists_item_last_modified_by_user_request_builder.go +++ b/groups/item_sites_item_lists_item_last_modified_by_user_request_builder.go @@ -63,6 +63,10 @@ func (m *ItemSitesItemListsItemLastModifiedByUserRequestBuilder) Get(ctx context func (m *ItemSitesItemListsItemLastModifiedByUserRequestBuilder) MailboxSettings()(*ItemSitesItemListsItemLastModifiedByUserMailboxSettingsRequestBuilder) { return NewItemSitesItemListsItemLastModifiedByUserMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *ItemSitesItemListsItemLastModifiedByUserRequestBuilder) ServiceProvisioningErrors()(*ItemSitesItemListsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) { + return NewItemSitesItemListsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation get lastModifiedByUser from groups func (m *ItemSitesItemListsItemLastModifiedByUserRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemListsItemLastModifiedByUserRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/groups/item_sites_item_lists_item_last_modified_by_user_service_provisioning_errors_count_request_builder.go b/groups/item_sites_item_lists_item_last_modified_by_user_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..591555b08c4 --- /dev/null +++ b/groups/item_sites_item_lists_item_last_modified_by_user_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package groups + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemSitesItemListsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type ItemSitesItemListsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemSitesItemListsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type ItemSitesItemListsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// ItemSitesItemListsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemSitesItemListsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemSitesItemListsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewItemSitesItemListsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewItemSitesItemListsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemListsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) { + m := &ItemSitesItemListsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/lists/{list%2Did}/lastModifiedByUser/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewItemSitesItemListsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewItemSitesItemListsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemListsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemSitesItemListsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *ItemSitesItemListsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesItemListsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *ItemSitesItemListsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemListsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemSitesItemListsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*ItemSitesItemListsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemSitesItemListsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/groups/item_sites_item_lists_item_last_modified_by_user_service_provisioning_errors_request_builder.go b/groups/item_sites_item_lists_item_last_modified_by_user_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..b0e2b8b8616 --- /dev/null +++ b/groups/item_sites_item_lists_item_last_modified_by_user_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package groups + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemSitesItemListsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \groups\{group-id}\sites\{site-id}\lists\{list-id}\lastModifiedByUser\serviceProvisioningErrors +type ItemSitesItemListsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemSitesItemListsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type ItemSitesItemListsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// ItemSitesItemListsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemSitesItemListsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemSitesItemListsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewItemSitesItemListsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemSitesItemListsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemListsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) { + m := &ItemSitesItemListsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/lists/{list%2Did}/lastModifiedByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewItemSitesItemListsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemSitesItemListsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemListsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemSitesItemListsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *ItemSitesItemListsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) Count()(*ItemSitesItemListsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemSitesItemListsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemSitesItemListsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesItemListsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemSitesItemListsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemListsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemSitesItemListsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*ItemSitesItemListsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) { + return NewItemSitesItemListsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/groups/item_sites_item_lists_list_item_request_builder.go b/groups/item_sites_item_lists_list_item_request_builder.go index 6a9ab3696ed..34091ad41eb 100644 --- a/groups/item_sites_item_lists_list_item_request_builder.go +++ b/groups/item_sites_item_lists_list_item_request_builder.go @@ -18,7 +18,7 @@ type ItemSitesItemListsListItemRequestBuilderDeleteRequestConfiguration struct { // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// ItemSitesItemListsListItemRequestBuilderGetQueryParameters get the list of richLongRunningOperations associated with a list. +// ItemSitesItemListsListItemRequestBuilderGetQueryParameters return the metadata for a [list][]. type ItemSitesItemListsListItemRequestBuilderGetQueryParameters struct { // Expand related entities Expand []string `uriparametername:"%24expand"` @@ -90,10 +90,10 @@ func (m *ItemSitesItemListsListItemRequestBuilder) Delete(ctx context.Context, r func (m *ItemSitesItemListsListItemRequestBuilder) Drive()(*ItemSitesItemListsItemDriveRequestBuilder) { return NewItemSitesItemListsItemDriveRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Get get the list of richLongRunningOperations associated with a list. +// Get return the metadata for a [list][]. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/list-list-operations?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/list-get?view=graph-rest-1.0 func (m *ItemSitesItemListsListItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesItemListsListItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Listable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -159,7 +159,7 @@ func (m *ItemSitesItemListsListItemRequestBuilder) ToDeleteRequestInformation(ct } return requestInfo, nil } -// ToGetRequestInformation get the list of richLongRunningOperations associated with a list. +// ToGetRequestInformation return the metadata for a [list][]. func (m *ItemSitesItemListsListItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemListsListItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/groups/item_sites_item_pages_item_created_by_user_request_builder.go b/groups/item_sites_item_pages_item_created_by_user_request_builder.go index 2d2caff417e..82f9908d947 100644 --- a/groups/item_sites_item_pages_item_created_by_user_request_builder.go +++ b/groups/item_sites_item_pages_item_created_by_user_request_builder.go @@ -63,6 +63,10 @@ func (m *ItemSitesItemPagesItemCreatedByUserRequestBuilder) Get(ctx context.Cont func (m *ItemSitesItemPagesItemCreatedByUserRequestBuilder) MailboxSettings()(*ItemSitesItemPagesItemCreatedByUserMailboxSettingsRequestBuilder) { return NewItemSitesItemPagesItemCreatedByUserMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *ItemSitesItemPagesItemCreatedByUserRequestBuilder) ServiceProvisioningErrors()(*ItemSitesItemPagesItemCreatedByUserServiceProvisioningErrorsRequestBuilder) { + return NewItemSitesItemPagesItemCreatedByUserServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation get createdByUser from groups func (m *ItemSitesItemPagesItemCreatedByUserRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemPagesItemCreatedByUserRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/groups/item_sites_item_pages_item_created_by_user_service_provisioning_errors_count_request_builder.go b/groups/item_sites_item_pages_item_created_by_user_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..d7b297407b7 --- /dev/null +++ b/groups/item_sites_item_pages_item_created_by_user_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package groups + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemSitesItemPagesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type ItemSitesItemPagesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemSitesItemPagesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type ItemSitesItemPagesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// ItemSitesItemPagesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemSitesItemPagesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemSitesItemPagesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewItemSitesItemPagesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewItemSitesItemPagesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemPagesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) { + m := &ItemSitesItemPagesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/pages/{baseSitePage%2Did}/createdByUser/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewItemSitesItemPagesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewItemSitesItemPagesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemPagesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemSitesItemPagesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *ItemSitesItemPagesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesItemPagesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *ItemSitesItemPagesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemPagesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemSitesItemPagesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*ItemSitesItemPagesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemSitesItemPagesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/groups/item_sites_item_pages_item_created_by_user_service_provisioning_errors_request_builder.go b/groups/item_sites_item_pages_item_created_by_user_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..a0105c2c1a2 --- /dev/null +++ b/groups/item_sites_item_pages_item_created_by_user_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package groups + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemSitesItemPagesItemCreatedByUserServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \groups\{group-id}\sites\{site-id}\pages\{baseSitePage-id}\createdByUser\serviceProvisioningErrors +type ItemSitesItemPagesItemCreatedByUserServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemSitesItemPagesItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type ItemSitesItemPagesItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// ItemSitesItemPagesItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemSitesItemPagesItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemSitesItemPagesItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewItemSitesItemPagesItemCreatedByUserServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemSitesItemPagesItemCreatedByUserServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemPagesItemCreatedByUserServiceProvisioningErrorsRequestBuilder) { + m := &ItemSitesItemPagesItemCreatedByUserServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/pages/{baseSitePage%2Did}/createdByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewItemSitesItemPagesItemCreatedByUserServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemSitesItemPagesItemCreatedByUserServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemPagesItemCreatedByUserServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemSitesItemPagesItemCreatedByUserServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *ItemSitesItemPagesItemCreatedByUserServiceProvisioningErrorsRequestBuilder) Count()(*ItemSitesItemPagesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemSitesItemPagesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemSitesItemPagesItemCreatedByUserServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesItemPagesItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemSitesItemPagesItemCreatedByUserServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemPagesItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemSitesItemPagesItemCreatedByUserServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*ItemSitesItemPagesItemCreatedByUserServiceProvisioningErrorsRequestBuilder) { + return NewItemSitesItemPagesItemCreatedByUserServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/groups/item_sites_item_pages_item_last_modified_by_user_request_builder.go b/groups/item_sites_item_pages_item_last_modified_by_user_request_builder.go index a2e34fda3ea..f0019f271c8 100644 --- a/groups/item_sites_item_pages_item_last_modified_by_user_request_builder.go +++ b/groups/item_sites_item_pages_item_last_modified_by_user_request_builder.go @@ -63,6 +63,10 @@ func (m *ItemSitesItemPagesItemLastModifiedByUserRequestBuilder) Get(ctx context func (m *ItemSitesItemPagesItemLastModifiedByUserRequestBuilder) MailboxSettings()(*ItemSitesItemPagesItemLastModifiedByUserMailboxSettingsRequestBuilder) { return NewItemSitesItemPagesItemLastModifiedByUserMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *ItemSitesItemPagesItemLastModifiedByUserRequestBuilder) ServiceProvisioningErrors()(*ItemSitesItemPagesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) { + return NewItemSitesItemPagesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation get lastModifiedByUser from groups func (m *ItemSitesItemPagesItemLastModifiedByUserRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemPagesItemLastModifiedByUserRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/groups/item_sites_item_pages_item_last_modified_by_user_service_provisioning_errors_count_request_builder.go b/groups/item_sites_item_pages_item_last_modified_by_user_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..1bc6739acf3 --- /dev/null +++ b/groups/item_sites_item_pages_item_last_modified_by_user_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package groups + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemSitesItemPagesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type ItemSitesItemPagesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemSitesItemPagesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type ItemSitesItemPagesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// ItemSitesItemPagesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemSitesItemPagesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemSitesItemPagesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewItemSitesItemPagesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewItemSitesItemPagesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemPagesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) { + m := &ItemSitesItemPagesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/pages/{baseSitePage%2Did}/lastModifiedByUser/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewItemSitesItemPagesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewItemSitesItemPagesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemPagesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemSitesItemPagesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *ItemSitesItemPagesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesItemPagesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *ItemSitesItemPagesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemPagesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemSitesItemPagesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*ItemSitesItemPagesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemSitesItemPagesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/groups/item_sites_item_pages_item_last_modified_by_user_service_provisioning_errors_request_builder.go b/groups/item_sites_item_pages_item_last_modified_by_user_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..bdc48d68d68 --- /dev/null +++ b/groups/item_sites_item_pages_item_last_modified_by_user_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package groups + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemSitesItemPagesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \groups\{group-id}\sites\{site-id}\pages\{baseSitePage-id}\lastModifiedByUser\serviceProvisioningErrors +type ItemSitesItemPagesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemSitesItemPagesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type ItemSitesItemPagesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// ItemSitesItemPagesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemSitesItemPagesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemSitesItemPagesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewItemSitesItemPagesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemSitesItemPagesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemPagesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) { + m := &ItemSitesItemPagesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/pages/{baseSitePage%2Did}/lastModifiedByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewItemSitesItemPagesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemSitesItemPagesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSitesItemPagesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemSitesItemPagesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *ItemSitesItemPagesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) Count()(*ItemSitesItemPagesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemSitesItemPagesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemSitesItemPagesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesItemPagesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemSitesItemPagesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemPagesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemSitesItemPagesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*ItemSitesItemPagesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) { + return NewItemSitesItemPagesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/groups/item_team_channels_item_members_conversation_member_item_request_builder.go b/groups/item_team_channels_item_members_conversation_member_item_request_builder.go index 35d16252c1d..8bebbb1c5da 100644 --- a/groups/item_team_channels_item_members_conversation_member_item_request_builder.go +++ b/groups/item_team_channels_item_members_conversation_member_item_request_builder.go @@ -95,10 +95,10 @@ func (m *ItemTeamChannelsItemMembersConversationMemberItemRequestBuilder) Get(ct } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable), nil } -// Patch update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. +// Patch update the role of a conversationMember in a team.or channel. // [Find more info here] // -// [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 func (m *ItemTeamChannelsItemMembersConversationMemberItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable, requestConfiguration *ItemTeamChannelsItemMembersConversationMemberItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable, error) { requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -145,7 +145,7 @@ func (m *ItemTeamChannelsItemMembersConversationMemberItemRequestBuilder) ToGetR } return requestInfo, nil } -// ToPatchRequestInformation update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. +// ToPatchRequestInformation update the role of a conversationMember in a team.or channel. func (m *ItemTeamChannelsItemMembersConversationMemberItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable, requestConfiguration *ItemTeamChannelsItemMembersConversationMemberItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/groups/item_team_channels_item_messages_request_builder.go b/groups/item_team_channels_item_messages_request_builder.go index e69e4c6707e..4ff69a16590 100644 --- a/groups/item_team_channels_item_messages_request_builder.go +++ b/groups/item_team_channels_item_messages_request_builder.go @@ -100,10 +100,10 @@ func (m *ItemTeamChannelsItemMessagesRequestBuilder) Get(ctx context.Context, re } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageCollectionResponseable), nil } -// Post send a new chatMessage in the specified channel. +// Post send a new chatMessage in the specified channel or a chat. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/channel-post-messages?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/chatmessage-post?view=graph-rest-1.0 func (m *ItemTeamChannelsItemMessagesRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, requestConfiguration *ItemTeamChannelsItemMessagesRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -138,7 +138,7 @@ func (m *ItemTeamChannelsItemMessagesRequestBuilder) ToGetRequestInformation(ctx } return requestInfo, nil } -// ToPostRequestInformation send a new chatMessage in the specified channel. +// ToPostRequestInformation send a new chatMessage in the specified channel or a chat. func (m *ItemTeamChannelsItemMessagesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, requestConfiguration *ItemTeamChannelsItemMessagesRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/groups/item_team_group_request_builder.go b/groups/item_team_group_request_builder.go index 8eeaae325e2..d92ede6b138 100644 --- a/groups/item_team_group_request_builder.go +++ b/groups/item_team_group_request_builder.go @@ -59,6 +59,10 @@ func (m *ItemTeamGroupRequestBuilder) Get(ctx context.Context, requestConfigurat } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Groupable), nil } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *ItemTeamGroupRequestBuilder) ServiceProvisioningErrors()(*ItemTeamGroupServiceProvisioningErrorsRequestBuilder) { + return NewItemTeamGroupServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation get group from groups func (m *ItemTeamGroupRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemTeamGroupRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/groups/item_team_group_service_provisioning_errors_count_request_builder.go b/groups/item_team_group_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..9f8e928255e --- /dev/null +++ b/groups/item_team_group_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package groups + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemTeamGroupServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type ItemTeamGroupServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemTeamGroupServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type ItemTeamGroupServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// ItemTeamGroupServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemTeamGroupServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemTeamGroupServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewItemTeamGroupServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewItemTeamGroupServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamGroupServiceProvisioningErrorsCountRequestBuilder) { + m := &ItemTeamGroupServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{group%2Did}/team/group/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewItemTeamGroupServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewItemTeamGroupServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamGroupServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamGroupServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *ItemTeamGroupServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemTeamGroupServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *ItemTeamGroupServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemTeamGroupServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemTeamGroupServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*ItemTeamGroupServiceProvisioningErrorsCountRequestBuilder) { + return NewItemTeamGroupServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/groups/item_team_group_service_provisioning_errors_request_builder.go b/groups/item_team_group_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..dff19a5dcb1 --- /dev/null +++ b/groups/item_team_group_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package groups + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemTeamGroupServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \groups\{group-id}\team\group\serviceProvisioningErrors +type ItemTeamGroupServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemTeamGroupServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +type ItemTeamGroupServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// ItemTeamGroupServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemTeamGroupServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemTeamGroupServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewItemTeamGroupServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemTeamGroupServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamGroupServiceProvisioningErrorsRequestBuilder) { + m := &ItemTeamGroupServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{group%2Did}/team/group/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewItemTeamGroupServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemTeamGroupServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamGroupServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamGroupServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *ItemTeamGroupServiceProvisioningErrorsRequestBuilder) Count()(*ItemTeamGroupServiceProvisioningErrorsCountRequestBuilder) { + return NewItemTeamGroupServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemTeamGroupServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemTeamGroupServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemTeamGroupServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemTeamGroupServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemTeamGroupServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*ItemTeamGroupServiceProvisioningErrorsRequestBuilder) { + return NewItemTeamGroupServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/groups/item_team_owners_item_service_provisioning_errors_count_request_builder.go b/groups/item_team_owners_item_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..7fa7bb3a9cc --- /dev/null +++ b/groups/item_team_owners_item_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package groups + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemTeamOwnersItemServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type ItemTeamOwnersItemServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemTeamOwnersItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type ItemTeamOwnersItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// ItemTeamOwnersItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemTeamOwnersItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemTeamOwnersItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewItemTeamOwnersItemServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewItemTeamOwnersItemServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamOwnersItemServiceProvisioningErrorsCountRequestBuilder) { + m := &ItemTeamOwnersItemServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{group%2Did}/team/owners/{user%2Did}/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewItemTeamOwnersItemServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewItemTeamOwnersItemServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamOwnersItemServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamOwnersItemServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *ItemTeamOwnersItemServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemTeamOwnersItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *ItemTeamOwnersItemServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemTeamOwnersItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemTeamOwnersItemServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*ItemTeamOwnersItemServiceProvisioningErrorsCountRequestBuilder) { + return NewItemTeamOwnersItemServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/groups/item_team_owners_item_service_provisioning_errors_request_builder.go b/groups/item_team_owners_item_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..95b2b4f4904 --- /dev/null +++ b/groups/item_team_owners_item_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package groups + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemTeamOwnersItemServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \groups\{group-id}\team\owners\{user-id}\serviceProvisioningErrors +type ItemTeamOwnersItemServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemTeamOwnersItemServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type ItemTeamOwnersItemServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// ItemTeamOwnersItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemTeamOwnersItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemTeamOwnersItemServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewItemTeamOwnersItemServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemTeamOwnersItemServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamOwnersItemServiceProvisioningErrorsRequestBuilder) { + m := &ItemTeamOwnersItemServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{group%2Did}/team/owners/{user%2Did}/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewItemTeamOwnersItemServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemTeamOwnersItemServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamOwnersItemServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamOwnersItemServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *ItemTeamOwnersItemServiceProvisioningErrorsRequestBuilder) Count()(*ItemTeamOwnersItemServiceProvisioningErrorsCountRequestBuilder) { + return NewItemTeamOwnersItemServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemTeamOwnersItemServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemTeamOwnersItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemTeamOwnersItemServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemTeamOwnersItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemTeamOwnersItemServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*ItemTeamOwnersItemServiceProvisioningErrorsRequestBuilder) { + return NewItemTeamOwnersItemServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/groups/item_team_owners_user_item_request_builder.go b/groups/item_team_owners_user_item_request_builder.go index 2755d8a2c15..9265ae1854a 100644 --- a/groups/item_team_owners_user_item_request_builder.go +++ b/groups/item_team_owners_user_item_request_builder.go @@ -63,6 +63,10 @@ func (m *ItemTeamOwnersUserItemRequestBuilder) Get(ctx context.Context, requestC func (m *ItemTeamOwnersUserItemRequestBuilder) MailboxSettings()(*ItemTeamOwnersItemMailboxSettingsRequestBuilder) { return NewItemTeamOwnersItemMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *ItemTeamOwnersUserItemRequestBuilder) ServiceProvisioningErrors()(*ItemTeamOwnersItemServiceProvisioningErrorsRequestBuilder) { + return NewItemTeamOwnersItemServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation the list of this team's owners. Currently, when creating a team using application permissions, exactly one owner must be specified. When using user delegated permissions, no owner can be specified (the current user is the owner). Owner must be specified as an object ID (GUID), not a UPN. func (m *ItemTeamOwnersUserItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemTeamOwnersUserItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/groups/item_team_primary_channel_members_conversation_member_item_request_builder.go b/groups/item_team_primary_channel_members_conversation_member_item_request_builder.go index 3bcfa3e8320..c0d5414aada 100644 --- a/groups/item_team_primary_channel_members_conversation_member_item_request_builder.go +++ b/groups/item_team_primary_channel_members_conversation_member_item_request_builder.go @@ -95,10 +95,10 @@ func (m *ItemTeamPrimaryChannelMembersConversationMemberItemRequestBuilder) Get( } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable), nil } -// Patch update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. +// Patch update the role of a conversationMember in a team.or channel. // [Find more info here] // -// [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 func (m *ItemTeamPrimaryChannelMembersConversationMemberItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable, requestConfiguration *ItemTeamPrimaryChannelMembersConversationMemberItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable, error) { requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -145,7 +145,7 @@ func (m *ItemTeamPrimaryChannelMembersConversationMemberItemRequestBuilder) ToGe } return requestInfo, nil } -// ToPatchRequestInformation update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. +// ToPatchRequestInformation update the role of a conversationMember in a team.or channel. func (m *ItemTeamPrimaryChannelMembersConversationMemberItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable, requestConfiguration *ItemTeamPrimaryChannelMembersConversationMemberItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/groups/item_team_primary_channel_messages_request_builder.go b/groups/item_team_primary_channel_messages_request_builder.go index c7f151fcb62..53d9eeeff0c 100644 --- a/groups/item_team_primary_channel_messages_request_builder.go +++ b/groups/item_team_primary_channel_messages_request_builder.go @@ -100,10 +100,10 @@ func (m *ItemTeamPrimaryChannelMessagesRequestBuilder) Get(ctx context.Context, } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageCollectionResponseable), nil } -// Post send a new chatMessage in the specified channel. +// Post send a new chatMessage in the specified channel or a chat. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/channel-post-messages?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/chatmessage-post?view=graph-rest-1.0 func (m *ItemTeamPrimaryChannelMessagesRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, requestConfiguration *ItemTeamPrimaryChannelMessagesRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -138,7 +138,7 @@ func (m *ItemTeamPrimaryChannelMessagesRequestBuilder) ToGetRequestInformation(c } return requestInfo, nil } -// ToPostRequestInformation send a new chatMessage in the specified channel. +// ToPostRequestInformation send a new chatMessage in the specified channel or a chat. func (m *ItemTeamPrimaryChannelMessagesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, requestConfiguration *ItemTeamPrimaryChannelMessagesRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/groups/item_threads_conversation_thread_item_request_builder.go b/groups/item_threads_conversation_thread_item_request_builder.go index e7d2ee0daa1..56cccbd16cf 100644 --- a/groups/item_threads_conversation_thread_item_request_builder.go +++ b/groups/item_threads_conversation_thread_item_request_builder.go @@ -52,10 +52,10 @@ func NewItemThreadsConversationThreadItemRequestBuilder(rawUrl string, requestAd urlParams["request-raw-url"] = rawUrl return NewItemThreadsConversationThreadItemRequestBuilderInternal(urlParams, requestAdapter) } -// Delete delete conversationThread. +// Delete delete a thread object. // [Find more info here] // -// [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 func (m *ItemThreadsConversationThreadItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *ItemThreadsConversationThreadItemRequestBuilderDeleteRequestConfiguration)(error) { requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); if err != nil { @@ -123,7 +123,7 @@ func (m *ItemThreadsConversationThreadItemRequestBuilder) Posts()(*ItemThreadsIt func (m *ItemThreadsConversationThreadItemRequestBuilder) Reply()(*ItemThreadsItemReplyRequestBuilder) { return NewItemThreadsItemReplyRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// ToDeleteRequestInformation delete conversationThread. +// ToDeleteRequestInformation delete a thread object. func (m *ItemThreadsConversationThreadItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *ItemThreadsConversationThreadItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/groups/item_threads_item_reply_request_builder.go b/groups/item_threads_item_reply_request_builder.go index 5858e5efbb1..c4484b004e2 100644 --- a/groups/item_threads_item_reply_request_builder.go +++ b/groups/item_threads_item_reply_request_builder.go @@ -30,10 +30,10 @@ func NewItemThreadsItemReplyRequestBuilder(rawUrl string, requestAdapter i2ae418 urlParams["request-raw-url"] = rawUrl return NewItemThreadsItemReplyRequestBuilderInternal(urlParams, requestAdapter) } -// Post reply to a thread in a group conversation and add a new post to it. You can specify the parent conversation in the request, or, you can specify just the thread without the parent conversation. +// Post 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. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/conversationthread-reply?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/post-post-attachments?view=graph-rest-1.0 func (m *ItemThreadsItemReplyRequestBuilder) Post(ctx context.Context, body ItemThreadsItemReplyPostRequestBodyable, requestConfiguration *ItemThreadsItemReplyRequestBuilderPostRequestConfiguration)(error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -49,7 +49,7 @@ func (m *ItemThreadsItemReplyRequestBuilder) Post(ctx context.Context, body Item } return nil } -// ToPostRequestInformation reply to a thread in a group conversation and add a new post to it. You can specify the parent conversation in the request, or, you can specify just the thread without the parent conversation. +// ToPostRequestInformation 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. func (m *ItemThreadsItemReplyRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemThreadsItemReplyPostRequestBodyable, requestConfiguration *ItemThreadsItemReplyRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/identity/conditional_access_authentication_strength_policies_item_combination_configurations_authentication_combination_configuration_item_request_builder.go b/identity/conditional_access_authentication_strength_policies_item_combination_configurations_authentication_combination_configuration_item_request_builder.go index 694eb476e81..8e745d7ff51 100644 --- a/identity/conditional_access_authentication_strength_policies_item_combination_configurations_authentication_combination_configuration_item_request_builder.go +++ b/identity/conditional_access_authentication_strength_policies_item_combination_configurations_authentication_combination_configuration_item_request_builder.go @@ -95,7 +95,7 @@ func (m *ConditionalAccessAuthenticationStrengthPoliciesItemCombinationConfigura } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AuthenticationCombinationConfigurationable), nil } -// Patch 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. +// Patch 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. // [Find more info here] // // [Find more info here]: https://learn.microsoft.com/graph/api/authenticationcombinationconfiguration-update?view=graph-rest-1.0 @@ -145,7 +145,7 @@ func (m *ConditionalAccessAuthenticationStrengthPoliciesItemCombinationConfigura } return requestInfo, nil } -// ToPatchRequestInformation 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. +// ToPatchRequestInformation 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. func (m *ConditionalAccessAuthenticationStrengthPoliciesItemCombinationConfigurationsAuthenticationCombinationConfigurationItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AuthenticationCombinationConfigurationable, requestConfiguration *ConditionalAccessAuthenticationStrengthPoliciesItemCombinationConfigurationsAuthenticationCombinationConfigurationItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/identity/conditional_access_authentication_strengths_policies_item_combination_configurations_authentication_combination_configuration_item_request_builder.go b/identity/conditional_access_authentication_strengths_policies_item_combination_configurations_authentication_combination_configuration_item_request_builder.go index 2655be92844..87bdb2720d0 100644 --- a/identity/conditional_access_authentication_strengths_policies_item_combination_configurations_authentication_combination_configuration_item_request_builder.go +++ b/identity/conditional_access_authentication_strengths_policies_item_combination_configurations_authentication_combination_configuration_item_request_builder.go @@ -97,7 +97,7 @@ func (m *ConditionalAccessAuthenticationStrengthsPoliciesItemCombinationConfigur } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AuthenticationCombinationConfigurationable), nil } -// Patch 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. +// Patch 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. // Deprecated: The 'authenticationStrengths' segment is deprecated. Please use 'authenticationStrength' instead. as of 2023-02/AuthenticationStrengthsRemove on 2023-02-01 and will be removed 2023-03-31 // [Find more info here] // @@ -150,7 +150,7 @@ func (m *ConditionalAccessAuthenticationStrengthsPoliciesItemCombinationConfigur } return requestInfo, nil } -// ToPatchRequestInformation 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. +// ToPatchRequestInformation 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. // Deprecated: The 'authenticationStrengths' segment is deprecated. Please use 'authenticationStrength' instead. as of 2023-02/AuthenticationStrengthsRemove on 2023-02-01 and will be removed 2023-03-31 func (m *ConditionalAccessAuthenticationStrengthsPoliciesItemCombinationConfigurationsAuthenticationCombinationConfigurationItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AuthenticationCombinationConfigurationable, requestConfiguration *ConditionalAccessAuthenticationStrengthsPoliciesItemCombinationConfigurationsAuthenticationCombinationConfigurationItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/identity/conditional_access_named_locations_named_location_item_request_builder.go b/identity/conditional_access_named_locations_named_location_item_request_builder.go index 198a1c09620..c7c2f9bb043 100644 --- a/identity/conditional_access_named_locations_named_location_item_request_builder.go +++ b/identity/conditional_access_named_locations_named_location_item_request_builder.go @@ -18,7 +18,7 @@ type ConditionalAccessNamedLocationsNamedLocationItemRequestBuilderDeleteRequest // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// ConditionalAccessNamedLocationsNamedLocationItemRequestBuilderGetQueryParameters retrieve the properties and relationships of a namedLocation object. +// ConditionalAccessNamedLocationsNamedLocationItemRequestBuilderGetQueryParameters retrieve the properties and relationships of an ipNamedLocation object. type ConditionalAccessNamedLocationsNamedLocationItemRequestBuilderGetQueryParameters struct { // Expand related entities Expand []string `uriparametername:"%24expand"` @@ -54,10 +54,10 @@ func NewConditionalAccessNamedLocationsNamedLocationItemRequestBuilder(rawUrl st urlParams["request-raw-url"] = rawUrl return NewConditionalAccessNamedLocationsNamedLocationItemRequestBuilderInternal(urlParams, requestAdapter) } -// Delete delete a namedLocation object. +// Delete delete a countryNamedLocation object. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/namedlocation-delete?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/countrynamedlocation-delete?view=graph-rest-1.0 func (m *ConditionalAccessNamedLocationsNamedLocationItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *ConditionalAccessNamedLocationsNamedLocationItemRequestBuilderDeleteRequestConfiguration)(error) { requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); if err != nil { @@ -73,10 +73,10 @@ func (m *ConditionalAccessNamedLocationsNamedLocationItemRequestBuilder) Delete( } return nil } -// Get retrieve the properties and relationships of a namedLocation object. +// Get retrieve the properties and relationships of an ipNamedLocation object. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/namedlocation-get?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/ipnamedlocation-get?view=graph-rest-1.0 func (m *ConditionalAccessNamedLocationsNamedLocationItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ConditionalAccessNamedLocationsNamedLocationItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.NamedLocationable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -117,7 +117,7 @@ func (m *ConditionalAccessNamedLocationsNamedLocationItemRequestBuilder) Patch(c } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.NamedLocationable), nil } -// ToDeleteRequestInformation delete a namedLocation object. +// ToDeleteRequestInformation delete a countryNamedLocation object. func (m *ConditionalAccessNamedLocationsNamedLocationItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *ConditionalAccessNamedLocationsNamedLocationItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate @@ -129,7 +129,7 @@ func (m *ConditionalAccessNamedLocationsNamedLocationItemRequestBuilder) ToDelet } return requestInfo, nil } -// ToGetRequestInformation retrieve the properties and relationships of a namedLocation object. +// ToGetRequestInformation retrieve the properties and relationships of an ipNamedLocation object. func (m *ConditionalAccessNamedLocationsNamedLocationItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ConditionalAccessNamedLocationsNamedLocationItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/identity/user_flow_attributes_identity_user_flow_attribute_item_request_builder.go b/identity/user_flow_attributes_identity_user_flow_attribute_item_request_builder.go index 100bd4e0978..dbc245207d1 100644 --- a/identity/user_flow_attributes_identity_user_flow_attribute_item_request_builder.go +++ b/identity/user_flow_attributes_identity_user_flow_attribute_item_request_builder.go @@ -54,7 +54,7 @@ func NewUserFlowAttributesIdentityUserFlowAttributeItemRequestBuilder(rawUrl str urlParams["request-raw-url"] = rawUrl return NewUserFlowAttributesIdentityUserFlowAttributeItemRequestBuilderInternal(urlParams, requestAdapter) } -// Delete delete an identityUserFlowAttribute. Only custom user flow attributes can be deleted. +// Delete delete a custom identityUserFlowAttribute. // [Find more info here] // // [Find more info here]: https://learn.microsoft.com/graph/api/identityuserflowattribute-delete?view=graph-rest-1.0 @@ -95,7 +95,7 @@ func (m *UserFlowAttributesIdentityUserFlowAttributeItemRequestBuilder) Get(ctx } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.IdentityUserFlowAttributeable), nil } -// Patch update the properties of a identityUserFlowAttribute object. Only custom user flow attributes can be updated. +// Patch update the properties of a custom identityUserFlowAttribute object. // [Find more info here] // // [Find more info here]: https://learn.microsoft.com/graph/api/identityuserflowattribute-update?view=graph-rest-1.0 @@ -117,7 +117,7 @@ func (m *UserFlowAttributesIdentityUserFlowAttributeItemRequestBuilder) Patch(ct } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.IdentityUserFlowAttributeable), nil } -// ToDeleteRequestInformation delete an identityUserFlowAttribute. Only custom user flow attributes can be deleted. +// ToDeleteRequestInformation delete a custom identityUserFlowAttribute. func (m *UserFlowAttributesIdentityUserFlowAttributeItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *UserFlowAttributesIdentityUserFlowAttributeItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate @@ -145,7 +145,7 @@ func (m *UserFlowAttributesIdentityUserFlowAttributeItemRequestBuilder) ToGetReq } return requestInfo, nil } -// ToPatchRequestInformation update the properties of a identityUserFlowAttribute object. Only custom user flow attributes can be updated. +// ToPatchRequestInformation update the properties of a custom identityUserFlowAttribute object. func (m *UserFlowAttributesIdentityUserFlowAttributeItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.IdentityUserFlowAttributeable, requestConfiguration *UserFlowAttributesIdentityUserFlowAttributeItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/identity/user_flow_attributes_request_builder.go b/identity/user_flow_attributes_request_builder.go index bf1cdd7eb0e..90c6996199c 100644 --- a/identity/user_flow_attributes_request_builder.go +++ b/identity/user_flow_attributes_request_builder.go @@ -96,7 +96,7 @@ func (m *UserFlowAttributesRequestBuilder) Get(ctx context.Context, requestConfi } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.IdentityUserFlowAttributeCollectionResponseable), nil } -// Post create a new identityUserFlowAttribute object. +// Post create a new custom identityUserFlowAttribute object. // [Find more info here] // // [Find more info here]: https://learn.microsoft.com/graph/api/identityuserflowattribute-post?view=graph-rest-1.0 @@ -134,7 +134,7 @@ func (m *UserFlowAttributesRequestBuilder) ToGetRequestInformation(ctx context.C } return requestInfo, nil } -// ToPostRequestInformation create a new identityUserFlowAttribute object. +// ToPostRequestInformation create a new custom identityUserFlowAttribute object. func (m *UserFlowAttributesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.IdentityUserFlowAttributeable, requestConfiguration *UserFlowAttributesRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/identitygovernance/entitlement_management_access_package_assignment_policies_item_custom_extension_handlers_item_custom_extension_request_builder.go b/identitygovernance/entitlement_management_access_package_assignment_policies_item_custom_extension_handlers_item_custom_extension_request_builder.go index dd9d19b6fd4..2f2515ac49c 100644 --- a/identitygovernance/entitlement_management_access_package_assignment_policies_item_custom_extension_handlers_item_custom_extension_request_builder.go +++ b/identitygovernance/entitlement_management_access_package_assignment_policies_item_custom_extension_handlers_item_custom_extension_request_builder.go @@ -11,7 +11,7 @@ import ( type EntitlementManagementAccessPackageAssignmentPoliciesItemCustomExtensionHandlersItemCustomExtensionRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// EntitlementManagementAccessPackageAssignmentPoliciesItemCustomExtensionHandlersItemCustomExtensionRequestBuilderGetQueryParameters indicates which custom workflow extension will be executed at this stage. Nullable. Supports $expand. +// EntitlementManagementAccessPackageAssignmentPoliciesItemCustomExtensionHandlersItemCustomExtensionRequestBuilderGetQueryParameters indicates which custom workflow extension is executed at this stage. Nullable. Supports $expand. type EntitlementManagementAccessPackageAssignmentPoliciesItemCustomExtensionHandlersItemCustomExtensionRequestBuilderGetQueryParameters struct { // Expand related entities Expand []string `uriparametername:"%24expand"` @@ -40,7 +40,7 @@ func NewEntitlementManagementAccessPackageAssignmentPoliciesItemCustomExtensionH urlParams["request-raw-url"] = rawUrl return NewEntitlementManagementAccessPackageAssignmentPoliciesItemCustomExtensionHandlersItemCustomExtensionRequestBuilderInternal(urlParams, requestAdapter) } -// Get indicates which custom workflow extension will be executed at this stage. Nullable. Supports $expand. +// Get indicates which custom workflow extension is executed at this stage. Nullable. Supports $expand. // Deprecated: as of 2022-10/PrivatePreview:MicrosofEntitlementManagementCustomextensions on 2023-03-01 and will be removed 2023-12-31 func (m *EntitlementManagementAccessPackageAssignmentPoliciesItemCustomExtensionHandlersItemCustomExtensionRequestBuilder) Get(ctx context.Context, requestConfiguration *EntitlementManagementAccessPackageAssignmentPoliciesItemCustomExtensionHandlersItemCustomExtensionRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CustomAccessPackageWorkflowExtensionable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); @@ -60,7 +60,7 @@ func (m *EntitlementManagementAccessPackageAssignmentPoliciesItemCustomExtension } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CustomAccessPackageWorkflowExtensionable), nil } -// ToGetRequestInformation indicates which custom workflow extension will be executed at this stage. Nullable. Supports $expand. +// ToGetRequestInformation indicates which custom workflow extension is executed at this stage. Nullable. Supports $expand. // Deprecated: as of 2022-10/PrivatePreview:MicrosofEntitlementManagementCustomextensions on 2023-03-01 and will be removed 2023-12-31 func (m *EntitlementManagementAccessPackageAssignmentPoliciesItemCustomExtensionHandlersItemCustomExtensionRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *EntitlementManagementAccessPackageAssignmentPoliciesItemCustomExtensionHandlersItemCustomExtensionRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/identitygovernance/entitlement_management_access_package_assignments_item_access_package_access_package_assignment_policies_item_custom_extension_handlers_item_custom_extension_request_builder.go b/identitygovernance/entitlement_management_access_package_assignments_item_access_package_access_package_assignment_policies_item_custom_extension_handlers_item_custom_extension_request_builder.go index 6d9468a74cb..7d0632baaf7 100644 --- a/identitygovernance/entitlement_management_access_package_assignments_item_access_package_access_package_assignment_policies_item_custom_extension_handlers_item_custom_extension_request_builder.go +++ b/identitygovernance/entitlement_management_access_package_assignments_item_access_package_access_package_assignment_policies_item_custom_extension_handlers_item_custom_extension_request_builder.go @@ -11,7 +11,7 @@ import ( type EntitlementManagementAccessPackageAssignmentsItemAccessPackageAccessPackageAssignmentPoliciesItemCustomExtensionHandlersItemCustomExtensionRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// EntitlementManagementAccessPackageAssignmentsItemAccessPackageAccessPackageAssignmentPoliciesItemCustomExtensionHandlersItemCustomExtensionRequestBuilderGetQueryParameters indicates which custom workflow extension will be executed at this stage. Nullable. Supports $expand. +// EntitlementManagementAccessPackageAssignmentsItemAccessPackageAccessPackageAssignmentPoliciesItemCustomExtensionHandlersItemCustomExtensionRequestBuilderGetQueryParameters indicates which custom workflow extension is executed at this stage. Nullable. Supports $expand. type EntitlementManagementAccessPackageAssignmentsItemAccessPackageAccessPackageAssignmentPoliciesItemCustomExtensionHandlersItemCustomExtensionRequestBuilderGetQueryParameters struct { // Expand related entities Expand []string `uriparametername:"%24expand"` @@ -40,7 +40,7 @@ func NewEntitlementManagementAccessPackageAssignmentsItemAccessPackageAccessPack urlParams["request-raw-url"] = rawUrl return NewEntitlementManagementAccessPackageAssignmentsItemAccessPackageAccessPackageAssignmentPoliciesItemCustomExtensionHandlersItemCustomExtensionRequestBuilderInternal(urlParams, requestAdapter) } -// Get indicates which custom workflow extension will be executed at this stage. Nullable. Supports $expand. +// Get indicates which custom workflow extension is executed at this stage. Nullable. Supports $expand. // Deprecated: as of 2022-10/PrivatePreview:MicrosofEntitlementManagementCustomextensions on 2023-03-01 and will be removed 2023-12-31 func (m *EntitlementManagementAccessPackageAssignmentsItemAccessPackageAccessPackageAssignmentPoliciesItemCustomExtensionHandlersItemCustomExtensionRequestBuilder) Get(ctx context.Context, requestConfiguration *EntitlementManagementAccessPackageAssignmentsItemAccessPackageAccessPackageAssignmentPoliciesItemCustomExtensionHandlersItemCustomExtensionRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CustomAccessPackageWorkflowExtensionable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); @@ -60,7 +60,7 @@ func (m *EntitlementManagementAccessPackageAssignmentsItemAccessPackageAccessPac } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CustomAccessPackageWorkflowExtensionable), nil } -// ToGetRequestInformation indicates which custom workflow extension will be executed at this stage. Nullable. Supports $expand. +// ToGetRequestInformation indicates which custom workflow extension is executed at this stage. Nullable. Supports $expand. // Deprecated: as of 2022-10/PrivatePreview:MicrosofEntitlementManagementCustomextensions on 2023-03-01 and will be removed 2023-12-31 func (m *EntitlementManagementAccessPackageAssignmentsItemAccessPackageAccessPackageAssignmentPoliciesItemCustomExtensionHandlersItemCustomExtensionRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *EntitlementManagementAccessPackageAssignmentsItemAccessPackageAccessPackageAssignmentPoliciesItemCustomExtensionHandlersItemCustomExtensionRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/identitygovernance/entitlement_management_access_package_assignments_item_access_package_assignment_policy_custom_extension_handlers_item_custom_extension_request_builder.go b/identitygovernance/entitlement_management_access_package_assignments_item_access_package_assignment_policy_custom_extension_handlers_item_custom_extension_request_builder.go index 33601e7acfb..b4bd2160741 100644 --- a/identitygovernance/entitlement_management_access_package_assignments_item_access_package_assignment_policy_custom_extension_handlers_item_custom_extension_request_builder.go +++ b/identitygovernance/entitlement_management_access_package_assignments_item_access_package_assignment_policy_custom_extension_handlers_item_custom_extension_request_builder.go @@ -11,7 +11,7 @@ import ( type EntitlementManagementAccessPackageAssignmentsItemAccessPackageAssignmentPolicyCustomExtensionHandlersItemCustomExtensionRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// EntitlementManagementAccessPackageAssignmentsItemAccessPackageAssignmentPolicyCustomExtensionHandlersItemCustomExtensionRequestBuilderGetQueryParameters indicates which custom workflow extension will be executed at this stage. Nullable. Supports $expand. +// EntitlementManagementAccessPackageAssignmentsItemAccessPackageAssignmentPolicyCustomExtensionHandlersItemCustomExtensionRequestBuilderGetQueryParameters indicates which custom workflow extension is executed at this stage. Nullable. Supports $expand. type EntitlementManagementAccessPackageAssignmentsItemAccessPackageAssignmentPolicyCustomExtensionHandlersItemCustomExtensionRequestBuilderGetQueryParameters struct { // Expand related entities Expand []string `uriparametername:"%24expand"` @@ -40,7 +40,7 @@ func NewEntitlementManagementAccessPackageAssignmentsItemAccessPackageAssignment urlParams["request-raw-url"] = rawUrl return NewEntitlementManagementAccessPackageAssignmentsItemAccessPackageAssignmentPolicyCustomExtensionHandlersItemCustomExtensionRequestBuilderInternal(urlParams, requestAdapter) } -// Get indicates which custom workflow extension will be executed at this stage. Nullable. Supports $expand. +// Get indicates which custom workflow extension is executed at this stage. Nullable. Supports $expand. // Deprecated: as of 2022-10/PrivatePreview:MicrosofEntitlementManagementCustomextensions on 2023-03-01 and will be removed 2023-12-31 func (m *EntitlementManagementAccessPackageAssignmentsItemAccessPackageAssignmentPolicyCustomExtensionHandlersItemCustomExtensionRequestBuilder) Get(ctx context.Context, requestConfiguration *EntitlementManagementAccessPackageAssignmentsItemAccessPackageAssignmentPolicyCustomExtensionHandlersItemCustomExtensionRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CustomAccessPackageWorkflowExtensionable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); @@ -60,7 +60,7 @@ func (m *EntitlementManagementAccessPackageAssignmentsItemAccessPackageAssignmen } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CustomAccessPackageWorkflowExtensionable), nil } -// ToGetRequestInformation indicates which custom workflow extension will be executed at this stage. Nullable. Supports $expand. +// ToGetRequestInformation indicates which custom workflow extension is executed at this stage. Nullable. Supports $expand. // Deprecated: as of 2022-10/PrivatePreview:MicrosofEntitlementManagementCustomextensions on 2023-03-01 and will be removed 2023-12-31 func (m *EntitlementManagementAccessPackageAssignmentsItemAccessPackageAssignmentPolicyCustomExtensionHandlersItemCustomExtensionRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *EntitlementManagementAccessPackageAssignmentsItemAccessPackageAssignmentPolicyCustomExtensionHandlersItemCustomExtensionRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/identitygovernance/entitlement_management_access_package_assignments_item_access_package_incompatible_groups_group_item_request_builder.go b/identitygovernance/entitlement_management_access_package_assignments_item_access_package_incompatible_groups_group_item_request_builder.go index 48ebeb72936..462f7ac1a84 100644 --- a/identitygovernance/entitlement_management_access_package_assignments_item_access_package_incompatible_groups_group_item_request_builder.go +++ b/identitygovernance/entitlement_management_access_package_assignments_item_access_package_incompatible_groups_group_item_request_builder.go @@ -25,3 +25,7 @@ func NewEntitlementManagementAccessPackageAssignmentsItemAccessPackageIncompatib func (m *EntitlementManagementAccessPackageAssignmentsItemAccessPackageIncompatibleGroupsGroupItemRequestBuilder) Ref()(*EntitlementManagementAccessPackageAssignmentsItemAccessPackageIncompatibleGroupsItemRefRequestBuilder) { return NewEntitlementManagementAccessPackageAssignmentsItemAccessPackageIncompatibleGroupsItemRefRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *EntitlementManagementAccessPackageAssignmentsItemAccessPackageIncompatibleGroupsGroupItemRequestBuilder) ServiceProvisioningErrors()(*EntitlementManagementAccessPackageAssignmentsItemAccessPackageIncompatibleGroupsItemServiceProvisioningErrorsRequestBuilder) { + return NewEntitlementManagementAccessPackageAssignmentsItemAccessPackageIncompatibleGroupsItemServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/identitygovernance/entitlement_management_access_package_assignments_item_access_package_incompatible_groups_item_service_provisioning_errors_count_request_builder.go b/identitygovernance/entitlement_management_access_package_assignments_item_access_package_incompatible_groups_item_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..774b811aeef --- /dev/null +++ b/identitygovernance/entitlement_management_access_package_assignments_item_access_package_incompatible_groups_item_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// EntitlementManagementAccessPackageAssignmentsItemAccessPackageIncompatibleGroupsItemServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type EntitlementManagementAccessPackageAssignmentsItemAccessPackageIncompatibleGroupsItemServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// EntitlementManagementAccessPackageAssignmentsItemAccessPackageIncompatibleGroupsItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type EntitlementManagementAccessPackageAssignmentsItemAccessPackageIncompatibleGroupsItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// EntitlementManagementAccessPackageAssignmentsItemAccessPackageIncompatibleGroupsItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type EntitlementManagementAccessPackageAssignmentsItemAccessPackageIncompatibleGroupsItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *EntitlementManagementAccessPackageAssignmentsItemAccessPackageIncompatibleGroupsItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewEntitlementManagementAccessPackageAssignmentsItemAccessPackageIncompatibleGroupsItemServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewEntitlementManagementAccessPackageAssignmentsItemAccessPackageIncompatibleGroupsItemServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*EntitlementManagementAccessPackageAssignmentsItemAccessPackageIncompatibleGroupsItemServiceProvisioningErrorsCountRequestBuilder) { + m := &EntitlementManagementAccessPackageAssignmentsItemAccessPackageIncompatibleGroupsItemServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/entitlementManagement/accessPackageAssignments/{accessPackageAssignment%2Did}/accessPackage/incompatibleGroups/{group%2Did}/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewEntitlementManagementAccessPackageAssignmentsItemAccessPackageIncompatibleGroupsItemServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewEntitlementManagementAccessPackageAssignmentsItemAccessPackageIncompatibleGroupsItemServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*EntitlementManagementAccessPackageAssignmentsItemAccessPackageIncompatibleGroupsItemServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewEntitlementManagementAccessPackageAssignmentsItemAccessPackageIncompatibleGroupsItemServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *EntitlementManagementAccessPackageAssignmentsItemAccessPackageIncompatibleGroupsItemServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *EntitlementManagementAccessPackageAssignmentsItemAccessPackageIncompatibleGroupsItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *EntitlementManagementAccessPackageAssignmentsItemAccessPackageIncompatibleGroupsItemServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *EntitlementManagementAccessPackageAssignmentsItemAccessPackageIncompatibleGroupsItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *EntitlementManagementAccessPackageAssignmentsItemAccessPackageIncompatibleGroupsItemServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*EntitlementManagementAccessPackageAssignmentsItemAccessPackageIncompatibleGroupsItemServiceProvisioningErrorsCountRequestBuilder) { + return NewEntitlementManagementAccessPackageAssignmentsItemAccessPackageIncompatibleGroupsItemServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/entitlement_management_access_package_assignments_item_access_package_incompatible_groups_item_service_provisioning_errors_request_builder.go b/identitygovernance/entitlement_management_access_package_assignments_item_access_package_incompatible_groups_item_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..d704c5bbe6b --- /dev/null +++ b/identitygovernance/entitlement_management_access_package_assignments_item_access_package_incompatible_groups_item_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// EntitlementManagementAccessPackageAssignmentsItemAccessPackageIncompatibleGroupsItemServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \identityGovernance\entitlementManagement\accessPackageAssignments\{accessPackageAssignment-id}\accessPackage\incompatibleGroups\{group-id}\serviceProvisioningErrors +type EntitlementManagementAccessPackageAssignmentsItemAccessPackageIncompatibleGroupsItemServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// EntitlementManagementAccessPackageAssignmentsItemAccessPackageIncompatibleGroupsItemServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +type EntitlementManagementAccessPackageAssignmentsItemAccessPackageIncompatibleGroupsItemServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// EntitlementManagementAccessPackageAssignmentsItemAccessPackageIncompatibleGroupsItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type EntitlementManagementAccessPackageAssignmentsItemAccessPackageIncompatibleGroupsItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *EntitlementManagementAccessPackageAssignmentsItemAccessPackageIncompatibleGroupsItemServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewEntitlementManagementAccessPackageAssignmentsItemAccessPackageIncompatibleGroupsItemServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewEntitlementManagementAccessPackageAssignmentsItemAccessPackageIncompatibleGroupsItemServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*EntitlementManagementAccessPackageAssignmentsItemAccessPackageIncompatibleGroupsItemServiceProvisioningErrorsRequestBuilder) { + m := &EntitlementManagementAccessPackageAssignmentsItemAccessPackageIncompatibleGroupsItemServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/entitlementManagement/accessPackageAssignments/{accessPackageAssignment%2Did}/accessPackage/incompatibleGroups/{group%2Did}/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewEntitlementManagementAccessPackageAssignmentsItemAccessPackageIncompatibleGroupsItemServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewEntitlementManagementAccessPackageAssignmentsItemAccessPackageIncompatibleGroupsItemServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*EntitlementManagementAccessPackageAssignmentsItemAccessPackageIncompatibleGroupsItemServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewEntitlementManagementAccessPackageAssignmentsItemAccessPackageIncompatibleGroupsItemServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *EntitlementManagementAccessPackageAssignmentsItemAccessPackageIncompatibleGroupsItemServiceProvisioningErrorsRequestBuilder) Count()(*EntitlementManagementAccessPackageAssignmentsItemAccessPackageIncompatibleGroupsItemServiceProvisioningErrorsCountRequestBuilder) { + return NewEntitlementManagementAccessPackageAssignmentsItemAccessPackageIncompatibleGroupsItemServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *EntitlementManagementAccessPackageAssignmentsItemAccessPackageIncompatibleGroupsItemServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *EntitlementManagementAccessPackageAssignmentsItemAccessPackageIncompatibleGroupsItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *EntitlementManagementAccessPackageAssignmentsItemAccessPackageIncompatibleGroupsItemServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *EntitlementManagementAccessPackageAssignmentsItemAccessPackageIncompatibleGroupsItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *EntitlementManagementAccessPackageAssignmentsItemAccessPackageIncompatibleGroupsItemServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*EntitlementManagementAccessPackageAssignmentsItemAccessPackageIncompatibleGroupsItemServiceProvisioningErrorsRequestBuilder) { + return NewEntitlementManagementAccessPackageAssignmentsItemAccessPackageIncompatibleGroupsItemServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/entitlement_management_access_package_catalogs_item_access_package_custom_workflow_extensions_custom_callout_extension_item_request_builder.go b/identitygovernance/entitlement_management_access_package_catalogs_item_access_package_custom_workflow_extensions_custom_callout_extension_item_request_builder.go index 6c86c31f940..f43a2e93776 100644 --- a/identitygovernance/entitlement_management_access_package_catalogs_item_access_package_custom_workflow_extensions_custom_callout_extension_item_request_builder.go +++ b/identitygovernance/entitlement_management_access_package_catalogs_item_access_package_custom_workflow_extensions_custom_callout_extension_item_request_builder.go @@ -94,11 +94,11 @@ func (m *EntitlementManagementAccessPackageCatalogsItemAccessPackageCustomWorkfl } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CustomCalloutExtensionable), nil } -// Patch update the properties of an accessPackageAssignmentRequestWorkflowExtension object. +// Patch update the properties of an accessPackageAssignmentWorkflowExtension object. // Deprecated: as of 2022-10/PrivatePreview:MicrosofEntitlementManagementCustomextensions on 2023-03-01 and will be removed 2023-12-31 // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/accesspackageassignmentrequestworkflowextension-update?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/accesspackageassignmentworkflowextension-update?view=graph-rest-1.0 func (m *EntitlementManagementAccessPackageCatalogsItemAccessPackageCustomWorkflowExtensionsCustomCalloutExtensionItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CustomCalloutExtensionable, requestConfiguration *EntitlementManagementAccessPackageCatalogsItemAccessPackageCustomWorkflowExtensionsCustomCalloutExtensionItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CustomCalloutExtensionable, error) { requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -147,7 +147,7 @@ func (m *EntitlementManagementAccessPackageCatalogsItemAccessPackageCustomWorkfl } return requestInfo, nil } -// ToPatchRequestInformation update the properties of an accessPackageAssignmentRequestWorkflowExtension object. +// ToPatchRequestInformation update the properties of an accessPackageAssignmentWorkflowExtension object. // Deprecated: as of 2022-10/PrivatePreview:MicrosofEntitlementManagementCustomextensions on 2023-03-01 and will be removed 2023-12-31 func (m *EntitlementManagementAccessPackageCatalogsItemAccessPackageCustomWorkflowExtensionsCustomCalloutExtensionItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CustomCalloutExtensionable, requestConfiguration *EntitlementManagementAccessPackageCatalogsItemAccessPackageCustomWorkflowExtensionsCustomCalloutExtensionItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/identitygovernance/entitlement_management_access_packages_item_access_package_assignment_policies_item_custom_extension_handlers_item_custom_extension_request_builder.go b/identitygovernance/entitlement_management_access_packages_item_access_package_assignment_policies_item_custom_extension_handlers_item_custom_extension_request_builder.go index 3c77fffd2de..e94f5fd0da9 100644 --- a/identitygovernance/entitlement_management_access_packages_item_access_package_assignment_policies_item_custom_extension_handlers_item_custom_extension_request_builder.go +++ b/identitygovernance/entitlement_management_access_packages_item_access_package_assignment_policies_item_custom_extension_handlers_item_custom_extension_request_builder.go @@ -11,7 +11,7 @@ import ( type EntitlementManagementAccessPackagesItemAccessPackageAssignmentPoliciesItemCustomExtensionHandlersItemCustomExtensionRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// EntitlementManagementAccessPackagesItemAccessPackageAssignmentPoliciesItemCustomExtensionHandlersItemCustomExtensionRequestBuilderGetQueryParameters indicates which custom workflow extension will be executed at this stage. Nullable. Supports $expand. +// EntitlementManagementAccessPackagesItemAccessPackageAssignmentPoliciesItemCustomExtensionHandlersItemCustomExtensionRequestBuilderGetQueryParameters indicates which custom workflow extension is executed at this stage. Nullable. Supports $expand. type EntitlementManagementAccessPackagesItemAccessPackageAssignmentPoliciesItemCustomExtensionHandlersItemCustomExtensionRequestBuilderGetQueryParameters struct { // Expand related entities Expand []string `uriparametername:"%24expand"` @@ -40,7 +40,7 @@ func NewEntitlementManagementAccessPackagesItemAccessPackageAssignmentPoliciesIt urlParams["request-raw-url"] = rawUrl return NewEntitlementManagementAccessPackagesItemAccessPackageAssignmentPoliciesItemCustomExtensionHandlersItemCustomExtensionRequestBuilderInternal(urlParams, requestAdapter) } -// Get indicates which custom workflow extension will be executed at this stage. Nullable. Supports $expand. +// Get indicates which custom workflow extension is executed at this stage. Nullable. Supports $expand. // Deprecated: as of 2022-10/PrivatePreview:MicrosofEntitlementManagementCustomextensions on 2023-03-01 and will be removed 2023-12-31 func (m *EntitlementManagementAccessPackagesItemAccessPackageAssignmentPoliciesItemCustomExtensionHandlersItemCustomExtensionRequestBuilder) Get(ctx context.Context, requestConfiguration *EntitlementManagementAccessPackagesItemAccessPackageAssignmentPoliciesItemCustomExtensionHandlersItemCustomExtensionRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CustomAccessPackageWorkflowExtensionable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); @@ -60,7 +60,7 @@ func (m *EntitlementManagementAccessPackagesItemAccessPackageAssignmentPoliciesI } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CustomAccessPackageWorkflowExtensionable), nil } -// ToGetRequestInformation indicates which custom workflow extension will be executed at this stage. Nullable. Supports $expand. +// ToGetRequestInformation indicates which custom workflow extension is executed at this stage. Nullable. Supports $expand. // Deprecated: as of 2022-10/PrivatePreview:MicrosofEntitlementManagementCustomextensions on 2023-03-01 and will be removed 2023-12-31 func (m *EntitlementManagementAccessPackagesItemAccessPackageAssignmentPoliciesItemCustomExtensionHandlersItemCustomExtensionRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *EntitlementManagementAccessPackagesItemAccessPackageAssignmentPoliciesItemCustomExtensionHandlersItemCustomExtensionRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/identitygovernance/entitlement_management_access_packages_item_incompatible_groups_group_item_request_builder.go b/identitygovernance/entitlement_management_access_packages_item_incompatible_groups_group_item_request_builder.go index 4b81c828914..2f5fdd7a4ce 100644 --- a/identitygovernance/entitlement_management_access_packages_item_incompatible_groups_group_item_request_builder.go +++ b/identitygovernance/entitlement_management_access_packages_item_incompatible_groups_group_item_request_builder.go @@ -25,3 +25,7 @@ func NewEntitlementManagementAccessPackagesItemIncompatibleGroupsGroupItemReques func (m *EntitlementManagementAccessPackagesItemIncompatibleGroupsGroupItemRequestBuilder) Ref()(*EntitlementManagementAccessPackagesItemIncompatibleGroupsItemRefRequestBuilder) { return NewEntitlementManagementAccessPackagesItemIncompatibleGroupsItemRefRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *EntitlementManagementAccessPackagesItemIncompatibleGroupsGroupItemRequestBuilder) ServiceProvisioningErrors()(*EntitlementManagementAccessPackagesItemIncompatibleGroupsItemServiceProvisioningErrorsRequestBuilder) { + return NewEntitlementManagementAccessPackagesItemIncompatibleGroupsItemServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/identitygovernance/entitlement_management_access_packages_item_incompatible_groups_item_service_provisioning_errors_count_request_builder.go b/identitygovernance/entitlement_management_access_packages_item_incompatible_groups_item_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..9488a9130c1 --- /dev/null +++ b/identitygovernance/entitlement_management_access_packages_item_incompatible_groups_item_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// EntitlementManagementAccessPackagesItemIncompatibleGroupsItemServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type EntitlementManagementAccessPackagesItemIncompatibleGroupsItemServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// EntitlementManagementAccessPackagesItemIncompatibleGroupsItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type EntitlementManagementAccessPackagesItemIncompatibleGroupsItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// EntitlementManagementAccessPackagesItemIncompatibleGroupsItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type EntitlementManagementAccessPackagesItemIncompatibleGroupsItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *EntitlementManagementAccessPackagesItemIncompatibleGroupsItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewEntitlementManagementAccessPackagesItemIncompatibleGroupsItemServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewEntitlementManagementAccessPackagesItemIncompatibleGroupsItemServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*EntitlementManagementAccessPackagesItemIncompatibleGroupsItemServiceProvisioningErrorsCountRequestBuilder) { + m := &EntitlementManagementAccessPackagesItemIncompatibleGroupsItemServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/entitlementManagement/accessPackages/{accessPackage%2Did}/incompatibleGroups/{group%2Did}/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewEntitlementManagementAccessPackagesItemIncompatibleGroupsItemServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewEntitlementManagementAccessPackagesItemIncompatibleGroupsItemServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*EntitlementManagementAccessPackagesItemIncompatibleGroupsItemServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewEntitlementManagementAccessPackagesItemIncompatibleGroupsItemServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *EntitlementManagementAccessPackagesItemIncompatibleGroupsItemServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *EntitlementManagementAccessPackagesItemIncompatibleGroupsItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *EntitlementManagementAccessPackagesItemIncompatibleGroupsItemServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *EntitlementManagementAccessPackagesItemIncompatibleGroupsItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *EntitlementManagementAccessPackagesItemIncompatibleGroupsItemServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*EntitlementManagementAccessPackagesItemIncompatibleGroupsItemServiceProvisioningErrorsCountRequestBuilder) { + return NewEntitlementManagementAccessPackagesItemIncompatibleGroupsItemServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/entitlement_management_access_packages_item_incompatible_groups_item_service_provisioning_errors_request_builder.go b/identitygovernance/entitlement_management_access_packages_item_incompatible_groups_item_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..f50b6934415 --- /dev/null +++ b/identitygovernance/entitlement_management_access_packages_item_incompatible_groups_item_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// EntitlementManagementAccessPackagesItemIncompatibleGroupsItemServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \identityGovernance\entitlementManagement\accessPackages\{accessPackage-id}\incompatibleGroups\{group-id}\serviceProvisioningErrors +type EntitlementManagementAccessPackagesItemIncompatibleGroupsItemServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// EntitlementManagementAccessPackagesItemIncompatibleGroupsItemServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +type EntitlementManagementAccessPackagesItemIncompatibleGroupsItemServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// EntitlementManagementAccessPackagesItemIncompatibleGroupsItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type EntitlementManagementAccessPackagesItemIncompatibleGroupsItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *EntitlementManagementAccessPackagesItemIncompatibleGroupsItemServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewEntitlementManagementAccessPackagesItemIncompatibleGroupsItemServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewEntitlementManagementAccessPackagesItemIncompatibleGroupsItemServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*EntitlementManagementAccessPackagesItemIncompatibleGroupsItemServiceProvisioningErrorsRequestBuilder) { + m := &EntitlementManagementAccessPackagesItemIncompatibleGroupsItemServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/entitlementManagement/accessPackages/{accessPackage%2Did}/incompatibleGroups/{group%2Did}/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewEntitlementManagementAccessPackagesItemIncompatibleGroupsItemServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewEntitlementManagementAccessPackagesItemIncompatibleGroupsItemServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*EntitlementManagementAccessPackagesItemIncompatibleGroupsItemServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewEntitlementManagementAccessPackagesItemIncompatibleGroupsItemServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *EntitlementManagementAccessPackagesItemIncompatibleGroupsItemServiceProvisioningErrorsRequestBuilder) Count()(*EntitlementManagementAccessPackagesItemIncompatibleGroupsItemServiceProvisioningErrorsCountRequestBuilder) { + return NewEntitlementManagementAccessPackagesItemIncompatibleGroupsItemServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *EntitlementManagementAccessPackagesItemIncompatibleGroupsItemServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *EntitlementManagementAccessPackagesItemIncompatibleGroupsItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *EntitlementManagementAccessPackagesItemIncompatibleGroupsItemServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *EntitlementManagementAccessPackagesItemIncompatibleGroupsItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *EntitlementManagementAccessPackagesItemIncompatibleGroupsItemServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*EntitlementManagementAccessPackagesItemIncompatibleGroupsItemServiceProvisioningErrorsRequestBuilder) { + return NewEntitlementManagementAccessPackagesItemIncompatibleGroupsItemServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/lifecycle_workflows_custom_task_extensions_item_created_by_request_builder.go b/identitygovernance/lifecycle_workflows_custom_task_extensions_item_created_by_request_builder.go index 1ce81865675..b4727367146 100644 --- a/identitygovernance/lifecycle_workflows_custom_task_extensions_item_created_by_request_builder.go +++ b/identitygovernance/lifecycle_workflows_custom_task_extensions_item_created_by_request_builder.go @@ -63,6 +63,10 @@ func (m *LifecycleWorkflowsCustomTaskExtensionsItemCreatedByRequestBuilder) Get( func (m *LifecycleWorkflowsCustomTaskExtensionsItemCreatedByRequestBuilder) MailboxSettings()(*LifecycleWorkflowsCustomTaskExtensionsItemCreatedByMailboxSettingsRequestBuilder) { return NewLifecycleWorkflowsCustomTaskExtensionsItemCreatedByMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *LifecycleWorkflowsCustomTaskExtensionsItemCreatedByRequestBuilder) ServiceProvisioningErrors()(*LifecycleWorkflowsCustomTaskExtensionsItemCreatedByServiceProvisioningErrorsRequestBuilder) { + return NewLifecycleWorkflowsCustomTaskExtensionsItemCreatedByServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation the unique identifier of the Azure AD user that created the custom task extension.Supports $filter(eq, ne) and $expand. func (m *LifecycleWorkflowsCustomTaskExtensionsItemCreatedByRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsCustomTaskExtensionsItemCreatedByRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/identitygovernance/lifecycle_workflows_custom_task_extensions_item_created_by_service_provisioning_errors_count_request_builder.go b/identitygovernance/lifecycle_workflows_custom_task_extensions_item_created_by_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..b7a1817c3fc --- /dev/null +++ b/identitygovernance/lifecycle_workflows_custom_task_extensions_item_created_by_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// LifecycleWorkflowsCustomTaskExtensionsItemCreatedByServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type LifecycleWorkflowsCustomTaskExtensionsItemCreatedByServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// LifecycleWorkflowsCustomTaskExtensionsItemCreatedByServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type LifecycleWorkflowsCustomTaskExtensionsItemCreatedByServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// LifecycleWorkflowsCustomTaskExtensionsItemCreatedByServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type LifecycleWorkflowsCustomTaskExtensionsItemCreatedByServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *LifecycleWorkflowsCustomTaskExtensionsItemCreatedByServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewLifecycleWorkflowsCustomTaskExtensionsItemCreatedByServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewLifecycleWorkflowsCustomTaskExtensionsItemCreatedByServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsCustomTaskExtensionsItemCreatedByServiceProvisioningErrorsCountRequestBuilder) { + m := &LifecycleWorkflowsCustomTaskExtensionsItemCreatedByServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/customTaskExtensions/{customTaskExtension%2Did}/createdBy/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewLifecycleWorkflowsCustomTaskExtensionsItemCreatedByServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewLifecycleWorkflowsCustomTaskExtensionsItemCreatedByServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsCustomTaskExtensionsItemCreatedByServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewLifecycleWorkflowsCustomTaskExtensionsItemCreatedByServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *LifecycleWorkflowsCustomTaskExtensionsItemCreatedByServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *LifecycleWorkflowsCustomTaskExtensionsItemCreatedByServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *LifecycleWorkflowsCustomTaskExtensionsItemCreatedByServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsCustomTaskExtensionsItemCreatedByServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *LifecycleWorkflowsCustomTaskExtensionsItemCreatedByServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*LifecycleWorkflowsCustomTaskExtensionsItemCreatedByServiceProvisioningErrorsCountRequestBuilder) { + return NewLifecycleWorkflowsCustomTaskExtensionsItemCreatedByServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/lifecycle_workflows_custom_task_extensions_item_created_by_service_provisioning_errors_request_builder.go b/identitygovernance/lifecycle_workflows_custom_task_extensions_item_created_by_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..6401a04c63d --- /dev/null +++ b/identitygovernance/lifecycle_workflows_custom_task_extensions_item_created_by_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// LifecycleWorkflowsCustomTaskExtensionsItemCreatedByServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \identityGovernance\lifecycleWorkflows\customTaskExtensions\{customTaskExtension-id}\createdBy\serviceProvisioningErrors +type LifecycleWorkflowsCustomTaskExtensionsItemCreatedByServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// LifecycleWorkflowsCustomTaskExtensionsItemCreatedByServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type LifecycleWorkflowsCustomTaskExtensionsItemCreatedByServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// LifecycleWorkflowsCustomTaskExtensionsItemCreatedByServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type LifecycleWorkflowsCustomTaskExtensionsItemCreatedByServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *LifecycleWorkflowsCustomTaskExtensionsItemCreatedByServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewLifecycleWorkflowsCustomTaskExtensionsItemCreatedByServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewLifecycleWorkflowsCustomTaskExtensionsItemCreatedByServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsCustomTaskExtensionsItemCreatedByServiceProvisioningErrorsRequestBuilder) { + m := &LifecycleWorkflowsCustomTaskExtensionsItemCreatedByServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/customTaskExtensions/{customTaskExtension%2Did}/createdBy/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewLifecycleWorkflowsCustomTaskExtensionsItemCreatedByServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewLifecycleWorkflowsCustomTaskExtensionsItemCreatedByServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsCustomTaskExtensionsItemCreatedByServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewLifecycleWorkflowsCustomTaskExtensionsItemCreatedByServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *LifecycleWorkflowsCustomTaskExtensionsItemCreatedByServiceProvisioningErrorsRequestBuilder) Count()(*LifecycleWorkflowsCustomTaskExtensionsItemCreatedByServiceProvisioningErrorsCountRequestBuilder) { + return NewLifecycleWorkflowsCustomTaskExtensionsItemCreatedByServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *LifecycleWorkflowsCustomTaskExtensionsItemCreatedByServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *LifecycleWorkflowsCustomTaskExtensionsItemCreatedByServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *LifecycleWorkflowsCustomTaskExtensionsItemCreatedByServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsCustomTaskExtensionsItemCreatedByServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *LifecycleWorkflowsCustomTaskExtensionsItemCreatedByServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*LifecycleWorkflowsCustomTaskExtensionsItemCreatedByServiceProvisioningErrorsRequestBuilder) { + return NewLifecycleWorkflowsCustomTaskExtensionsItemCreatedByServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/lifecycle_workflows_custom_task_extensions_item_last_modified_by_request_builder.go b/identitygovernance/lifecycle_workflows_custom_task_extensions_item_last_modified_by_request_builder.go index 20eed7b21a2..152a3dd5b68 100644 --- a/identitygovernance/lifecycle_workflows_custom_task_extensions_item_last_modified_by_request_builder.go +++ b/identitygovernance/lifecycle_workflows_custom_task_extensions_item_last_modified_by_request_builder.go @@ -63,6 +63,10 @@ func (m *LifecycleWorkflowsCustomTaskExtensionsItemLastModifiedByRequestBuilder) func (m *LifecycleWorkflowsCustomTaskExtensionsItemLastModifiedByRequestBuilder) MailboxSettings()(*LifecycleWorkflowsCustomTaskExtensionsItemLastModifiedByMailboxSettingsRequestBuilder) { return NewLifecycleWorkflowsCustomTaskExtensionsItemLastModifiedByMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *LifecycleWorkflowsCustomTaskExtensionsItemLastModifiedByRequestBuilder) ServiceProvisioningErrors()(*LifecycleWorkflowsCustomTaskExtensionsItemLastModifiedByServiceProvisioningErrorsRequestBuilder) { + return NewLifecycleWorkflowsCustomTaskExtensionsItemLastModifiedByServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation the unique identifier of the Azure AD user that modified the custom task extension last.Supports $filter(eq, ne) and $expand. func (m *LifecycleWorkflowsCustomTaskExtensionsItemLastModifiedByRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsCustomTaskExtensionsItemLastModifiedByRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/identitygovernance/lifecycle_workflows_custom_task_extensions_item_last_modified_by_service_provisioning_errors_count_request_builder.go b/identitygovernance/lifecycle_workflows_custom_task_extensions_item_last_modified_by_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..ae7a5695a2d --- /dev/null +++ b/identitygovernance/lifecycle_workflows_custom_task_extensions_item_last_modified_by_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// LifecycleWorkflowsCustomTaskExtensionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type LifecycleWorkflowsCustomTaskExtensionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// LifecycleWorkflowsCustomTaskExtensionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type LifecycleWorkflowsCustomTaskExtensionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// LifecycleWorkflowsCustomTaskExtensionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type LifecycleWorkflowsCustomTaskExtensionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *LifecycleWorkflowsCustomTaskExtensionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewLifecycleWorkflowsCustomTaskExtensionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewLifecycleWorkflowsCustomTaskExtensionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsCustomTaskExtensionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder) { + m := &LifecycleWorkflowsCustomTaskExtensionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/customTaskExtensions/{customTaskExtension%2Did}/lastModifiedBy/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewLifecycleWorkflowsCustomTaskExtensionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewLifecycleWorkflowsCustomTaskExtensionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsCustomTaskExtensionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewLifecycleWorkflowsCustomTaskExtensionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *LifecycleWorkflowsCustomTaskExtensionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *LifecycleWorkflowsCustomTaskExtensionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *LifecycleWorkflowsCustomTaskExtensionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsCustomTaskExtensionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *LifecycleWorkflowsCustomTaskExtensionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*LifecycleWorkflowsCustomTaskExtensionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder) { + return NewLifecycleWorkflowsCustomTaskExtensionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/lifecycle_workflows_custom_task_extensions_item_last_modified_by_service_provisioning_errors_request_builder.go b/identitygovernance/lifecycle_workflows_custom_task_extensions_item_last_modified_by_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..7adde801810 --- /dev/null +++ b/identitygovernance/lifecycle_workflows_custom_task_extensions_item_last_modified_by_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// LifecycleWorkflowsCustomTaskExtensionsItemLastModifiedByServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \identityGovernance\lifecycleWorkflows\customTaskExtensions\{customTaskExtension-id}\lastModifiedBy\serviceProvisioningErrors +type LifecycleWorkflowsCustomTaskExtensionsItemLastModifiedByServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// LifecycleWorkflowsCustomTaskExtensionsItemLastModifiedByServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type LifecycleWorkflowsCustomTaskExtensionsItemLastModifiedByServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// LifecycleWorkflowsCustomTaskExtensionsItemLastModifiedByServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type LifecycleWorkflowsCustomTaskExtensionsItemLastModifiedByServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *LifecycleWorkflowsCustomTaskExtensionsItemLastModifiedByServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewLifecycleWorkflowsCustomTaskExtensionsItemLastModifiedByServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewLifecycleWorkflowsCustomTaskExtensionsItemLastModifiedByServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsCustomTaskExtensionsItemLastModifiedByServiceProvisioningErrorsRequestBuilder) { + m := &LifecycleWorkflowsCustomTaskExtensionsItemLastModifiedByServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/customTaskExtensions/{customTaskExtension%2Did}/lastModifiedBy/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewLifecycleWorkflowsCustomTaskExtensionsItemLastModifiedByServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewLifecycleWorkflowsCustomTaskExtensionsItemLastModifiedByServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsCustomTaskExtensionsItemLastModifiedByServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewLifecycleWorkflowsCustomTaskExtensionsItemLastModifiedByServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *LifecycleWorkflowsCustomTaskExtensionsItemLastModifiedByServiceProvisioningErrorsRequestBuilder) Count()(*LifecycleWorkflowsCustomTaskExtensionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder) { + return NewLifecycleWorkflowsCustomTaskExtensionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *LifecycleWorkflowsCustomTaskExtensionsItemLastModifiedByServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *LifecycleWorkflowsCustomTaskExtensionsItemLastModifiedByServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *LifecycleWorkflowsCustomTaskExtensionsItemLastModifiedByServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsCustomTaskExtensionsItemLastModifiedByServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *LifecycleWorkflowsCustomTaskExtensionsItemLastModifiedByServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*LifecycleWorkflowsCustomTaskExtensionsItemLastModifiedByServiceProvisioningErrorsRequestBuilder) { + return NewLifecycleWorkflowsCustomTaskExtensionsItemLastModifiedByServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_created_by_request_builder.go b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_created_by_request_builder.go index ead2578dfe2..77f40222c4d 100644 --- a/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_created_by_request_builder.go +++ b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_created_by_request_builder.go @@ -63,6 +63,10 @@ func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemCreatedByRequestBuilder) Get func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemCreatedByRequestBuilder) MailboxSettings()(*LifecycleWorkflowsDeletedItemsWorkflowsItemCreatedByMailboxSettingsRequestBuilder) { return NewLifecycleWorkflowsDeletedItemsWorkflowsItemCreatedByMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemCreatedByRequestBuilder) ServiceProvisioningErrors()(*LifecycleWorkflowsDeletedItemsWorkflowsItemCreatedByServiceProvisioningErrorsRequestBuilder) { + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemCreatedByServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation the user who created the workflow. func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemCreatedByRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsDeletedItemsWorkflowsItemCreatedByRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_created_by_service_provisioning_errors_count_request_builder.go b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_created_by_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..bdb3d5d3a35 --- /dev/null +++ b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_created_by_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// LifecycleWorkflowsDeletedItemsWorkflowsItemCreatedByServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type LifecycleWorkflowsDeletedItemsWorkflowsItemCreatedByServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// LifecycleWorkflowsDeletedItemsWorkflowsItemCreatedByServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type LifecycleWorkflowsDeletedItemsWorkflowsItemCreatedByServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// LifecycleWorkflowsDeletedItemsWorkflowsItemCreatedByServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type LifecycleWorkflowsDeletedItemsWorkflowsItemCreatedByServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *LifecycleWorkflowsDeletedItemsWorkflowsItemCreatedByServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewLifecycleWorkflowsDeletedItemsWorkflowsItemCreatedByServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewLifecycleWorkflowsDeletedItemsWorkflowsItemCreatedByServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsDeletedItemsWorkflowsItemCreatedByServiceProvisioningErrorsCountRequestBuilder) { + m := &LifecycleWorkflowsDeletedItemsWorkflowsItemCreatedByServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/createdBy/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewLifecycleWorkflowsDeletedItemsWorkflowsItemCreatedByServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewLifecycleWorkflowsDeletedItemsWorkflowsItemCreatedByServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsDeletedItemsWorkflowsItemCreatedByServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemCreatedByServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemCreatedByServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *LifecycleWorkflowsDeletedItemsWorkflowsItemCreatedByServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemCreatedByServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsDeletedItemsWorkflowsItemCreatedByServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemCreatedByServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*LifecycleWorkflowsDeletedItemsWorkflowsItemCreatedByServiceProvisioningErrorsCountRequestBuilder) { + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemCreatedByServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_created_by_service_provisioning_errors_request_builder.go b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_created_by_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..3ad08e5c520 --- /dev/null +++ b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_created_by_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// LifecycleWorkflowsDeletedItemsWorkflowsItemCreatedByServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \identityGovernance\lifecycleWorkflows\deletedItems\workflows\{workflow-id}\createdBy\serviceProvisioningErrors +type LifecycleWorkflowsDeletedItemsWorkflowsItemCreatedByServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// LifecycleWorkflowsDeletedItemsWorkflowsItemCreatedByServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type LifecycleWorkflowsDeletedItemsWorkflowsItemCreatedByServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// LifecycleWorkflowsDeletedItemsWorkflowsItemCreatedByServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type LifecycleWorkflowsDeletedItemsWorkflowsItemCreatedByServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *LifecycleWorkflowsDeletedItemsWorkflowsItemCreatedByServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewLifecycleWorkflowsDeletedItemsWorkflowsItemCreatedByServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewLifecycleWorkflowsDeletedItemsWorkflowsItemCreatedByServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsDeletedItemsWorkflowsItemCreatedByServiceProvisioningErrorsRequestBuilder) { + m := &LifecycleWorkflowsDeletedItemsWorkflowsItemCreatedByServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/createdBy/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewLifecycleWorkflowsDeletedItemsWorkflowsItemCreatedByServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewLifecycleWorkflowsDeletedItemsWorkflowsItemCreatedByServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsDeletedItemsWorkflowsItemCreatedByServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemCreatedByServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemCreatedByServiceProvisioningErrorsRequestBuilder) Count()(*LifecycleWorkflowsDeletedItemsWorkflowsItemCreatedByServiceProvisioningErrorsCountRequestBuilder) { + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemCreatedByServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemCreatedByServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *LifecycleWorkflowsDeletedItemsWorkflowsItemCreatedByServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemCreatedByServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsDeletedItemsWorkflowsItemCreatedByServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemCreatedByServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*LifecycleWorkflowsDeletedItemsWorkflowsItemCreatedByServiceProvisioningErrorsRequestBuilder) { + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemCreatedByServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_last_modified_by_request_builder.go b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_last_modified_by_request_builder.go index 1d15a468284..9e5429c0fe8 100644 --- a/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_last_modified_by_request_builder.go +++ b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_last_modified_by_request_builder.go @@ -63,6 +63,10 @@ func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemLastModifiedByRequestBuilder func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemLastModifiedByRequestBuilder) MailboxSettings()(*LifecycleWorkflowsDeletedItemsWorkflowsItemLastModifiedByMailboxSettingsRequestBuilder) { return NewLifecycleWorkflowsDeletedItemsWorkflowsItemLastModifiedByMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemLastModifiedByRequestBuilder) ServiceProvisioningErrors()(*LifecycleWorkflowsDeletedItemsWorkflowsItemLastModifiedByServiceProvisioningErrorsRequestBuilder) { + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemLastModifiedByServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation the user who last modified the workflow. func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemLastModifiedByRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsDeletedItemsWorkflowsItemLastModifiedByRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_last_modified_by_service_provisioning_errors_count_request_builder.go b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_last_modified_by_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..052e94330fc --- /dev/null +++ b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_last_modified_by_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// LifecycleWorkflowsDeletedItemsWorkflowsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type LifecycleWorkflowsDeletedItemsWorkflowsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// LifecycleWorkflowsDeletedItemsWorkflowsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type LifecycleWorkflowsDeletedItemsWorkflowsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// LifecycleWorkflowsDeletedItemsWorkflowsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type LifecycleWorkflowsDeletedItemsWorkflowsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *LifecycleWorkflowsDeletedItemsWorkflowsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewLifecycleWorkflowsDeletedItemsWorkflowsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewLifecycleWorkflowsDeletedItemsWorkflowsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsDeletedItemsWorkflowsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder) { + m := &LifecycleWorkflowsDeletedItemsWorkflowsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/lastModifiedBy/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewLifecycleWorkflowsDeletedItemsWorkflowsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewLifecycleWorkflowsDeletedItemsWorkflowsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsDeletedItemsWorkflowsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *LifecycleWorkflowsDeletedItemsWorkflowsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsDeletedItemsWorkflowsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*LifecycleWorkflowsDeletedItemsWorkflowsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder) { + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_last_modified_by_service_provisioning_errors_request_builder.go b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_last_modified_by_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..ffa07babee6 --- /dev/null +++ b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_last_modified_by_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// LifecycleWorkflowsDeletedItemsWorkflowsItemLastModifiedByServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \identityGovernance\lifecycleWorkflows\deletedItems\workflows\{workflow-id}\lastModifiedBy\serviceProvisioningErrors +type LifecycleWorkflowsDeletedItemsWorkflowsItemLastModifiedByServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// LifecycleWorkflowsDeletedItemsWorkflowsItemLastModifiedByServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type LifecycleWorkflowsDeletedItemsWorkflowsItemLastModifiedByServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// LifecycleWorkflowsDeletedItemsWorkflowsItemLastModifiedByServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type LifecycleWorkflowsDeletedItemsWorkflowsItemLastModifiedByServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *LifecycleWorkflowsDeletedItemsWorkflowsItemLastModifiedByServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewLifecycleWorkflowsDeletedItemsWorkflowsItemLastModifiedByServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewLifecycleWorkflowsDeletedItemsWorkflowsItemLastModifiedByServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsDeletedItemsWorkflowsItemLastModifiedByServiceProvisioningErrorsRequestBuilder) { + m := &LifecycleWorkflowsDeletedItemsWorkflowsItemLastModifiedByServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/lastModifiedBy/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewLifecycleWorkflowsDeletedItemsWorkflowsItemLastModifiedByServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewLifecycleWorkflowsDeletedItemsWorkflowsItemLastModifiedByServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsDeletedItemsWorkflowsItemLastModifiedByServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemLastModifiedByServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemLastModifiedByServiceProvisioningErrorsRequestBuilder) Count()(*LifecycleWorkflowsDeletedItemsWorkflowsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder) { + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemLastModifiedByServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *LifecycleWorkflowsDeletedItemsWorkflowsItemLastModifiedByServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemLastModifiedByServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsDeletedItemsWorkflowsItemLastModifiedByServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemLastModifiedByServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*LifecycleWorkflowsDeletedItemsWorkflowsItemLastModifiedByServiceProvisioningErrorsRequestBuilder) { + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemLastModifiedByServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_runs_item_task_processing_results_item_subject_request_builder.go b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_runs_item_task_processing_results_item_subject_request_builder.go index 23ce589ceea..65f3083f2d2 100644 --- a/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_runs_item_task_processing_results_item_subject_request_builder.go +++ b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_runs_item_task_processing_results_item_subject_request_builder.go @@ -63,6 +63,10 @@ func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemTaskProcessingResult func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectRequestBuilder) MailboxSettings()(*LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectMailboxSettingsRequestBuilder) { return NewLifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectRequestBuilder) ServiceProvisioningErrors()(*LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation the unique identifier of the Azure AD user targeted for the task execution.Supports $filter(eq, ne) and $expand. func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_runs_item_task_processing_results_item_subject_service_provisioning_errors_count_request_builder.go b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_runs_item_task_processing_results_item_subject_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..44a286a9e1b --- /dev/null +++ b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_runs_item_task_processing_results_item_subject_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewLifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewLifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + m := &LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/runs/{run%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewLifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewLifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_runs_item_task_processing_results_item_subject_service_provisioning_errors_request_builder.go b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_runs_item_task_processing_results_item_subject_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..cd0c07bc4fd --- /dev/null +++ b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_runs_item_task_processing_results_item_subject_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \identityGovernance\lifecycleWorkflows\deletedItems\workflows\{workflow-id}\runs\{run-id}\taskProcessingResults\{taskProcessingResult-id}\subject\serviceProvisioningErrors +type LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewLifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewLifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + m := &LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/runs/{run%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewLifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewLifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) Count()(*LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_runs_item_user_processing_results_item_subject_request_builder.go b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_runs_item_user_processing_results_item_subject_request_builder.go index 26d5e0d439d..ed11d9fecc9 100644 --- a/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_runs_item_user_processing_results_item_subject_request_builder.go +++ b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_runs_item_user_processing_results_item_subject_request_builder.go @@ -63,6 +63,10 @@ func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResult func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemSubjectRequestBuilder) MailboxSettings()(*LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemSubjectMailboxSettingsRequestBuilder) { return NewLifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemSubjectMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemSubjectRequestBuilder) ServiceProvisioningErrors()(*LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation the unique identifier of the AAD user targeted for the taskProcessingResult.Supports $filter(eq, ne) and $expand. func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemSubjectRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemSubjectRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_runs_item_user_processing_results_item_subject_service_provisioning_errors_count_request_builder.go b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_runs_item_user_processing_results_item_subject_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..6fa19a5a9a8 --- /dev/null +++ b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_runs_item_user_processing_results_item_subject_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewLifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewLifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + m := &LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/runs/{run%2Did}/userProcessingResults/{userProcessingResult%2Did}/subject/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewLifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewLifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_runs_item_user_processing_results_item_subject_service_provisioning_errors_request_builder.go b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_runs_item_user_processing_results_item_subject_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..5689fafc1f2 --- /dev/null +++ b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_runs_item_user_processing_results_item_subject_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \identityGovernance\lifecycleWorkflows\deletedItems\workflows\{workflow-id}\runs\{run-id}\userProcessingResults\{userProcessingResult-id}\subject\serviceProvisioningErrors +type LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewLifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewLifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + m := &LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/runs/{run%2Did}/userProcessingResults/{userProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewLifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewLifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) Count()(*LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_runs_item_user_processing_results_item_task_processing_results_item_subject_request_builder.go b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_runs_item_user_processing_results_item_task_processing_results_item_subject_request_builder.go index 9ca38dbf8cc..4c8e3b4589f 100644 --- a/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_runs_item_user_processing_results_item_task_processing_results_item_subject_request_builder.go +++ b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_runs_item_user_processing_results_item_task_processing_results_item_subject_request_builder.go @@ -63,6 +63,10 @@ func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResult func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectRequestBuilder) MailboxSettings()(*LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectMailboxSettingsRequestBuilder) { return NewLifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectRequestBuilder) ServiceProvisioningErrors()(*LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation the unique identifier of the Azure AD user targeted for the task execution.Supports $filter(eq, ne) and $expand. func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_runs_item_user_processing_results_item_task_processing_results_item_subject_service_provisioning_errors_count_request_builder.go b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_runs_item_user_processing_results_item_task_processing_results_item_subject_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..5cbca321308 --- /dev/null +++ b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_runs_item_user_processing_results_item_task_processing_results_item_subject_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewLifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewLifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + m := &LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/runs/{run%2Did}/userProcessingResults/{userProcessingResult%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewLifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewLifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_runs_item_user_processing_results_item_task_processing_results_item_subject_service_provisioning_errors_request_builder.go b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_runs_item_user_processing_results_item_task_processing_results_item_subject_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..b919274aa07 --- /dev/null +++ b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_runs_item_user_processing_results_item_task_processing_results_item_subject_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \identityGovernance\lifecycleWorkflows\deletedItems\workflows\{workflow-id}\runs\{run-id}\userProcessingResults\{userProcessingResult-id}\taskProcessingResults\{taskProcessingResult-id}\subject\serviceProvisioningErrors +type LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewLifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewLifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + m := &LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+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}", pathParameters), + } + return m +} +// NewLifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewLifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) Count()(*LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*LifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_task_reports_item_task_processing_results_item_subject_request_builder.go b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_task_reports_item_task_processing_results_item_subject_request_builder.go index 3d64d57c4ef..0796003e553 100644 --- a/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_task_reports_item_task_processing_results_item_subject_request_builder.go +++ b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_task_reports_item_task_processing_results_item_subject_request_builder.go @@ -63,6 +63,10 @@ func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemTaskReportsItemTaskProcessin func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectRequestBuilder) MailboxSettings()(*LifecycleWorkflowsDeletedItemsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectMailboxSettingsRequestBuilder) { return NewLifecycleWorkflowsDeletedItemsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectRequestBuilder) ServiceProvisioningErrors()(*LifecycleWorkflowsDeletedItemsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation the unique identifier of the Azure AD user targeted for the task execution.Supports $filter(eq, ne) and $expand. func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsDeletedItemsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_task_reports_item_task_processing_results_item_subject_service_provisioning_errors_count_request_builder.go b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_task_reports_item_task_processing_results_item_subject_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..e0f7b674b6c --- /dev/null +++ b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_task_reports_item_task_processing_results_item_subject_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// LifecycleWorkflowsDeletedItemsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type LifecycleWorkflowsDeletedItemsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// LifecycleWorkflowsDeletedItemsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type LifecycleWorkflowsDeletedItemsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// LifecycleWorkflowsDeletedItemsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type LifecycleWorkflowsDeletedItemsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *LifecycleWorkflowsDeletedItemsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewLifecycleWorkflowsDeletedItemsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewLifecycleWorkflowsDeletedItemsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsDeletedItemsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + m := &LifecycleWorkflowsDeletedItemsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/taskReports/{taskReport%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewLifecycleWorkflowsDeletedItemsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewLifecycleWorkflowsDeletedItemsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsDeletedItemsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *LifecycleWorkflowsDeletedItemsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsDeletedItemsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*LifecycleWorkflowsDeletedItemsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_task_reports_item_task_processing_results_item_subject_service_provisioning_errors_request_builder.go b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_task_reports_item_task_processing_results_item_subject_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..78e54ba8104 --- /dev/null +++ b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_task_reports_item_task_processing_results_item_subject_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// LifecycleWorkflowsDeletedItemsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \identityGovernance\lifecycleWorkflows\deletedItems\workflows\{workflow-id}\taskReports\{taskReport-id}\taskProcessingResults\{taskProcessingResult-id}\subject\serviceProvisioningErrors +type LifecycleWorkflowsDeletedItemsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// LifecycleWorkflowsDeletedItemsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type LifecycleWorkflowsDeletedItemsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// LifecycleWorkflowsDeletedItemsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type LifecycleWorkflowsDeletedItemsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *LifecycleWorkflowsDeletedItemsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewLifecycleWorkflowsDeletedItemsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewLifecycleWorkflowsDeletedItemsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsDeletedItemsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + m := &LifecycleWorkflowsDeletedItemsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/taskReports/{taskReport%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewLifecycleWorkflowsDeletedItemsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewLifecycleWorkflowsDeletedItemsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsDeletedItemsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) Count()(*LifecycleWorkflowsDeletedItemsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *LifecycleWorkflowsDeletedItemsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsDeletedItemsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*LifecycleWorkflowsDeletedItemsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_tasks_item_task_processing_results_item_subject_request_builder.go b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_tasks_item_task_processing_results_item_subject_request_builder.go index 4718eaedfc8..cd7fdb1bd01 100644 --- a/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_tasks_item_task_processing_results_item_subject_request_builder.go +++ b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_tasks_item_task_processing_results_item_subject_request_builder.go @@ -63,6 +63,10 @@ func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemTasksItemTaskProcessingResul func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectRequestBuilder) MailboxSettings()(*LifecycleWorkflowsDeletedItemsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectMailboxSettingsRequestBuilder) { return NewLifecycleWorkflowsDeletedItemsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectRequestBuilder) ServiceProvisioningErrors()(*LifecycleWorkflowsDeletedItemsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation the unique identifier of the Azure AD user targeted for the task execution.Supports $filter(eq, ne) and $expand. func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsDeletedItemsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_tasks_item_task_processing_results_item_subject_service_provisioning_errors_count_request_builder.go b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_tasks_item_task_processing_results_item_subject_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..fe67a53095b --- /dev/null +++ b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_tasks_item_task_processing_results_item_subject_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// LifecycleWorkflowsDeletedItemsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type LifecycleWorkflowsDeletedItemsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// LifecycleWorkflowsDeletedItemsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type LifecycleWorkflowsDeletedItemsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// LifecycleWorkflowsDeletedItemsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type LifecycleWorkflowsDeletedItemsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *LifecycleWorkflowsDeletedItemsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewLifecycleWorkflowsDeletedItemsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewLifecycleWorkflowsDeletedItemsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsDeletedItemsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + m := &LifecycleWorkflowsDeletedItemsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/tasks/{task%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewLifecycleWorkflowsDeletedItemsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewLifecycleWorkflowsDeletedItemsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsDeletedItemsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *LifecycleWorkflowsDeletedItemsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsDeletedItemsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*LifecycleWorkflowsDeletedItemsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_tasks_item_task_processing_results_item_subject_service_provisioning_errors_request_builder.go b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_tasks_item_task_processing_results_item_subject_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..d8bc2b5303d --- /dev/null +++ b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_tasks_item_task_processing_results_item_subject_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// LifecycleWorkflowsDeletedItemsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \identityGovernance\lifecycleWorkflows\deletedItems\workflows\{workflow-id}\tasks\{task-id}\taskProcessingResults\{taskProcessingResult-id}\subject\serviceProvisioningErrors +type LifecycleWorkflowsDeletedItemsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// LifecycleWorkflowsDeletedItemsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type LifecycleWorkflowsDeletedItemsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// LifecycleWorkflowsDeletedItemsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type LifecycleWorkflowsDeletedItemsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *LifecycleWorkflowsDeletedItemsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewLifecycleWorkflowsDeletedItemsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewLifecycleWorkflowsDeletedItemsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsDeletedItemsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + m := &LifecycleWorkflowsDeletedItemsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/tasks/{task%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewLifecycleWorkflowsDeletedItemsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewLifecycleWorkflowsDeletedItemsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsDeletedItemsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) Count()(*LifecycleWorkflowsDeletedItemsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *LifecycleWorkflowsDeletedItemsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsDeletedItemsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*LifecycleWorkflowsDeletedItemsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_user_processing_results_item_subject_request_builder.go b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_user_processing_results_item_subject_request_builder.go index adc716c835f..969fc09a501 100644 --- a/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_user_processing_results_item_subject_request_builder.go +++ b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_user_processing_results_item_subject_request_builder.go @@ -63,6 +63,10 @@ func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemSub func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemSubjectRequestBuilder) MailboxSettings()(*LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemSubjectMailboxSettingsRequestBuilder) { return NewLifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemSubjectMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemSubjectRequestBuilder) ServiceProvisioningErrors()(*LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation the unique identifier of the AAD user targeted for the taskProcessingResult.Supports $filter(eq, ne) and $expand. func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemSubjectRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemSubjectRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_user_processing_results_item_subject_service_provisioning_errors_count_request_builder.go b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_user_processing_results_item_subject_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..dc4e62de4cb --- /dev/null +++ b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_user_processing_results_item_subject_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewLifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewLifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + m := &LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/userProcessingResults/{userProcessingResult%2Did}/subject/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewLifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewLifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_user_processing_results_item_subject_service_provisioning_errors_request_builder.go b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_user_processing_results_item_subject_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..be35b1505b1 --- /dev/null +++ b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_user_processing_results_item_subject_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \identityGovernance\lifecycleWorkflows\deletedItems\workflows\{workflow-id}\userProcessingResults\{userProcessingResult-id}\subject\serviceProvisioningErrors +type LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewLifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewLifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + m := &LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/userProcessingResults/{userProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewLifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewLifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) Count()(*LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_user_processing_results_item_task_processing_results_item_subject_request_builder.go b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_user_processing_results_item_task_processing_results_item_subject_request_builder.go index 46752f75d44..2e45b33ba58 100644 --- a/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_user_processing_results_item_task_processing_results_item_subject_request_builder.go +++ b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_user_processing_results_item_task_processing_results_item_subject_request_builder.go @@ -63,6 +63,10 @@ func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemTas func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectRequestBuilder) MailboxSettings()(*LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectMailboxSettingsRequestBuilder) { return NewLifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectRequestBuilder) ServiceProvisioningErrors()(*LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation the unique identifier of the Azure AD user targeted for the task execution.Supports $filter(eq, ne) and $expand. func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_user_processing_results_item_task_processing_results_item_subject_service_provisioning_errors_count_request_builder.go b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_user_processing_results_item_task_processing_results_item_subject_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..accdeaa3e78 --- /dev/null +++ b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_user_processing_results_item_task_processing_results_item_subject_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewLifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewLifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + m := &LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/userProcessingResults/{userProcessingResult%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewLifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewLifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_user_processing_results_item_task_processing_results_item_subject_service_provisioning_errors_request_builder.go b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_user_processing_results_item_task_processing_results_item_subject_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..1f8e63481c5 --- /dev/null +++ b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_user_processing_results_item_task_processing_results_item_subject_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \identityGovernance\lifecycleWorkflows\deletedItems\workflows\{workflow-id}\userProcessingResults\{userProcessingResult-id}\taskProcessingResults\{taskProcessingResult-id}\subject\serviceProvisioningErrors +type LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewLifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewLifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + m := &LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/userProcessingResults/{userProcessingResult%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewLifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewLifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) Count()(*LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*LifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_versions_item_created_by_request_builder.go b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_versions_item_created_by_request_builder.go index a7ba67c253a..b38cce6ccdb 100644 --- a/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_versions_item_created_by_request_builder.go +++ b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_versions_item_created_by_request_builder.go @@ -63,6 +63,10 @@ func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemCreatedByRequest func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemCreatedByRequestBuilder) MailboxSettings()(*LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemCreatedByMailboxSettingsRequestBuilder) { return NewLifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemCreatedByMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemCreatedByRequestBuilder) ServiceProvisioningErrors()(*LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsRequestBuilder) { + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation the user who created the workflow. func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemCreatedByRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemCreatedByRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_versions_item_created_by_service_provisioning_errors_count_request_builder.go b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_versions_item_created_by_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..ce3465bc96b --- /dev/null +++ b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_versions_item_created_by_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewLifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewLifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsCountRequestBuilder) { + m := &LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/versions/{workflowVersion%2DversionNumber}/createdBy/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewLifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewLifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsCountRequestBuilder) { + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_versions_item_created_by_service_provisioning_errors_request_builder.go b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_versions_item_created_by_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..419f8527ec7 --- /dev/null +++ b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_versions_item_created_by_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \identityGovernance\lifecycleWorkflows\deletedItems\workflows\{workflow-id}\versions\{workflowVersion-versionNumber}\createdBy\serviceProvisioningErrors +type LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewLifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewLifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsRequestBuilder) { + m := &LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/versions/{workflowVersion%2DversionNumber}/createdBy/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewLifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewLifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsRequestBuilder) Count()(*LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsCountRequestBuilder) { + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsRequestBuilder) { + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_versions_item_last_modified_by_request_builder.go b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_versions_item_last_modified_by_request_builder.go index 6266eb4a534..f7efbd3e294 100644 --- a/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_versions_item_last_modified_by_request_builder.go +++ b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_versions_item_last_modified_by_request_builder.go @@ -63,6 +63,10 @@ func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemLastModifiedByRe func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemLastModifiedByRequestBuilder) MailboxSettings()(*LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemLastModifiedByMailboxSettingsRequestBuilder) { return NewLifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemLastModifiedByMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemLastModifiedByRequestBuilder) ServiceProvisioningErrors()(*LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsRequestBuilder) { + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation the user who last modified the workflow. func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemLastModifiedByRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemLastModifiedByRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_versions_item_last_modified_by_service_provisioning_errors_count_request_builder.go b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_versions_item_last_modified_by_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..0bce80a31bb --- /dev/null +++ b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_versions_item_last_modified_by_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewLifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewLifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder) { + m := &LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/versions/{workflowVersion%2DversionNumber}/lastModifiedBy/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewLifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewLifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder) { + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_versions_item_last_modified_by_service_provisioning_errors_request_builder.go b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_versions_item_last_modified_by_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..169198d79ac --- /dev/null +++ b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_versions_item_last_modified_by_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \identityGovernance\lifecycleWorkflows\deletedItems\workflows\{workflow-id}\versions\{workflowVersion-versionNumber}\lastModifiedBy\serviceProvisioningErrors +type LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewLifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewLifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsRequestBuilder) { + m := &LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/versions/{workflowVersion%2DversionNumber}/lastModifiedBy/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewLifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewLifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsRequestBuilder) Count()(*LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder) { + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsRequestBuilder) { + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_versions_item_tasks_item_task_processing_results_item_subject_request_builder.go b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_versions_item_tasks_item_task_processing_results_item_subject_request_builder.go index f008fafe1f0..d3e3c785b05 100644 --- a/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_versions_item_tasks_item_task_processing_results_item_subject_request_builder.go +++ b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_versions_item_tasks_item_task_processing_results_item_subject_request_builder.go @@ -63,6 +63,10 @@ func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemTasksItemTaskPro func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectRequestBuilder) MailboxSettings()(*LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectMailboxSettingsRequestBuilder) { return NewLifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectRequestBuilder) ServiceProvisioningErrors()(*LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation the unique identifier of the Azure AD user targeted for the task execution.Supports $filter(eq, ne) and $expand. func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_versions_item_tasks_item_task_processing_results_item_subject_service_provisioning_errors_count_request_builder.go b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_versions_item_tasks_item_task_processing_results_item_subject_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..ed21884f4b1 --- /dev/null +++ b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_versions_item_tasks_item_task_processing_results_item_subject_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewLifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewLifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + m := &LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/versions/{workflowVersion%2DversionNumber}/tasks/{task%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewLifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewLifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_versions_item_tasks_item_task_processing_results_item_subject_service_provisioning_errors_request_builder.go b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_versions_item_tasks_item_task_processing_results_item_subject_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..f2e62b99db5 --- /dev/null +++ b/identitygovernance/lifecycle_workflows_deleted_items_workflows_item_versions_item_tasks_item_task_processing_results_item_subject_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \identityGovernance\lifecycleWorkflows\deletedItems\workflows\{workflow-id}\versions\{workflowVersion-versionNumber}\tasks\{task-id}\taskProcessingResults\{taskProcessingResult-id}\subject\serviceProvisioningErrors +type LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewLifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewLifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + m := &LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+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}", pathParameters), + } + return m +} +// NewLifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewLifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) Count()(*LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*LifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + return NewLifecycleWorkflowsDeletedItemsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/lifecycle_workflows_workflow_templates_item_tasks_item_task_processing_results_item_subject_request_builder.go b/identitygovernance/lifecycle_workflows_workflow_templates_item_tasks_item_task_processing_results_item_subject_request_builder.go index 49008ec6980..4ffc546da89 100644 --- a/identitygovernance/lifecycle_workflows_workflow_templates_item_tasks_item_task_processing_results_item_subject_request_builder.go +++ b/identitygovernance/lifecycle_workflows_workflow_templates_item_tasks_item_task_processing_results_item_subject_request_builder.go @@ -63,6 +63,10 @@ func (m *LifecycleWorkflowsWorkflowTemplatesItemTasksItemTaskProcessingResultsIt func (m *LifecycleWorkflowsWorkflowTemplatesItemTasksItemTaskProcessingResultsItemSubjectRequestBuilder) MailboxSettings()(*LifecycleWorkflowsWorkflowTemplatesItemTasksItemTaskProcessingResultsItemSubjectMailboxSettingsRequestBuilder) { return NewLifecycleWorkflowsWorkflowTemplatesItemTasksItemTaskProcessingResultsItemSubjectMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *LifecycleWorkflowsWorkflowTemplatesItemTasksItemTaskProcessingResultsItemSubjectRequestBuilder) ServiceProvisioningErrors()(*LifecycleWorkflowsWorkflowTemplatesItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + return NewLifecycleWorkflowsWorkflowTemplatesItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation the unique identifier of the Azure AD user targeted for the task execution.Supports $filter(eq, ne) and $expand. func (m *LifecycleWorkflowsWorkflowTemplatesItemTasksItemTaskProcessingResultsItemSubjectRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowTemplatesItemTasksItemTaskProcessingResultsItemSubjectRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/identitygovernance/lifecycle_workflows_workflow_templates_item_tasks_item_task_processing_results_item_subject_service_provisioning_errors_count_request_builder.go b/identitygovernance/lifecycle_workflows_workflow_templates_item_tasks_item_task_processing_results_item_subject_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..7e1b056f4d1 --- /dev/null +++ b/identitygovernance/lifecycle_workflows_workflow_templates_item_tasks_item_task_processing_results_item_subject_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// LifecycleWorkflowsWorkflowTemplatesItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type LifecycleWorkflowsWorkflowTemplatesItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// LifecycleWorkflowsWorkflowTemplatesItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type LifecycleWorkflowsWorkflowTemplatesItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// LifecycleWorkflowsWorkflowTemplatesItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type LifecycleWorkflowsWorkflowTemplatesItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *LifecycleWorkflowsWorkflowTemplatesItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewLifecycleWorkflowsWorkflowTemplatesItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewLifecycleWorkflowsWorkflowTemplatesItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsWorkflowTemplatesItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + m := &LifecycleWorkflowsWorkflowTemplatesItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflowTemplates/{workflowTemplate%2Did}/tasks/{task%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewLifecycleWorkflowsWorkflowTemplatesItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewLifecycleWorkflowsWorkflowTemplatesItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsWorkflowTemplatesItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewLifecycleWorkflowsWorkflowTemplatesItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *LifecycleWorkflowsWorkflowTemplatesItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowTemplatesItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *LifecycleWorkflowsWorkflowTemplatesItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowTemplatesItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *LifecycleWorkflowsWorkflowTemplatesItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*LifecycleWorkflowsWorkflowTemplatesItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + return NewLifecycleWorkflowsWorkflowTemplatesItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/lifecycle_workflows_workflow_templates_item_tasks_item_task_processing_results_item_subject_service_provisioning_errors_request_builder.go b/identitygovernance/lifecycle_workflows_workflow_templates_item_tasks_item_task_processing_results_item_subject_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..8f668045a2e --- /dev/null +++ b/identitygovernance/lifecycle_workflows_workflow_templates_item_tasks_item_task_processing_results_item_subject_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// LifecycleWorkflowsWorkflowTemplatesItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \identityGovernance\lifecycleWorkflows\workflowTemplates\{workflowTemplate-id}\tasks\{task-id}\taskProcessingResults\{taskProcessingResult-id}\subject\serviceProvisioningErrors +type LifecycleWorkflowsWorkflowTemplatesItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// LifecycleWorkflowsWorkflowTemplatesItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type LifecycleWorkflowsWorkflowTemplatesItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// LifecycleWorkflowsWorkflowTemplatesItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type LifecycleWorkflowsWorkflowTemplatesItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *LifecycleWorkflowsWorkflowTemplatesItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewLifecycleWorkflowsWorkflowTemplatesItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewLifecycleWorkflowsWorkflowTemplatesItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsWorkflowTemplatesItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + m := &LifecycleWorkflowsWorkflowTemplatesItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflowTemplates/{workflowTemplate%2Did}/tasks/{task%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewLifecycleWorkflowsWorkflowTemplatesItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewLifecycleWorkflowsWorkflowTemplatesItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsWorkflowTemplatesItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewLifecycleWorkflowsWorkflowTemplatesItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *LifecycleWorkflowsWorkflowTemplatesItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) Count()(*LifecycleWorkflowsWorkflowTemplatesItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + return NewLifecycleWorkflowsWorkflowTemplatesItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *LifecycleWorkflowsWorkflowTemplatesItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowTemplatesItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *LifecycleWorkflowsWorkflowTemplatesItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowTemplatesItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *LifecycleWorkflowsWorkflowTemplatesItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*LifecycleWorkflowsWorkflowTemplatesItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + return NewLifecycleWorkflowsWorkflowTemplatesItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/lifecycle_workflows_workflows_item_created_by_request_builder.go b/identitygovernance/lifecycle_workflows_workflows_item_created_by_request_builder.go index e187b39ba27..d7af130b2c9 100644 --- a/identitygovernance/lifecycle_workflows_workflows_item_created_by_request_builder.go +++ b/identitygovernance/lifecycle_workflows_workflows_item_created_by_request_builder.go @@ -63,6 +63,10 @@ func (m *LifecycleWorkflowsWorkflowsItemCreatedByRequestBuilder) Get(ctx context func (m *LifecycleWorkflowsWorkflowsItemCreatedByRequestBuilder) MailboxSettings()(*LifecycleWorkflowsWorkflowsItemCreatedByMailboxSettingsRequestBuilder) { return NewLifecycleWorkflowsWorkflowsItemCreatedByMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *LifecycleWorkflowsWorkflowsItemCreatedByRequestBuilder) ServiceProvisioningErrors()(*LifecycleWorkflowsWorkflowsItemCreatedByServiceProvisioningErrorsRequestBuilder) { + return NewLifecycleWorkflowsWorkflowsItemCreatedByServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation the user who created the workflow. func (m *LifecycleWorkflowsWorkflowsItemCreatedByRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowsItemCreatedByRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/identitygovernance/lifecycle_workflows_workflows_item_created_by_service_provisioning_errors_count_request_builder.go b/identitygovernance/lifecycle_workflows_workflows_item_created_by_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..2a452424845 --- /dev/null +++ b/identitygovernance/lifecycle_workflows_workflows_item_created_by_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// LifecycleWorkflowsWorkflowsItemCreatedByServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type LifecycleWorkflowsWorkflowsItemCreatedByServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// LifecycleWorkflowsWorkflowsItemCreatedByServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type LifecycleWorkflowsWorkflowsItemCreatedByServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// LifecycleWorkflowsWorkflowsItemCreatedByServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type LifecycleWorkflowsWorkflowsItemCreatedByServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *LifecycleWorkflowsWorkflowsItemCreatedByServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewLifecycleWorkflowsWorkflowsItemCreatedByServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewLifecycleWorkflowsWorkflowsItemCreatedByServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsWorkflowsItemCreatedByServiceProvisioningErrorsCountRequestBuilder) { + m := &LifecycleWorkflowsWorkflowsItemCreatedByServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/createdBy/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewLifecycleWorkflowsWorkflowsItemCreatedByServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewLifecycleWorkflowsWorkflowsItemCreatedByServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsWorkflowsItemCreatedByServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewLifecycleWorkflowsWorkflowsItemCreatedByServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *LifecycleWorkflowsWorkflowsItemCreatedByServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowsItemCreatedByServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *LifecycleWorkflowsWorkflowsItemCreatedByServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowsItemCreatedByServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *LifecycleWorkflowsWorkflowsItemCreatedByServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*LifecycleWorkflowsWorkflowsItemCreatedByServiceProvisioningErrorsCountRequestBuilder) { + return NewLifecycleWorkflowsWorkflowsItemCreatedByServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/lifecycle_workflows_workflows_item_created_by_service_provisioning_errors_request_builder.go b/identitygovernance/lifecycle_workflows_workflows_item_created_by_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..01a8f66b7dd --- /dev/null +++ b/identitygovernance/lifecycle_workflows_workflows_item_created_by_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// LifecycleWorkflowsWorkflowsItemCreatedByServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \identityGovernance\lifecycleWorkflows\workflows\{workflow-id}\createdBy\serviceProvisioningErrors +type LifecycleWorkflowsWorkflowsItemCreatedByServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// LifecycleWorkflowsWorkflowsItemCreatedByServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type LifecycleWorkflowsWorkflowsItemCreatedByServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// LifecycleWorkflowsWorkflowsItemCreatedByServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type LifecycleWorkflowsWorkflowsItemCreatedByServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *LifecycleWorkflowsWorkflowsItemCreatedByServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewLifecycleWorkflowsWorkflowsItemCreatedByServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewLifecycleWorkflowsWorkflowsItemCreatedByServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsWorkflowsItemCreatedByServiceProvisioningErrorsRequestBuilder) { + m := &LifecycleWorkflowsWorkflowsItemCreatedByServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/createdBy/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewLifecycleWorkflowsWorkflowsItemCreatedByServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewLifecycleWorkflowsWorkflowsItemCreatedByServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsWorkflowsItemCreatedByServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewLifecycleWorkflowsWorkflowsItemCreatedByServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *LifecycleWorkflowsWorkflowsItemCreatedByServiceProvisioningErrorsRequestBuilder) Count()(*LifecycleWorkflowsWorkflowsItemCreatedByServiceProvisioningErrorsCountRequestBuilder) { + return NewLifecycleWorkflowsWorkflowsItemCreatedByServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *LifecycleWorkflowsWorkflowsItemCreatedByServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowsItemCreatedByServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *LifecycleWorkflowsWorkflowsItemCreatedByServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowsItemCreatedByServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *LifecycleWorkflowsWorkflowsItemCreatedByServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*LifecycleWorkflowsWorkflowsItemCreatedByServiceProvisioningErrorsRequestBuilder) { + return NewLifecycleWorkflowsWorkflowsItemCreatedByServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/lifecycle_workflows_workflows_item_last_modified_by_request_builder.go b/identitygovernance/lifecycle_workflows_workflows_item_last_modified_by_request_builder.go index 8d559c7bcba..cbacb870499 100644 --- a/identitygovernance/lifecycle_workflows_workflows_item_last_modified_by_request_builder.go +++ b/identitygovernance/lifecycle_workflows_workflows_item_last_modified_by_request_builder.go @@ -63,6 +63,10 @@ func (m *LifecycleWorkflowsWorkflowsItemLastModifiedByRequestBuilder) Get(ctx co func (m *LifecycleWorkflowsWorkflowsItemLastModifiedByRequestBuilder) MailboxSettings()(*LifecycleWorkflowsWorkflowsItemLastModifiedByMailboxSettingsRequestBuilder) { return NewLifecycleWorkflowsWorkflowsItemLastModifiedByMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *LifecycleWorkflowsWorkflowsItemLastModifiedByRequestBuilder) ServiceProvisioningErrors()(*LifecycleWorkflowsWorkflowsItemLastModifiedByServiceProvisioningErrorsRequestBuilder) { + return NewLifecycleWorkflowsWorkflowsItemLastModifiedByServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation the user who last modified the workflow. func (m *LifecycleWorkflowsWorkflowsItemLastModifiedByRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowsItemLastModifiedByRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/identitygovernance/lifecycle_workflows_workflows_item_last_modified_by_service_provisioning_errors_count_request_builder.go b/identitygovernance/lifecycle_workflows_workflows_item_last_modified_by_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..986a09ea02e --- /dev/null +++ b/identitygovernance/lifecycle_workflows_workflows_item_last_modified_by_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// LifecycleWorkflowsWorkflowsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type LifecycleWorkflowsWorkflowsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// LifecycleWorkflowsWorkflowsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type LifecycleWorkflowsWorkflowsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// LifecycleWorkflowsWorkflowsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type LifecycleWorkflowsWorkflowsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *LifecycleWorkflowsWorkflowsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewLifecycleWorkflowsWorkflowsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewLifecycleWorkflowsWorkflowsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsWorkflowsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder) { + m := &LifecycleWorkflowsWorkflowsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/lastModifiedBy/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewLifecycleWorkflowsWorkflowsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewLifecycleWorkflowsWorkflowsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsWorkflowsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewLifecycleWorkflowsWorkflowsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *LifecycleWorkflowsWorkflowsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *LifecycleWorkflowsWorkflowsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *LifecycleWorkflowsWorkflowsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*LifecycleWorkflowsWorkflowsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder) { + return NewLifecycleWorkflowsWorkflowsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/lifecycle_workflows_workflows_item_last_modified_by_service_provisioning_errors_request_builder.go b/identitygovernance/lifecycle_workflows_workflows_item_last_modified_by_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..b9193cb26a9 --- /dev/null +++ b/identitygovernance/lifecycle_workflows_workflows_item_last_modified_by_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// LifecycleWorkflowsWorkflowsItemLastModifiedByServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \identityGovernance\lifecycleWorkflows\workflows\{workflow-id}\lastModifiedBy\serviceProvisioningErrors +type LifecycleWorkflowsWorkflowsItemLastModifiedByServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// LifecycleWorkflowsWorkflowsItemLastModifiedByServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type LifecycleWorkflowsWorkflowsItemLastModifiedByServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// LifecycleWorkflowsWorkflowsItemLastModifiedByServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type LifecycleWorkflowsWorkflowsItemLastModifiedByServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *LifecycleWorkflowsWorkflowsItemLastModifiedByServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewLifecycleWorkflowsWorkflowsItemLastModifiedByServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewLifecycleWorkflowsWorkflowsItemLastModifiedByServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsWorkflowsItemLastModifiedByServiceProvisioningErrorsRequestBuilder) { + m := &LifecycleWorkflowsWorkflowsItemLastModifiedByServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/lastModifiedBy/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewLifecycleWorkflowsWorkflowsItemLastModifiedByServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewLifecycleWorkflowsWorkflowsItemLastModifiedByServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsWorkflowsItemLastModifiedByServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewLifecycleWorkflowsWorkflowsItemLastModifiedByServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *LifecycleWorkflowsWorkflowsItemLastModifiedByServiceProvisioningErrorsRequestBuilder) Count()(*LifecycleWorkflowsWorkflowsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder) { + return NewLifecycleWorkflowsWorkflowsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *LifecycleWorkflowsWorkflowsItemLastModifiedByServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowsItemLastModifiedByServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *LifecycleWorkflowsWorkflowsItemLastModifiedByServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowsItemLastModifiedByServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *LifecycleWorkflowsWorkflowsItemLastModifiedByServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*LifecycleWorkflowsWorkflowsItemLastModifiedByServiceProvisioningErrorsRequestBuilder) { + return NewLifecycleWorkflowsWorkflowsItemLastModifiedByServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/lifecycle_workflows_workflows_item_runs_item_task_processing_results_item_subject_request_builder.go b/identitygovernance/lifecycle_workflows_workflows_item_runs_item_task_processing_results_item_subject_request_builder.go index c11e4616814..45503d5d96d 100644 --- a/identitygovernance/lifecycle_workflows_workflows_item_runs_item_task_processing_results_item_subject_request_builder.go +++ b/identitygovernance/lifecycle_workflows_workflows_item_runs_item_task_processing_results_item_subject_request_builder.go @@ -63,6 +63,10 @@ func (m *LifecycleWorkflowsWorkflowsItemRunsItemTaskProcessingResultsItemSubject func (m *LifecycleWorkflowsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectRequestBuilder) MailboxSettings()(*LifecycleWorkflowsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectMailboxSettingsRequestBuilder) { return NewLifecycleWorkflowsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *LifecycleWorkflowsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectRequestBuilder) ServiceProvisioningErrors()(*LifecycleWorkflowsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + return NewLifecycleWorkflowsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation the unique identifier of the Azure AD user targeted for the task execution.Supports $filter(eq, ne) and $expand. func (m *LifecycleWorkflowsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/identitygovernance/lifecycle_workflows_workflows_item_runs_item_task_processing_results_item_subject_service_provisioning_errors_count_request_builder.go b/identitygovernance/lifecycle_workflows_workflows_item_runs_item_task_processing_results_item_subject_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..8fa0eaa1066 --- /dev/null +++ b/identitygovernance/lifecycle_workflows_workflows_item_runs_item_task_processing_results_item_subject_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// LifecycleWorkflowsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type LifecycleWorkflowsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// LifecycleWorkflowsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type LifecycleWorkflowsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// LifecycleWorkflowsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type LifecycleWorkflowsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *LifecycleWorkflowsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewLifecycleWorkflowsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewLifecycleWorkflowsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + m := &LifecycleWorkflowsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/runs/{run%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewLifecycleWorkflowsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewLifecycleWorkflowsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewLifecycleWorkflowsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *LifecycleWorkflowsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *LifecycleWorkflowsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *LifecycleWorkflowsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*LifecycleWorkflowsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + return NewLifecycleWorkflowsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/lifecycle_workflows_workflows_item_runs_item_task_processing_results_item_subject_service_provisioning_errors_request_builder.go b/identitygovernance/lifecycle_workflows_workflows_item_runs_item_task_processing_results_item_subject_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..603c9c37f34 --- /dev/null +++ b/identitygovernance/lifecycle_workflows_workflows_item_runs_item_task_processing_results_item_subject_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// LifecycleWorkflowsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \identityGovernance\lifecycleWorkflows\workflows\{workflow-id}\runs\{run-id}\taskProcessingResults\{taskProcessingResult-id}\subject\serviceProvisioningErrors +type LifecycleWorkflowsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// LifecycleWorkflowsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type LifecycleWorkflowsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// LifecycleWorkflowsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type LifecycleWorkflowsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *LifecycleWorkflowsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewLifecycleWorkflowsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewLifecycleWorkflowsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + m := &LifecycleWorkflowsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/runs/{run%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewLifecycleWorkflowsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewLifecycleWorkflowsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewLifecycleWorkflowsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *LifecycleWorkflowsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) Count()(*LifecycleWorkflowsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + return NewLifecycleWorkflowsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *LifecycleWorkflowsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *LifecycleWorkflowsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *LifecycleWorkflowsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*LifecycleWorkflowsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + return NewLifecycleWorkflowsWorkflowsItemRunsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/lifecycle_workflows_workflows_item_runs_item_user_processing_results_item_subject_request_builder.go b/identitygovernance/lifecycle_workflows_workflows_item_runs_item_user_processing_results_item_subject_request_builder.go index 484eceb0295..3c5a558d715 100644 --- a/identitygovernance/lifecycle_workflows_workflows_item_runs_item_user_processing_results_item_subject_request_builder.go +++ b/identitygovernance/lifecycle_workflows_workflows_item_runs_item_user_processing_results_item_subject_request_builder.go @@ -63,6 +63,10 @@ func (m *LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemSubject func (m *LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemSubjectRequestBuilder) MailboxSettings()(*LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemSubjectMailboxSettingsRequestBuilder) { return NewLifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemSubjectMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemSubjectRequestBuilder) ServiceProvisioningErrors()(*LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + return NewLifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation the unique identifier of the AAD user targeted for the taskProcessingResult.Supports $filter(eq, ne) and $expand. func (m *LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemSubjectRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemSubjectRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/identitygovernance/lifecycle_workflows_workflows_item_runs_item_user_processing_results_item_subject_service_provisioning_errors_count_request_builder.go b/identitygovernance/lifecycle_workflows_workflows_item_runs_item_user_processing_results_item_subject_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..a46de6911f2 --- /dev/null +++ b/identitygovernance/lifecycle_workflows_workflows_item_runs_item_user_processing_results_item_subject_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewLifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewLifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + m := &LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/runs/{run%2Did}/userProcessingResults/{userProcessingResult%2Did}/subject/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewLifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewLifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewLifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + return NewLifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/lifecycle_workflows_workflows_item_runs_item_user_processing_results_item_subject_service_provisioning_errors_request_builder.go b/identitygovernance/lifecycle_workflows_workflows_item_runs_item_user_processing_results_item_subject_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..f15c5483e42 --- /dev/null +++ b/identitygovernance/lifecycle_workflows_workflows_item_runs_item_user_processing_results_item_subject_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \identityGovernance\lifecycleWorkflows\workflows\{workflow-id}\runs\{run-id}\userProcessingResults\{userProcessingResult-id}\subject\serviceProvisioningErrors +type LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewLifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewLifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + m := &LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/runs/{run%2Did}/userProcessingResults/{userProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewLifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewLifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewLifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) Count()(*LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + return NewLifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + return NewLifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/lifecycle_workflows_workflows_item_runs_item_user_processing_results_item_task_processing_results_item_subject_request_builder.go b/identitygovernance/lifecycle_workflows_workflows_item_runs_item_user_processing_results_item_task_processing_results_item_subject_request_builder.go index c7d66f36cf2..7dfb02e9849 100644 --- a/identitygovernance/lifecycle_workflows_workflows_item_runs_item_user_processing_results_item_task_processing_results_item_subject_request_builder.go +++ b/identitygovernance/lifecycle_workflows_workflows_item_runs_item_user_processing_results_item_task_processing_results_item_subject_request_builder.go @@ -63,6 +63,10 @@ func (m *LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemTaskPro func (m *LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectRequestBuilder) MailboxSettings()(*LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectMailboxSettingsRequestBuilder) { return NewLifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectRequestBuilder) ServiceProvisioningErrors()(*LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + return NewLifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation the unique identifier of the Azure AD user targeted for the task execution.Supports $filter(eq, ne) and $expand. func (m *LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/identitygovernance/lifecycle_workflows_workflows_item_runs_item_user_processing_results_item_task_processing_results_item_subject_service_provisioning_errors_count_request_builder.go b/identitygovernance/lifecycle_workflows_workflows_item_runs_item_user_processing_results_item_task_processing_results_item_subject_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..eedc19f934a --- /dev/null +++ b/identitygovernance/lifecycle_workflows_workflows_item_runs_item_user_processing_results_item_task_processing_results_item_subject_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewLifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewLifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + m := &LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/runs/{run%2Did}/userProcessingResults/{userProcessingResult%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewLifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewLifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewLifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + return NewLifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/lifecycle_workflows_workflows_item_runs_item_user_processing_results_item_task_processing_results_item_subject_service_provisioning_errors_request_builder.go b/identitygovernance/lifecycle_workflows_workflows_item_runs_item_user_processing_results_item_task_processing_results_item_subject_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..e1271eaebf9 --- /dev/null +++ b/identitygovernance/lifecycle_workflows_workflows_item_runs_item_user_processing_results_item_task_processing_results_item_subject_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \identityGovernance\lifecycleWorkflows\workflows\{workflow-id}\runs\{run-id}\userProcessingResults\{userProcessingResult-id}\taskProcessingResults\{taskProcessingResult-id}\subject\serviceProvisioningErrors +type LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewLifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewLifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + m := &LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+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}", pathParameters), + } + return m +} +// NewLifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewLifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewLifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) Count()(*LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + return NewLifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*LifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + return NewLifecycleWorkflowsWorkflowsItemRunsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/lifecycle_workflows_workflows_item_task_reports_item_task_processing_results_item_subject_request_builder.go b/identitygovernance/lifecycle_workflows_workflows_item_task_reports_item_task_processing_results_item_subject_request_builder.go index b3b7af6c00a..98de22da893 100644 --- a/identitygovernance/lifecycle_workflows_workflows_item_task_reports_item_task_processing_results_item_subject_request_builder.go +++ b/identitygovernance/lifecycle_workflows_workflows_item_task_reports_item_task_processing_results_item_subject_request_builder.go @@ -63,6 +63,10 @@ func (m *LifecycleWorkflowsWorkflowsItemTaskReportsItemTaskProcessingResultsItem func (m *LifecycleWorkflowsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectRequestBuilder) MailboxSettings()(*LifecycleWorkflowsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectMailboxSettingsRequestBuilder) { return NewLifecycleWorkflowsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *LifecycleWorkflowsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectRequestBuilder) ServiceProvisioningErrors()(*LifecycleWorkflowsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + return NewLifecycleWorkflowsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation the unique identifier of the Azure AD user targeted for the task execution.Supports $filter(eq, ne) and $expand. func (m *LifecycleWorkflowsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/identitygovernance/lifecycle_workflows_workflows_item_task_reports_item_task_processing_results_item_subject_service_provisioning_errors_count_request_builder.go b/identitygovernance/lifecycle_workflows_workflows_item_task_reports_item_task_processing_results_item_subject_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..65cb57eae16 --- /dev/null +++ b/identitygovernance/lifecycle_workflows_workflows_item_task_reports_item_task_processing_results_item_subject_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// LifecycleWorkflowsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type LifecycleWorkflowsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// LifecycleWorkflowsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type LifecycleWorkflowsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// LifecycleWorkflowsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type LifecycleWorkflowsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *LifecycleWorkflowsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewLifecycleWorkflowsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewLifecycleWorkflowsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + m := &LifecycleWorkflowsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/taskReports/{taskReport%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewLifecycleWorkflowsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewLifecycleWorkflowsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewLifecycleWorkflowsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *LifecycleWorkflowsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *LifecycleWorkflowsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *LifecycleWorkflowsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*LifecycleWorkflowsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + return NewLifecycleWorkflowsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/lifecycle_workflows_workflows_item_task_reports_item_task_processing_results_item_subject_service_provisioning_errors_request_builder.go b/identitygovernance/lifecycle_workflows_workflows_item_task_reports_item_task_processing_results_item_subject_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..fca68b9f8f0 --- /dev/null +++ b/identitygovernance/lifecycle_workflows_workflows_item_task_reports_item_task_processing_results_item_subject_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// LifecycleWorkflowsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \identityGovernance\lifecycleWorkflows\workflows\{workflow-id}\taskReports\{taskReport-id}\taskProcessingResults\{taskProcessingResult-id}\subject\serviceProvisioningErrors +type LifecycleWorkflowsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// LifecycleWorkflowsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type LifecycleWorkflowsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// LifecycleWorkflowsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type LifecycleWorkflowsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *LifecycleWorkflowsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewLifecycleWorkflowsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewLifecycleWorkflowsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + m := &LifecycleWorkflowsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/taskReports/{taskReport%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewLifecycleWorkflowsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewLifecycleWorkflowsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewLifecycleWorkflowsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *LifecycleWorkflowsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) Count()(*LifecycleWorkflowsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + return NewLifecycleWorkflowsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *LifecycleWorkflowsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *LifecycleWorkflowsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *LifecycleWorkflowsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*LifecycleWorkflowsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + return NewLifecycleWorkflowsWorkflowsItemTaskReportsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/lifecycle_workflows_workflows_item_tasks_item_task_processing_results_item_subject_request_builder.go b/identitygovernance/lifecycle_workflows_workflows_item_tasks_item_task_processing_results_item_subject_request_builder.go index 38af08c8791..dfaa5e0a3f0 100644 --- a/identitygovernance/lifecycle_workflows_workflows_item_tasks_item_task_processing_results_item_subject_request_builder.go +++ b/identitygovernance/lifecycle_workflows_workflows_item_tasks_item_task_processing_results_item_subject_request_builder.go @@ -63,6 +63,10 @@ func (m *LifecycleWorkflowsWorkflowsItemTasksItemTaskProcessingResultsItemSubjec func (m *LifecycleWorkflowsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectRequestBuilder) MailboxSettings()(*LifecycleWorkflowsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectMailboxSettingsRequestBuilder) { return NewLifecycleWorkflowsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *LifecycleWorkflowsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectRequestBuilder) ServiceProvisioningErrors()(*LifecycleWorkflowsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + return NewLifecycleWorkflowsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation the unique identifier of the Azure AD user targeted for the task execution.Supports $filter(eq, ne) and $expand. func (m *LifecycleWorkflowsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/identitygovernance/lifecycle_workflows_workflows_item_tasks_item_task_processing_results_item_subject_service_provisioning_errors_count_request_builder.go b/identitygovernance/lifecycle_workflows_workflows_item_tasks_item_task_processing_results_item_subject_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..d61b4c9711e --- /dev/null +++ b/identitygovernance/lifecycle_workflows_workflows_item_tasks_item_task_processing_results_item_subject_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// LifecycleWorkflowsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type LifecycleWorkflowsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// LifecycleWorkflowsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type LifecycleWorkflowsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// LifecycleWorkflowsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type LifecycleWorkflowsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *LifecycleWorkflowsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewLifecycleWorkflowsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewLifecycleWorkflowsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + m := &LifecycleWorkflowsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/tasks/{task%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewLifecycleWorkflowsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewLifecycleWorkflowsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewLifecycleWorkflowsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *LifecycleWorkflowsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *LifecycleWorkflowsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *LifecycleWorkflowsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*LifecycleWorkflowsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + return NewLifecycleWorkflowsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/lifecycle_workflows_workflows_item_tasks_item_task_processing_results_item_subject_service_provisioning_errors_request_builder.go b/identitygovernance/lifecycle_workflows_workflows_item_tasks_item_task_processing_results_item_subject_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..19aa6dd19db --- /dev/null +++ b/identitygovernance/lifecycle_workflows_workflows_item_tasks_item_task_processing_results_item_subject_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// LifecycleWorkflowsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \identityGovernance\lifecycleWorkflows\workflows\{workflow-id}\tasks\{task-id}\taskProcessingResults\{taskProcessingResult-id}\subject\serviceProvisioningErrors +type LifecycleWorkflowsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// LifecycleWorkflowsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type LifecycleWorkflowsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// LifecycleWorkflowsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type LifecycleWorkflowsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *LifecycleWorkflowsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewLifecycleWorkflowsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewLifecycleWorkflowsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + m := &LifecycleWorkflowsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/tasks/{task%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewLifecycleWorkflowsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewLifecycleWorkflowsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewLifecycleWorkflowsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *LifecycleWorkflowsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) Count()(*LifecycleWorkflowsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + return NewLifecycleWorkflowsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *LifecycleWorkflowsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *LifecycleWorkflowsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *LifecycleWorkflowsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*LifecycleWorkflowsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + return NewLifecycleWorkflowsWorkflowsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/lifecycle_workflows_workflows_item_user_processing_results_item_subject_request_builder.go b/identitygovernance/lifecycle_workflows_workflows_item_user_processing_results_item_subject_request_builder.go index 5d9261c53fb..1b115e7427a 100644 --- a/identitygovernance/lifecycle_workflows_workflows_item_user_processing_results_item_subject_request_builder.go +++ b/identitygovernance/lifecycle_workflows_workflows_item_user_processing_results_item_subject_request_builder.go @@ -63,6 +63,10 @@ func (m *LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemSubjectRequestB func (m *LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemSubjectRequestBuilder) MailboxSettings()(*LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemSubjectMailboxSettingsRequestBuilder) { return NewLifecycleWorkflowsWorkflowsItemUserProcessingResultsItemSubjectMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemSubjectRequestBuilder) ServiceProvisioningErrors()(*LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + return NewLifecycleWorkflowsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation the unique identifier of the AAD user targeted for the taskProcessingResult.Supports $filter(eq, ne) and $expand. func (m *LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemSubjectRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemSubjectRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/identitygovernance/lifecycle_workflows_workflows_item_user_processing_results_item_subject_service_provisioning_errors_count_request_builder.go b/identitygovernance/lifecycle_workflows_workflows_item_user_processing_results_item_subject_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..44fcf9fd7f3 --- /dev/null +++ b/identitygovernance/lifecycle_workflows_workflows_item_user_processing_results_item_subject_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewLifecycleWorkflowsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewLifecycleWorkflowsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + m := &LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/userProcessingResults/{userProcessingResult%2Did}/subject/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewLifecycleWorkflowsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewLifecycleWorkflowsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewLifecycleWorkflowsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + return NewLifecycleWorkflowsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/lifecycle_workflows_workflows_item_user_processing_results_item_subject_service_provisioning_errors_request_builder.go b/identitygovernance/lifecycle_workflows_workflows_item_user_processing_results_item_subject_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..d5389185a96 --- /dev/null +++ b/identitygovernance/lifecycle_workflows_workflows_item_user_processing_results_item_subject_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \identityGovernance\lifecycleWorkflows\workflows\{workflow-id}\userProcessingResults\{userProcessingResult-id}\subject\serviceProvisioningErrors +type LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewLifecycleWorkflowsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewLifecycleWorkflowsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + m := &LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/userProcessingResults/{userProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewLifecycleWorkflowsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewLifecycleWorkflowsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewLifecycleWorkflowsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) Count()(*LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + return NewLifecycleWorkflowsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + return NewLifecycleWorkflowsWorkflowsItemUserProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/lifecycle_workflows_workflows_item_user_processing_results_item_task_processing_results_item_subject_request_builder.go b/identitygovernance/lifecycle_workflows_workflows_item_user_processing_results_item_task_processing_results_item_subject_request_builder.go index 9c1711a3326..fb8e674f20f 100644 --- a/identitygovernance/lifecycle_workflows_workflows_item_user_processing_results_item_task_processing_results_item_subject_request_builder.go +++ b/identitygovernance/lifecycle_workflows_workflows_item_user_processing_results_item_task_processing_results_item_subject_request_builder.go @@ -63,6 +63,10 @@ func (m *LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemTaskProcessingR func (m *LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectRequestBuilder) MailboxSettings()(*LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectMailboxSettingsRequestBuilder) { return NewLifecycleWorkflowsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectRequestBuilder) ServiceProvisioningErrors()(*LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + return NewLifecycleWorkflowsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation the unique identifier of the Azure AD user targeted for the task execution.Supports $filter(eq, ne) and $expand. func (m *LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/identitygovernance/lifecycle_workflows_workflows_item_user_processing_results_item_task_processing_results_item_subject_service_provisioning_errors_count_request_builder.go b/identitygovernance/lifecycle_workflows_workflows_item_user_processing_results_item_task_processing_results_item_subject_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..713087c4bdb --- /dev/null +++ b/identitygovernance/lifecycle_workflows_workflows_item_user_processing_results_item_task_processing_results_item_subject_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewLifecycleWorkflowsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewLifecycleWorkflowsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + m := &LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/userProcessingResults/{userProcessingResult%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewLifecycleWorkflowsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewLifecycleWorkflowsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewLifecycleWorkflowsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + return NewLifecycleWorkflowsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/lifecycle_workflows_workflows_item_user_processing_results_item_task_processing_results_item_subject_service_provisioning_errors_request_builder.go b/identitygovernance/lifecycle_workflows_workflows_item_user_processing_results_item_task_processing_results_item_subject_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..b3757bbb78b --- /dev/null +++ b/identitygovernance/lifecycle_workflows_workflows_item_user_processing_results_item_task_processing_results_item_subject_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \identityGovernance\lifecycleWorkflows\workflows\{workflow-id}\userProcessingResults\{userProcessingResult-id}\taskProcessingResults\{taskProcessingResult-id}\subject\serviceProvisioningErrors +type LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewLifecycleWorkflowsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewLifecycleWorkflowsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + m := &LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/userProcessingResults/{userProcessingResult%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewLifecycleWorkflowsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewLifecycleWorkflowsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewLifecycleWorkflowsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) Count()(*LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + return NewLifecycleWorkflowsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*LifecycleWorkflowsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + return NewLifecycleWorkflowsWorkflowsItemUserProcessingResultsItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/lifecycle_workflows_workflows_item_versions_item_created_by_request_builder.go b/identitygovernance/lifecycle_workflows_workflows_item_versions_item_created_by_request_builder.go index f4c51b1d96c..41a82e7235e 100644 --- a/identitygovernance/lifecycle_workflows_workflows_item_versions_item_created_by_request_builder.go +++ b/identitygovernance/lifecycle_workflows_workflows_item_versions_item_created_by_request_builder.go @@ -63,6 +63,10 @@ func (m *LifecycleWorkflowsWorkflowsItemVersionsItemCreatedByRequestBuilder) Get func (m *LifecycleWorkflowsWorkflowsItemVersionsItemCreatedByRequestBuilder) MailboxSettings()(*LifecycleWorkflowsWorkflowsItemVersionsItemCreatedByMailboxSettingsRequestBuilder) { return NewLifecycleWorkflowsWorkflowsItemVersionsItemCreatedByMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *LifecycleWorkflowsWorkflowsItemVersionsItemCreatedByRequestBuilder) ServiceProvisioningErrors()(*LifecycleWorkflowsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsRequestBuilder) { + return NewLifecycleWorkflowsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation the user who created the workflow. func (m *LifecycleWorkflowsWorkflowsItemVersionsItemCreatedByRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowsItemVersionsItemCreatedByRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/identitygovernance/lifecycle_workflows_workflows_item_versions_item_created_by_service_provisioning_errors_count_request_builder.go b/identitygovernance/lifecycle_workflows_workflows_item_versions_item_created_by_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..39c7b17fd72 --- /dev/null +++ b/identitygovernance/lifecycle_workflows_workflows_item_versions_item_created_by_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// LifecycleWorkflowsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type LifecycleWorkflowsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// LifecycleWorkflowsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type LifecycleWorkflowsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// LifecycleWorkflowsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type LifecycleWorkflowsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *LifecycleWorkflowsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewLifecycleWorkflowsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewLifecycleWorkflowsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsCountRequestBuilder) { + m := &LifecycleWorkflowsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/versions/{workflowVersion%2DversionNumber}/createdBy/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewLifecycleWorkflowsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewLifecycleWorkflowsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewLifecycleWorkflowsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *LifecycleWorkflowsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *LifecycleWorkflowsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *LifecycleWorkflowsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*LifecycleWorkflowsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsCountRequestBuilder) { + return NewLifecycleWorkflowsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/lifecycle_workflows_workflows_item_versions_item_created_by_service_provisioning_errors_request_builder.go b/identitygovernance/lifecycle_workflows_workflows_item_versions_item_created_by_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..b81833e539b --- /dev/null +++ b/identitygovernance/lifecycle_workflows_workflows_item_versions_item_created_by_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// LifecycleWorkflowsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \identityGovernance\lifecycleWorkflows\workflows\{workflow-id}\versions\{workflowVersion-versionNumber}\createdBy\serviceProvisioningErrors +type LifecycleWorkflowsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// LifecycleWorkflowsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type LifecycleWorkflowsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// LifecycleWorkflowsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type LifecycleWorkflowsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *LifecycleWorkflowsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewLifecycleWorkflowsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewLifecycleWorkflowsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsRequestBuilder) { + m := &LifecycleWorkflowsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/versions/{workflowVersion%2DversionNumber}/createdBy/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewLifecycleWorkflowsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewLifecycleWorkflowsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewLifecycleWorkflowsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *LifecycleWorkflowsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsRequestBuilder) Count()(*LifecycleWorkflowsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsCountRequestBuilder) { + return NewLifecycleWorkflowsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *LifecycleWorkflowsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *LifecycleWorkflowsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *LifecycleWorkflowsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*LifecycleWorkflowsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsRequestBuilder) { + return NewLifecycleWorkflowsWorkflowsItemVersionsItemCreatedByServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/lifecycle_workflows_workflows_item_versions_item_last_modified_by_request_builder.go b/identitygovernance/lifecycle_workflows_workflows_item_versions_item_last_modified_by_request_builder.go index ffe33c93a9a..fab9c8248e1 100644 --- a/identitygovernance/lifecycle_workflows_workflows_item_versions_item_last_modified_by_request_builder.go +++ b/identitygovernance/lifecycle_workflows_workflows_item_versions_item_last_modified_by_request_builder.go @@ -63,6 +63,10 @@ func (m *LifecycleWorkflowsWorkflowsItemVersionsItemLastModifiedByRequestBuilder func (m *LifecycleWorkflowsWorkflowsItemVersionsItemLastModifiedByRequestBuilder) MailboxSettings()(*LifecycleWorkflowsWorkflowsItemVersionsItemLastModifiedByMailboxSettingsRequestBuilder) { return NewLifecycleWorkflowsWorkflowsItemVersionsItemLastModifiedByMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *LifecycleWorkflowsWorkflowsItemVersionsItemLastModifiedByRequestBuilder) ServiceProvisioningErrors()(*LifecycleWorkflowsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsRequestBuilder) { + return NewLifecycleWorkflowsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation the user who last modified the workflow. func (m *LifecycleWorkflowsWorkflowsItemVersionsItemLastModifiedByRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowsItemVersionsItemLastModifiedByRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/identitygovernance/lifecycle_workflows_workflows_item_versions_item_last_modified_by_service_provisioning_errors_count_request_builder.go b/identitygovernance/lifecycle_workflows_workflows_item_versions_item_last_modified_by_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..19347adfd3c --- /dev/null +++ b/identitygovernance/lifecycle_workflows_workflows_item_versions_item_last_modified_by_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// LifecycleWorkflowsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type LifecycleWorkflowsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// LifecycleWorkflowsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type LifecycleWorkflowsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// LifecycleWorkflowsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type LifecycleWorkflowsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *LifecycleWorkflowsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewLifecycleWorkflowsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewLifecycleWorkflowsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder) { + m := &LifecycleWorkflowsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/versions/{workflowVersion%2DversionNumber}/lastModifiedBy/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewLifecycleWorkflowsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewLifecycleWorkflowsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewLifecycleWorkflowsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *LifecycleWorkflowsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *LifecycleWorkflowsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *LifecycleWorkflowsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*LifecycleWorkflowsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder) { + return NewLifecycleWorkflowsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/lifecycle_workflows_workflows_item_versions_item_last_modified_by_service_provisioning_errors_request_builder.go b/identitygovernance/lifecycle_workflows_workflows_item_versions_item_last_modified_by_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..0ffb069345d --- /dev/null +++ b/identitygovernance/lifecycle_workflows_workflows_item_versions_item_last_modified_by_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// LifecycleWorkflowsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \identityGovernance\lifecycleWorkflows\workflows\{workflow-id}\versions\{workflowVersion-versionNumber}\lastModifiedBy\serviceProvisioningErrors +type LifecycleWorkflowsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// LifecycleWorkflowsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type LifecycleWorkflowsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// LifecycleWorkflowsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type LifecycleWorkflowsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *LifecycleWorkflowsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewLifecycleWorkflowsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewLifecycleWorkflowsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsRequestBuilder) { + m := &LifecycleWorkflowsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/versions/{workflowVersion%2DversionNumber}/lastModifiedBy/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewLifecycleWorkflowsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewLifecycleWorkflowsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewLifecycleWorkflowsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *LifecycleWorkflowsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsRequestBuilder) Count()(*LifecycleWorkflowsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilder) { + return NewLifecycleWorkflowsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *LifecycleWorkflowsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *LifecycleWorkflowsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *LifecycleWorkflowsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*LifecycleWorkflowsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsRequestBuilder) { + return NewLifecycleWorkflowsWorkflowsItemVersionsItemLastModifiedByServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/lifecycle_workflows_workflows_item_versions_item_tasks_item_task_processing_results_item_subject_request_builder.go b/identitygovernance/lifecycle_workflows_workflows_item_versions_item_tasks_item_task_processing_results_item_subject_request_builder.go index bb52d813715..3bf4357a4ff 100644 --- a/identitygovernance/lifecycle_workflows_workflows_item_versions_item_tasks_item_task_processing_results_item_subject_request_builder.go +++ b/identitygovernance/lifecycle_workflows_workflows_item_versions_item_tasks_item_task_processing_results_item_subject_request_builder.go @@ -63,6 +63,10 @@ func (m *LifecycleWorkflowsWorkflowsItemVersionsItemTasksItemTaskProcessingResul func (m *LifecycleWorkflowsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectRequestBuilder) MailboxSettings()(*LifecycleWorkflowsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectMailboxSettingsRequestBuilder) { return NewLifecycleWorkflowsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *LifecycleWorkflowsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectRequestBuilder) ServiceProvisioningErrors()(*LifecycleWorkflowsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + return NewLifecycleWorkflowsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation the unique identifier of the Azure AD user targeted for the task execution.Supports $filter(eq, ne) and $expand. func (m *LifecycleWorkflowsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/identitygovernance/lifecycle_workflows_workflows_item_versions_item_tasks_item_task_processing_results_item_subject_service_provisioning_errors_count_request_builder.go b/identitygovernance/lifecycle_workflows_workflows_item_versions_item_tasks_item_task_processing_results_item_subject_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..cdf4d9b71ed --- /dev/null +++ b/identitygovernance/lifecycle_workflows_workflows_item_versions_item_tasks_item_task_processing_results_item_subject_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// LifecycleWorkflowsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type LifecycleWorkflowsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// LifecycleWorkflowsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type LifecycleWorkflowsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// LifecycleWorkflowsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type LifecycleWorkflowsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *LifecycleWorkflowsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewLifecycleWorkflowsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewLifecycleWorkflowsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + m := &LifecycleWorkflowsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/versions/{workflowVersion%2DversionNumber}/tasks/{task%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewLifecycleWorkflowsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewLifecycleWorkflowsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewLifecycleWorkflowsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *LifecycleWorkflowsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *LifecycleWorkflowsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *LifecycleWorkflowsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*LifecycleWorkflowsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + return NewLifecycleWorkflowsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/lifecycle_workflows_workflows_item_versions_item_tasks_item_task_processing_results_item_subject_service_provisioning_errors_request_builder.go b/identitygovernance/lifecycle_workflows_workflows_item_versions_item_tasks_item_task_processing_results_item_subject_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..66c21ff0a5c --- /dev/null +++ b/identitygovernance/lifecycle_workflows_workflows_item_versions_item_tasks_item_task_processing_results_item_subject_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// LifecycleWorkflowsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \identityGovernance\lifecycleWorkflows\workflows\{workflow-id}\versions\{workflowVersion-versionNumber}\tasks\{task-id}\taskProcessingResults\{taskProcessingResult-id}\subject\serviceProvisioningErrors +type LifecycleWorkflowsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// LifecycleWorkflowsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type LifecycleWorkflowsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// LifecycleWorkflowsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type LifecycleWorkflowsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *LifecycleWorkflowsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewLifecycleWorkflowsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewLifecycleWorkflowsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + m := &LifecycleWorkflowsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+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}", pathParameters), + } + return m +} +// NewLifecycleWorkflowsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewLifecycleWorkflowsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*LifecycleWorkflowsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewLifecycleWorkflowsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *LifecycleWorkflowsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) Count()(*LifecycleWorkflowsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilder) { + return NewLifecycleWorkflowsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *LifecycleWorkflowsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *LifecycleWorkflowsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *LifecycleWorkflowsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *LifecycleWorkflowsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*LifecycleWorkflowsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder) { + return NewLifecycleWorkflowsWorkflowsItemVersionsItemTasksItemTaskProcessingResultsItemSubjectServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/privileged_access_group_assignment_schedule_instances_item_group_request_builder.go b/identitygovernance/privileged_access_group_assignment_schedule_instances_item_group_request_builder.go index 5bf51e8027b..13e435e8a01 100644 --- a/identitygovernance/privileged_access_group_assignment_schedule_instances_item_group_request_builder.go +++ b/identitygovernance/privileged_access_group_assignment_schedule_instances_item_group_request_builder.go @@ -59,6 +59,10 @@ func (m *PrivilegedAccessGroupAssignmentScheduleInstancesItemGroupRequestBuilder } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Groupable), nil } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *PrivilegedAccessGroupAssignmentScheduleInstancesItemGroupRequestBuilder) ServiceProvisioningErrors()(*PrivilegedAccessGroupAssignmentScheduleInstancesItemGroupServiceProvisioningErrorsRequestBuilder) { + return NewPrivilegedAccessGroupAssignmentScheduleInstancesItemGroupServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation references the group that is the scope of the membership or ownership assignment through PIM for groups. Supports $expand. func (m *PrivilegedAccessGroupAssignmentScheduleInstancesItemGroupRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *PrivilegedAccessGroupAssignmentScheduleInstancesItemGroupRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/identitygovernance/privileged_access_group_assignment_schedule_instances_item_group_service_provisioning_errors_count_request_builder.go b/identitygovernance/privileged_access_group_assignment_schedule_instances_item_group_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..85ada5f6a2d --- /dev/null +++ b/identitygovernance/privileged_access_group_assignment_schedule_instances_item_group_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// PrivilegedAccessGroupAssignmentScheduleInstancesItemGroupServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type PrivilegedAccessGroupAssignmentScheduleInstancesItemGroupServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// PrivilegedAccessGroupAssignmentScheduleInstancesItemGroupServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type PrivilegedAccessGroupAssignmentScheduleInstancesItemGroupServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// PrivilegedAccessGroupAssignmentScheduleInstancesItemGroupServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type PrivilegedAccessGroupAssignmentScheduleInstancesItemGroupServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *PrivilegedAccessGroupAssignmentScheduleInstancesItemGroupServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewPrivilegedAccessGroupAssignmentScheduleInstancesItemGroupServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewPrivilegedAccessGroupAssignmentScheduleInstancesItemGroupServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PrivilegedAccessGroupAssignmentScheduleInstancesItemGroupServiceProvisioningErrorsCountRequestBuilder) { + m := &PrivilegedAccessGroupAssignmentScheduleInstancesItemGroupServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentScheduleInstances/{privilegedAccessGroupAssignmentScheduleInstance%2Did}/group/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewPrivilegedAccessGroupAssignmentScheduleInstancesItemGroupServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewPrivilegedAccessGroupAssignmentScheduleInstancesItemGroupServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PrivilegedAccessGroupAssignmentScheduleInstancesItemGroupServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewPrivilegedAccessGroupAssignmentScheduleInstancesItemGroupServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *PrivilegedAccessGroupAssignmentScheduleInstancesItemGroupServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *PrivilegedAccessGroupAssignmentScheduleInstancesItemGroupServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *PrivilegedAccessGroupAssignmentScheduleInstancesItemGroupServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *PrivilegedAccessGroupAssignmentScheduleInstancesItemGroupServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *PrivilegedAccessGroupAssignmentScheduleInstancesItemGroupServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*PrivilegedAccessGroupAssignmentScheduleInstancesItemGroupServiceProvisioningErrorsCountRequestBuilder) { + return NewPrivilegedAccessGroupAssignmentScheduleInstancesItemGroupServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/privileged_access_group_assignment_schedule_instances_item_group_service_provisioning_errors_request_builder.go b/identitygovernance/privileged_access_group_assignment_schedule_instances_item_group_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..f5b0a36490c --- /dev/null +++ b/identitygovernance/privileged_access_group_assignment_schedule_instances_item_group_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// PrivilegedAccessGroupAssignmentScheduleInstancesItemGroupServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \identityGovernance\privilegedAccess\group\assignmentScheduleInstances\{privilegedAccessGroupAssignmentScheduleInstance-id}\group\serviceProvisioningErrors +type PrivilegedAccessGroupAssignmentScheduleInstancesItemGroupServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// PrivilegedAccessGroupAssignmentScheduleInstancesItemGroupServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +type PrivilegedAccessGroupAssignmentScheduleInstancesItemGroupServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// PrivilegedAccessGroupAssignmentScheduleInstancesItemGroupServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type PrivilegedAccessGroupAssignmentScheduleInstancesItemGroupServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *PrivilegedAccessGroupAssignmentScheduleInstancesItemGroupServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewPrivilegedAccessGroupAssignmentScheduleInstancesItemGroupServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewPrivilegedAccessGroupAssignmentScheduleInstancesItemGroupServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PrivilegedAccessGroupAssignmentScheduleInstancesItemGroupServiceProvisioningErrorsRequestBuilder) { + m := &PrivilegedAccessGroupAssignmentScheduleInstancesItemGroupServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentScheduleInstances/{privilegedAccessGroupAssignmentScheduleInstance%2Did}/group/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewPrivilegedAccessGroupAssignmentScheduleInstancesItemGroupServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewPrivilegedAccessGroupAssignmentScheduleInstancesItemGroupServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PrivilegedAccessGroupAssignmentScheduleInstancesItemGroupServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewPrivilegedAccessGroupAssignmentScheduleInstancesItemGroupServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *PrivilegedAccessGroupAssignmentScheduleInstancesItemGroupServiceProvisioningErrorsRequestBuilder) Count()(*PrivilegedAccessGroupAssignmentScheduleInstancesItemGroupServiceProvisioningErrorsCountRequestBuilder) { + return NewPrivilegedAccessGroupAssignmentScheduleInstancesItemGroupServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *PrivilegedAccessGroupAssignmentScheduleInstancesItemGroupServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *PrivilegedAccessGroupAssignmentScheduleInstancesItemGroupServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *PrivilegedAccessGroupAssignmentScheduleInstancesItemGroupServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *PrivilegedAccessGroupAssignmentScheduleInstancesItemGroupServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *PrivilegedAccessGroupAssignmentScheduleInstancesItemGroupServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*PrivilegedAccessGroupAssignmentScheduleInstancesItemGroupServiceProvisioningErrorsRequestBuilder) { + return NewPrivilegedAccessGroupAssignmentScheduleInstancesItemGroupServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/privileged_access_group_assignment_schedule_requests_item_group_request_builder.go b/identitygovernance/privileged_access_group_assignment_schedule_requests_item_group_request_builder.go index 448387a7977..a0d880cd0d9 100644 --- a/identitygovernance/privileged_access_group_assignment_schedule_requests_item_group_request_builder.go +++ b/identitygovernance/privileged_access_group_assignment_schedule_requests_item_group_request_builder.go @@ -59,6 +59,10 @@ func (m *PrivilegedAccessGroupAssignmentScheduleRequestsItemGroupRequestBuilder) } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Groupable), nil } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *PrivilegedAccessGroupAssignmentScheduleRequestsItemGroupRequestBuilder) ServiceProvisioningErrors()(*PrivilegedAccessGroupAssignmentScheduleRequestsItemGroupServiceProvisioningErrorsRequestBuilder) { + return NewPrivilegedAccessGroupAssignmentScheduleRequestsItemGroupServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation references the group that is the scope of the membership or ownership assignment request through PIM for groups. Supports $expand. func (m *PrivilegedAccessGroupAssignmentScheduleRequestsItemGroupRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *PrivilegedAccessGroupAssignmentScheduleRequestsItemGroupRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/identitygovernance/privileged_access_group_assignment_schedule_requests_item_group_service_provisioning_errors_count_request_builder.go b/identitygovernance/privileged_access_group_assignment_schedule_requests_item_group_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..b17edfa219b --- /dev/null +++ b/identitygovernance/privileged_access_group_assignment_schedule_requests_item_group_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// PrivilegedAccessGroupAssignmentScheduleRequestsItemGroupServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type PrivilegedAccessGroupAssignmentScheduleRequestsItemGroupServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// PrivilegedAccessGroupAssignmentScheduleRequestsItemGroupServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type PrivilegedAccessGroupAssignmentScheduleRequestsItemGroupServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// PrivilegedAccessGroupAssignmentScheduleRequestsItemGroupServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type PrivilegedAccessGroupAssignmentScheduleRequestsItemGroupServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *PrivilegedAccessGroupAssignmentScheduleRequestsItemGroupServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewPrivilegedAccessGroupAssignmentScheduleRequestsItemGroupServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewPrivilegedAccessGroupAssignmentScheduleRequestsItemGroupServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PrivilegedAccessGroupAssignmentScheduleRequestsItemGroupServiceProvisioningErrorsCountRequestBuilder) { + m := &PrivilegedAccessGroupAssignmentScheduleRequestsItemGroupServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentScheduleRequests/{privilegedAccessGroupAssignmentScheduleRequest%2Did}/group/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewPrivilegedAccessGroupAssignmentScheduleRequestsItemGroupServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewPrivilegedAccessGroupAssignmentScheduleRequestsItemGroupServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PrivilegedAccessGroupAssignmentScheduleRequestsItemGroupServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewPrivilegedAccessGroupAssignmentScheduleRequestsItemGroupServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *PrivilegedAccessGroupAssignmentScheduleRequestsItemGroupServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *PrivilegedAccessGroupAssignmentScheduleRequestsItemGroupServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *PrivilegedAccessGroupAssignmentScheduleRequestsItemGroupServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *PrivilegedAccessGroupAssignmentScheduleRequestsItemGroupServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *PrivilegedAccessGroupAssignmentScheduleRequestsItemGroupServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*PrivilegedAccessGroupAssignmentScheduleRequestsItemGroupServiceProvisioningErrorsCountRequestBuilder) { + return NewPrivilegedAccessGroupAssignmentScheduleRequestsItemGroupServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/privileged_access_group_assignment_schedule_requests_item_group_service_provisioning_errors_request_builder.go b/identitygovernance/privileged_access_group_assignment_schedule_requests_item_group_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..ab87d2ed42c --- /dev/null +++ b/identitygovernance/privileged_access_group_assignment_schedule_requests_item_group_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// PrivilegedAccessGroupAssignmentScheduleRequestsItemGroupServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \identityGovernance\privilegedAccess\group\assignmentScheduleRequests\{privilegedAccessGroupAssignmentScheduleRequest-id}\group\serviceProvisioningErrors +type PrivilegedAccessGroupAssignmentScheduleRequestsItemGroupServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// PrivilegedAccessGroupAssignmentScheduleRequestsItemGroupServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +type PrivilegedAccessGroupAssignmentScheduleRequestsItemGroupServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// PrivilegedAccessGroupAssignmentScheduleRequestsItemGroupServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type PrivilegedAccessGroupAssignmentScheduleRequestsItemGroupServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *PrivilegedAccessGroupAssignmentScheduleRequestsItemGroupServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewPrivilegedAccessGroupAssignmentScheduleRequestsItemGroupServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewPrivilegedAccessGroupAssignmentScheduleRequestsItemGroupServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PrivilegedAccessGroupAssignmentScheduleRequestsItemGroupServiceProvisioningErrorsRequestBuilder) { + m := &PrivilegedAccessGroupAssignmentScheduleRequestsItemGroupServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentScheduleRequests/{privilegedAccessGroupAssignmentScheduleRequest%2Did}/group/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewPrivilegedAccessGroupAssignmentScheduleRequestsItemGroupServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewPrivilegedAccessGroupAssignmentScheduleRequestsItemGroupServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PrivilegedAccessGroupAssignmentScheduleRequestsItemGroupServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewPrivilegedAccessGroupAssignmentScheduleRequestsItemGroupServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *PrivilegedAccessGroupAssignmentScheduleRequestsItemGroupServiceProvisioningErrorsRequestBuilder) Count()(*PrivilegedAccessGroupAssignmentScheduleRequestsItemGroupServiceProvisioningErrorsCountRequestBuilder) { + return NewPrivilegedAccessGroupAssignmentScheduleRequestsItemGroupServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *PrivilegedAccessGroupAssignmentScheduleRequestsItemGroupServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *PrivilegedAccessGroupAssignmentScheduleRequestsItemGroupServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *PrivilegedAccessGroupAssignmentScheduleRequestsItemGroupServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *PrivilegedAccessGroupAssignmentScheduleRequestsItemGroupServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *PrivilegedAccessGroupAssignmentScheduleRequestsItemGroupServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*PrivilegedAccessGroupAssignmentScheduleRequestsItemGroupServiceProvisioningErrorsRequestBuilder) { + return NewPrivilegedAccessGroupAssignmentScheduleRequestsItemGroupServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/privileged_access_group_assignment_schedules_item_group_request_builder.go b/identitygovernance/privileged_access_group_assignment_schedules_item_group_request_builder.go index 1c1708e1830..90fe5fad2fc 100644 --- a/identitygovernance/privileged_access_group_assignment_schedules_item_group_request_builder.go +++ b/identitygovernance/privileged_access_group_assignment_schedules_item_group_request_builder.go @@ -59,6 +59,10 @@ func (m *PrivilegedAccessGroupAssignmentSchedulesItemGroupRequestBuilder) Get(ct } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Groupable), nil } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *PrivilegedAccessGroupAssignmentSchedulesItemGroupRequestBuilder) ServiceProvisioningErrors()(*PrivilegedAccessGroupAssignmentSchedulesItemGroupServiceProvisioningErrorsRequestBuilder) { + return NewPrivilegedAccessGroupAssignmentSchedulesItemGroupServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation references the group that is the scope of the membership or ownership assignment through PIM for groups. Supports $expand. func (m *PrivilegedAccessGroupAssignmentSchedulesItemGroupRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *PrivilegedAccessGroupAssignmentSchedulesItemGroupRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/identitygovernance/privileged_access_group_assignment_schedules_item_group_service_provisioning_errors_count_request_builder.go b/identitygovernance/privileged_access_group_assignment_schedules_item_group_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..6bd3dc0e067 --- /dev/null +++ b/identitygovernance/privileged_access_group_assignment_schedules_item_group_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// PrivilegedAccessGroupAssignmentSchedulesItemGroupServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type PrivilegedAccessGroupAssignmentSchedulesItemGroupServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// PrivilegedAccessGroupAssignmentSchedulesItemGroupServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type PrivilegedAccessGroupAssignmentSchedulesItemGroupServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// PrivilegedAccessGroupAssignmentSchedulesItemGroupServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type PrivilegedAccessGroupAssignmentSchedulesItemGroupServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *PrivilegedAccessGroupAssignmentSchedulesItemGroupServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewPrivilegedAccessGroupAssignmentSchedulesItemGroupServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewPrivilegedAccessGroupAssignmentSchedulesItemGroupServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PrivilegedAccessGroupAssignmentSchedulesItemGroupServiceProvisioningErrorsCountRequestBuilder) { + m := &PrivilegedAccessGroupAssignmentSchedulesItemGroupServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentSchedules/{privilegedAccessGroupAssignmentSchedule%2Did}/group/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewPrivilegedAccessGroupAssignmentSchedulesItemGroupServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewPrivilegedAccessGroupAssignmentSchedulesItemGroupServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PrivilegedAccessGroupAssignmentSchedulesItemGroupServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewPrivilegedAccessGroupAssignmentSchedulesItemGroupServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *PrivilegedAccessGroupAssignmentSchedulesItemGroupServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *PrivilegedAccessGroupAssignmentSchedulesItemGroupServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *PrivilegedAccessGroupAssignmentSchedulesItemGroupServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *PrivilegedAccessGroupAssignmentSchedulesItemGroupServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *PrivilegedAccessGroupAssignmentSchedulesItemGroupServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*PrivilegedAccessGroupAssignmentSchedulesItemGroupServiceProvisioningErrorsCountRequestBuilder) { + return NewPrivilegedAccessGroupAssignmentSchedulesItemGroupServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/privileged_access_group_assignment_schedules_item_group_service_provisioning_errors_request_builder.go b/identitygovernance/privileged_access_group_assignment_schedules_item_group_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..9a590d07a55 --- /dev/null +++ b/identitygovernance/privileged_access_group_assignment_schedules_item_group_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// PrivilegedAccessGroupAssignmentSchedulesItemGroupServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \identityGovernance\privilegedAccess\group\assignmentSchedules\{privilegedAccessGroupAssignmentSchedule-id}\group\serviceProvisioningErrors +type PrivilegedAccessGroupAssignmentSchedulesItemGroupServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// PrivilegedAccessGroupAssignmentSchedulesItemGroupServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +type PrivilegedAccessGroupAssignmentSchedulesItemGroupServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// PrivilegedAccessGroupAssignmentSchedulesItemGroupServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type PrivilegedAccessGroupAssignmentSchedulesItemGroupServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *PrivilegedAccessGroupAssignmentSchedulesItemGroupServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewPrivilegedAccessGroupAssignmentSchedulesItemGroupServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewPrivilegedAccessGroupAssignmentSchedulesItemGroupServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PrivilegedAccessGroupAssignmentSchedulesItemGroupServiceProvisioningErrorsRequestBuilder) { + m := &PrivilegedAccessGroupAssignmentSchedulesItemGroupServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/assignmentSchedules/{privilegedAccessGroupAssignmentSchedule%2Did}/group/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewPrivilegedAccessGroupAssignmentSchedulesItemGroupServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewPrivilegedAccessGroupAssignmentSchedulesItemGroupServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PrivilegedAccessGroupAssignmentSchedulesItemGroupServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewPrivilegedAccessGroupAssignmentSchedulesItemGroupServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *PrivilegedAccessGroupAssignmentSchedulesItemGroupServiceProvisioningErrorsRequestBuilder) Count()(*PrivilegedAccessGroupAssignmentSchedulesItemGroupServiceProvisioningErrorsCountRequestBuilder) { + return NewPrivilegedAccessGroupAssignmentSchedulesItemGroupServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *PrivilegedAccessGroupAssignmentSchedulesItemGroupServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *PrivilegedAccessGroupAssignmentSchedulesItemGroupServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *PrivilegedAccessGroupAssignmentSchedulesItemGroupServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *PrivilegedAccessGroupAssignmentSchedulesItemGroupServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *PrivilegedAccessGroupAssignmentSchedulesItemGroupServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*PrivilegedAccessGroupAssignmentSchedulesItemGroupServiceProvisioningErrorsRequestBuilder) { + return NewPrivilegedAccessGroupAssignmentSchedulesItemGroupServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/privileged_access_group_eligibility_schedule_instances_item_group_request_builder.go b/identitygovernance/privileged_access_group_eligibility_schedule_instances_item_group_request_builder.go index bf427d20a75..b13f7183778 100644 --- a/identitygovernance/privileged_access_group_eligibility_schedule_instances_item_group_request_builder.go +++ b/identitygovernance/privileged_access_group_eligibility_schedule_instances_item_group_request_builder.go @@ -59,6 +59,10 @@ func (m *PrivilegedAccessGroupEligibilityScheduleInstancesItemGroupRequestBuilde } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Groupable), nil } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *PrivilegedAccessGroupEligibilityScheduleInstancesItemGroupRequestBuilder) ServiceProvisioningErrors()(*PrivilegedAccessGroupEligibilityScheduleInstancesItemGroupServiceProvisioningErrorsRequestBuilder) { + return NewPrivilegedAccessGroupEligibilityScheduleInstancesItemGroupServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation references the group that is the scope of the membership or ownership eligibility through PIM for groups. Supports $expand. func (m *PrivilegedAccessGroupEligibilityScheduleInstancesItemGroupRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *PrivilegedAccessGroupEligibilityScheduleInstancesItemGroupRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/identitygovernance/privileged_access_group_eligibility_schedule_instances_item_group_service_provisioning_errors_count_request_builder.go b/identitygovernance/privileged_access_group_eligibility_schedule_instances_item_group_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..a515e7838e1 --- /dev/null +++ b/identitygovernance/privileged_access_group_eligibility_schedule_instances_item_group_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// PrivilegedAccessGroupEligibilityScheduleInstancesItemGroupServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type PrivilegedAccessGroupEligibilityScheduleInstancesItemGroupServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// PrivilegedAccessGroupEligibilityScheduleInstancesItemGroupServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type PrivilegedAccessGroupEligibilityScheduleInstancesItemGroupServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// PrivilegedAccessGroupEligibilityScheduleInstancesItemGroupServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type PrivilegedAccessGroupEligibilityScheduleInstancesItemGroupServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *PrivilegedAccessGroupEligibilityScheduleInstancesItemGroupServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewPrivilegedAccessGroupEligibilityScheduleInstancesItemGroupServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewPrivilegedAccessGroupEligibilityScheduleInstancesItemGroupServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PrivilegedAccessGroupEligibilityScheduleInstancesItemGroupServiceProvisioningErrorsCountRequestBuilder) { + m := &PrivilegedAccessGroupEligibilityScheduleInstancesItemGroupServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilityScheduleInstances/{privilegedAccessGroupEligibilityScheduleInstance%2Did}/group/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewPrivilegedAccessGroupEligibilityScheduleInstancesItemGroupServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewPrivilegedAccessGroupEligibilityScheduleInstancesItemGroupServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PrivilegedAccessGroupEligibilityScheduleInstancesItemGroupServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewPrivilegedAccessGroupEligibilityScheduleInstancesItemGroupServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *PrivilegedAccessGroupEligibilityScheduleInstancesItemGroupServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *PrivilegedAccessGroupEligibilityScheduleInstancesItemGroupServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *PrivilegedAccessGroupEligibilityScheduleInstancesItemGroupServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *PrivilegedAccessGroupEligibilityScheduleInstancesItemGroupServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *PrivilegedAccessGroupEligibilityScheduleInstancesItemGroupServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*PrivilegedAccessGroupEligibilityScheduleInstancesItemGroupServiceProvisioningErrorsCountRequestBuilder) { + return NewPrivilegedAccessGroupEligibilityScheduleInstancesItemGroupServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/privileged_access_group_eligibility_schedule_instances_item_group_service_provisioning_errors_request_builder.go b/identitygovernance/privileged_access_group_eligibility_schedule_instances_item_group_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..424c2d07f28 --- /dev/null +++ b/identitygovernance/privileged_access_group_eligibility_schedule_instances_item_group_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// PrivilegedAccessGroupEligibilityScheduleInstancesItemGroupServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \identityGovernance\privilegedAccess\group\eligibilityScheduleInstances\{privilegedAccessGroupEligibilityScheduleInstance-id}\group\serviceProvisioningErrors +type PrivilegedAccessGroupEligibilityScheduleInstancesItemGroupServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// PrivilegedAccessGroupEligibilityScheduleInstancesItemGroupServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +type PrivilegedAccessGroupEligibilityScheduleInstancesItemGroupServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// PrivilegedAccessGroupEligibilityScheduleInstancesItemGroupServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type PrivilegedAccessGroupEligibilityScheduleInstancesItemGroupServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *PrivilegedAccessGroupEligibilityScheduleInstancesItemGroupServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewPrivilegedAccessGroupEligibilityScheduleInstancesItemGroupServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewPrivilegedAccessGroupEligibilityScheduleInstancesItemGroupServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PrivilegedAccessGroupEligibilityScheduleInstancesItemGroupServiceProvisioningErrorsRequestBuilder) { + m := &PrivilegedAccessGroupEligibilityScheduleInstancesItemGroupServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilityScheduleInstances/{privilegedAccessGroupEligibilityScheduleInstance%2Did}/group/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewPrivilegedAccessGroupEligibilityScheduleInstancesItemGroupServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewPrivilegedAccessGroupEligibilityScheduleInstancesItemGroupServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PrivilegedAccessGroupEligibilityScheduleInstancesItemGroupServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewPrivilegedAccessGroupEligibilityScheduleInstancesItemGroupServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *PrivilegedAccessGroupEligibilityScheduleInstancesItemGroupServiceProvisioningErrorsRequestBuilder) Count()(*PrivilegedAccessGroupEligibilityScheduleInstancesItemGroupServiceProvisioningErrorsCountRequestBuilder) { + return NewPrivilegedAccessGroupEligibilityScheduleInstancesItemGroupServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *PrivilegedAccessGroupEligibilityScheduleInstancesItemGroupServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *PrivilegedAccessGroupEligibilityScheduleInstancesItemGroupServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *PrivilegedAccessGroupEligibilityScheduleInstancesItemGroupServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *PrivilegedAccessGroupEligibilityScheduleInstancesItemGroupServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *PrivilegedAccessGroupEligibilityScheduleInstancesItemGroupServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*PrivilegedAccessGroupEligibilityScheduleInstancesItemGroupServiceProvisioningErrorsRequestBuilder) { + return NewPrivilegedAccessGroupEligibilityScheduleInstancesItemGroupServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/privileged_access_group_eligibility_schedule_requests_item_group_request_builder.go b/identitygovernance/privileged_access_group_eligibility_schedule_requests_item_group_request_builder.go index 9aa2b5f3a09..91f306f7fa3 100644 --- a/identitygovernance/privileged_access_group_eligibility_schedule_requests_item_group_request_builder.go +++ b/identitygovernance/privileged_access_group_eligibility_schedule_requests_item_group_request_builder.go @@ -59,6 +59,10 @@ func (m *PrivilegedAccessGroupEligibilityScheduleRequestsItemGroupRequestBuilder } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Groupable), nil } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *PrivilegedAccessGroupEligibilityScheduleRequestsItemGroupRequestBuilder) ServiceProvisioningErrors()(*PrivilegedAccessGroupEligibilityScheduleRequestsItemGroupServiceProvisioningErrorsRequestBuilder) { + return NewPrivilegedAccessGroupEligibilityScheduleRequestsItemGroupServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation references the group that is the scope of the membership or ownership eligibility request through PIM for groups. Supports $expand. func (m *PrivilegedAccessGroupEligibilityScheduleRequestsItemGroupRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *PrivilegedAccessGroupEligibilityScheduleRequestsItemGroupRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/identitygovernance/privileged_access_group_eligibility_schedule_requests_item_group_service_provisioning_errors_count_request_builder.go b/identitygovernance/privileged_access_group_eligibility_schedule_requests_item_group_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..e2ab90b70f5 --- /dev/null +++ b/identitygovernance/privileged_access_group_eligibility_schedule_requests_item_group_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// PrivilegedAccessGroupEligibilityScheduleRequestsItemGroupServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type PrivilegedAccessGroupEligibilityScheduleRequestsItemGroupServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// PrivilegedAccessGroupEligibilityScheduleRequestsItemGroupServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type PrivilegedAccessGroupEligibilityScheduleRequestsItemGroupServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// PrivilegedAccessGroupEligibilityScheduleRequestsItemGroupServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type PrivilegedAccessGroupEligibilityScheduleRequestsItemGroupServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *PrivilegedAccessGroupEligibilityScheduleRequestsItemGroupServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewPrivilegedAccessGroupEligibilityScheduleRequestsItemGroupServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewPrivilegedAccessGroupEligibilityScheduleRequestsItemGroupServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PrivilegedAccessGroupEligibilityScheduleRequestsItemGroupServiceProvisioningErrorsCountRequestBuilder) { + m := &PrivilegedAccessGroupEligibilityScheduleRequestsItemGroupServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilityScheduleRequests/{privilegedAccessGroupEligibilityScheduleRequest%2Did}/group/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewPrivilegedAccessGroupEligibilityScheduleRequestsItemGroupServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewPrivilegedAccessGroupEligibilityScheduleRequestsItemGroupServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PrivilegedAccessGroupEligibilityScheduleRequestsItemGroupServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewPrivilegedAccessGroupEligibilityScheduleRequestsItemGroupServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *PrivilegedAccessGroupEligibilityScheduleRequestsItemGroupServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *PrivilegedAccessGroupEligibilityScheduleRequestsItemGroupServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *PrivilegedAccessGroupEligibilityScheduleRequestsItemGroupServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *PrivilegedAccessGroupEligibilityScheduleRequestsItemGroupServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *PrivilegedAccessGroupEligibilityScheduleRequestsItemGroupServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*PrivilegedAccessGroupEligibilityScheduleRequestsItemGroupServiceProvisioningErrorsCountRequestBuilder) { + return NewPrivilegedAccessGroupEligibilityScheduleRequestsItemGroupServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/privileged_access_group_eligibility_schedule_requests_item_group_service_provisioning_errors_request_builder.go b/identitygovernance/privileged_access_group_eligibility_schedule_requests_item_group_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..122e3fba04d --- /dev/null +++ b/identitygovernance/privileged_access_group_eligibility_schedule_requests_item_group_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// PrivilegedAccessGroupEligibilityScheduleRequestsItemGroupServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \identityGovernance\privilegedAccess\group\eligibilityScheduleRequests\{privilegedAccessGroupEligibilityScheduleRequest-id}\group\serviceProvisioningErrors +type PrivilegedAccessGroupEligibilityScheduleRequestsItemGroupServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// PrivilegedAccessGroupEligibilityScheduleRequestsItemGroupServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +type PrivilegedAccessGroupEligibilityScheduleRequestsItemGroupServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// PrivilegedAccessGroupEligibilityScheduleRequestsItemGroupServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type PrivilegedAccessGroupEligibilityScheduleRequestsItemGroupServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *PrivilegedAccessGroupEligibilityScheduleRequestsItemGroupServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewPrivilegedAccessGroupEligibilityScheduleRequestsItemGroupServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewPrivilegedAccessGroupEligibilityScheduleRequestsItemGroupServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PrivilegedAccessGroupEligibilityScheduleRequestsItemGroupServiceProvisioningErrorsRequestBuilder) { + m := &PrivilegedAccessGroupEligibilityScheduleRequestsItemGroupServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilityScheduleRequests/{privilegedAccessGroupEligibilityScheduleRequest%2Did}/group/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewPrivilegedAccessGroupEligibilityScheduleRequestsItemGroupServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewPrivilegedAccessGroupEligibilityScheduleRequestsItemGroupServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PrivilegedAccessGroupEligibilityScheduleRequestsItemGroupServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewPrivilegedAccessGroupEligibilityScheduleRequestsItemGroupServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *PrivilegedAccessGroupEligibilityScheduleRequestsItemGroupServiceProvisioningErrorsRequestBuilder) Count()(*PrivilegedAccessGroupEligibilityScheduleRequestsItemGroupServiceProvisioningErrorsCountRequestBuilder) { + return NewPrivilegedAccessGroupEligibilityScheduleRequestsItemGroupServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *PrivilegedAccessGroupEligibilityScheduleRequestsItemGroupServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *PrivilegedAccessGroupEligibilityScheduleRequestsItemGroupServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *PrivilegedAccessGroupEligibilityScheduleRequestsItemGroupServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *PrivilegedAccessGroupEligibilityScheduleRequestsItemGroupServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *PrivilegedAccessGroupEligibilityScheduleRequestsItemGroupServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*PrivilegedAccessGroupEligibilityScheduleRequestsItemGroupServiceProvisioningErrorsRequestBuilder) { + return NewPrivilegedAccessGroupEligibilityScheduleRequestsItemGroupServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/privileged_access_group_eligibility_schedules_item_group_request_builder.go b/identitygovernance/privileged_access_group_eligibility_schedules_item_group_request_builder.go index 90d3d6af884..ef9b5575507 100644 --- a/identitygovernance/privileged_access_group_eligibility_schedules_item_group_request_builder.go +++ b/identitygovernance/privileged_access_group_eligibility_schedules_item_group_request_builder.go @@ -59,6 +59,10 @@ func (m *PrivilegedAccessGroupEligibilitySchedulesItemGroupRequestBuilder) Get(c } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Groupable), nil } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *PrivilegedAccessGroupEligibilitySchedulesItemGroupRequestBuilder) ServiceProvisioningErrors()(*PrivilegedAccessGroupEligibilitySchedulesItemGroupServiceProvisioningErrorsRequestBuilder) { + return NewPrivilegedAccessGroupEligibilitySchedulesItemGroupServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation references the group that is the scope of the membership or ownership eligibility through PIM for groups. Supports $expand. func (m *PrivilegedAccessGroupEligibilitySchedulesItemGroupRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *PrivilegedAccessGroupEligibilitySchedulesItemGroupRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/identitygovernance/privileged_access_group_eligibility_schedules_item_group_service_provisioning_errors_count_request_builder.go b/identitygovernance/privileged_access_group_eligibility_schedules_item_group_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..6e9ad8c84b6 --- /dev/null +++ b/identitygovernance/privileged_access_group_eligibility_schedules_item_group_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// PrivilegedAccessGroupEligibilitySchedulesItemGroupServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type PrivilegedAccessGroupEligibilitySchedulesItemGroupServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// PrivilegedAccessGroupEligibilitySchedulesItemGroupServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type PrivilegedAccessGroupEligibilitySchedulesItemGroupServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// PrivilegedAccessGroupEligibilitySchedulesItemGroupServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type PrivilegedAccessGroupEligibilitySchedulesItemGroupServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *PrivilegedAccessGroupEligibilitySchedulesItemGroupServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewPrivilegedAccessGroupEligibilitySchedulesItemGroupServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewPrivilegedAccessGroupEligibilitySchedulesItemGroupServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PrivilegedAccessGroupEligibilitySchedulesItemGroupServiceProvisioningErrorsCountRequestBuilder) { + m := &PrivilegedAccessGroupEligibilitySchedulesItemGroupServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilitySchedules/{privilegedAccessGroupEligibilitySchedule%2Did}/group/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewPrivilegedAccessGroupEligibilitySchedulesItemGroupServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewPrivilegedAccessGroupEligibilitySchedulesItemGroupServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PrivilegedAccessGroupEligibilitySchedulesItemGroupServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewPrivilegedAccessGroupEligibilitySchedulesItemGroupServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *PrivilegedAccessGroupEligibilitySchedulesItemGroupServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *PrivilegedAccessGroupEligibilitySchedulesItemGroupServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *PrivilegedAccessGroupEligibilitySchedulesItemGroupServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *PrivilegedAccessGroupEligibilitySchedulesItemGroupServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *PrivilegedAccessGroupEligibilitySchedulesItemGroupServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*PrivilegedAccessGroupEligibilitySchedulesItemGroupServiceProvisioningErrorsCountRequestBuilder) { + return NewPrivilegedAccessGroupEligibilitySchedulesItemGroupServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identitygovernance/privileged_access_group_eligibility_schedules_item_group_service_provisioning_errors_request_builder.go b/identitygovernance/privileged_access_group_eligibility_schedules_item_group_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..242918f758d --- /dev/null +++ b/identitygovernance/privileged_access_group_eligibility_schedules_item_group_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package identitygovernance + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// PrivilegedAccessGroupEligibilitySchedulesItemGroupServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \identityGovernance\privilegedAccess\group\eligibilitySchedules\{privilegedAccessGroupEligibilitySchedule-id}\group\serviceProvisioningErrors +type PrivilegedAccessGroupEligibilitySchedulesItemGroupServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// PrivilegedAccessGroupEligibilitySchedulesItemGroupServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +type PrivilegedAccessGroupEligibilitySchedulesItemGroupServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// PrivilegedAccessGroupEligibilitySchedulesItemGroupServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type PrivilegedAccessGroupEligibilitySchedulesItemGroupServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *PrivilegedAccessGroupEligibilitySchedulesItemGroupServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewPrivilegedAccessGroupEligibilitySchedulesItemGroupServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewPrivilegedAccessGroupEligibilitySchedulesItemGroupServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PrivilegedAccessGroupEligibilitySchedulesItemGroupServiceProvisioningErrorsRequestBuilder) { + m := &PrivilegedAccessGroupEligibilitySchedulesItemGroupServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identityGovernance/privilegedAccess/group/eligibilitySchedules/{privilegedAccessGroupEligibilitySchedule%2Did}/group/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewPrivilegedAccessGroupEligibilitySchedulesItemGroupServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewPrivilegedAccessGroupEligibilitySchedulesItemGroupServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PrivilegedAccessGroupEligibilitySchedulesItemGroupServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewPrivilegedAccessGroupEligibilitySchedulesItemGroupServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *PrivilegedAccessGroupEligibilitySchedulesItemGroupServiceProvisioningErrorsRequestBuilder) Count()(*PrivilegedAccessGroupEligibilitySchedulesItemGroupServiceProvisioningErrorsCountRequestBuilder) { + return NewPrivilegedAccessGroupEligibilitySchedulesItemGroupServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *PrivilegedAccessGroupEligibilitySchedulesItemGroupServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *PrivilegedAccessGroupEligibilitySchedulesItemGroupServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *PrivilegedAccessGroupEligibilitySchedulesItemGroupServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *PrivilegedAccessGroupEligibilitySchedulesItemGroupServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *PrivilegedAccessGroupEligibilitySchedulesItemGroupServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*PrivilegedAccessGroupEligibilitySchedulesItemGroupServiceProvisioningErrorsRequestBuilder) { + return NewPrivilegedAccessGroupEligibilitySchedulesItemGroupServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identityprotection/risk_detections_risk_detection_item_request_builder.go b/identityprotection/risk_detections_risk_detection_item_request_builder.go index 4baa2186572..89bb00b4ee0 100644 --- a/identityprotection/risk_detections_risk_detection_item_request_builder.go +++ b/identityprotection/risk_detections_risk_detection_item_request_builder.go @@ -18,7 +18,7 @@ type RiskDetectionsRiskDetectionItemRequestBuilderDeleteRequestConfiguration str // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// RiskDetectionsRiskDetectionItemRequestBuilderGetQueryParameters retrieve the properties of a riskDetection object. +// RiskDetectionsRiskDetectionItemRequestBuilderGetQueryParameters retrieve the properties of a collection of riskDetection objects. type RiskDetectionsRiskDetectionItemRequestBuilderGetQueryParameters struct { // Expand related entities Expand []string `uriparametername:"%24expand"` @@ -70,10 +70,10 @@ func (m *RiskDetectionsRiskDetectionItemRequestBuilder) Delete(ctx context.Conte } return nil } -// Get retrieve the properties of a riskDetection object. +// Get retrieve the properties of a collection of riskDetection objects. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/riskdetection-get?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/riskdetection-list?view=graph-rest-1.0 func (m *RiskDetectionsRiskDetectionItemRequestBuilder) Get(ctx context.Context, requestConfiguration *RiskDetectionsRiskDetectionItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.RiskDetectionable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -123,7 +123,7 @@ func (m *RiskDetectionsRiskDetectionItemRequestBuilder) ToDeleteRequestInformati } return requestInfo, nil } -// ToGetRequestInformation retrieve the properties of a riskDetection object. +// ToGetRequestInformation retrieve the properties of a collection of riskDetection objects. func (m *RiskDetectionsRiskDetectionItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *RiskDetectionsRiskDetectionItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/invitations/item_invited_user_request_builder.go b/invitations/item_invited_user_request_builder.go index 832e9ec51ea..9f4ac7dac8b 100644 --- a/invitations/item_invited_user_request_builder.go +++ b/invitations/item_invited_user_request_builder.go @@ -63,6 +63,10 @@ func (m *ItemInvitedUserRequestBuilder) Get(ctx context.Context, requestConfigur func (m *ItemInvitedUserRequestBuilder) MailboxSettings()(*ItemInvitedUserMailboxSettingsRequestBuilder) { return NewItemInvitedUserMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *ItemInvitedUserRequestBuilder) ServiceProvisioningErrors()(*ItemInvitedUserServiceProvisioningErrorsRequestBuilder) { + return NewItemInvitedUserServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation the user created as part of the invitation creation. Read-Only func (m *ItemInvitedUserRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemInvitedUserRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/invitations/item_invited_user_service_provisioning_errors_count_request_builder.go b/invitations/item_invited_user_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..62ffcf0326e --- /dev/null +++ b/invitations/item_invited_user_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package invitations + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemInvitedUserServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type ItemInvitedUserServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemInvitedUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type ItemInvitedUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// ItemInvitedUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemInvitedUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemInvitedUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewItemInvitedUserServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewItemInvitedUserServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInvitedUserServiceProvisioningErrorsCountRequestBuilder) { + m := &ItemInvitedUserServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/invitations/{invitation%2Did}/invitedUser/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewItemInvitedUserServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewItemInvitedUserServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInvitedUserServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemInvitedUserServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *ItemInvitedUserServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemInvitedUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *ItemInvitedUserServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemInvitedUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemInvitedUserServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*ItemInvitedUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemInvitedUserServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/invitations/item_invited_user_service_provisioning_errors_request_builder.go b/invitations/item_invited_user_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..4da4495aa33 --- /dev/null +++ b/invitations/item_invited_user_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package invitations + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemInvitedUserServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \invitations\{invitation-id}\invitedUser\serviceProvisioningErrors +type ItemInvitedUserServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemInvitedUserServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type ItemInvitedUserServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// ItemInvitedUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemInvitedUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemInvitedUserServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewItemInvitedUserServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemInvitedUserServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInvitedUserServiceProvisioningErrorsRequestBuilder) { + m := &ItemInvitedUserServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/invitations/{invitation%2Did}/invitedUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewItemInvitedUserServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemInvitedUserServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInvitedUserServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemInvitedUserServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *ItemInvitedUserServiceProvisioningErrorsRequestBuilder) Count()(*ItemInvitedUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemInvitedUserServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemInvitedUserServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemInvitedUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemInvitedUserServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemInvitedUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemInvitedUserServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*ItemInvitedUserServiceProvisioningErrorsRequestBuilder) { + return NewItemInvitedUserServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/kiota-lock.json b/kiota-lock.json index 68b12242d57..72ba5675e07 100644 --- a/kiota-lock.json +++ b/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "3AB047A45EAFF0F48CC735C34A1A395E24AF79DF09703A36B05C5031A2B89DE512244FA7CB13DDA62BC42653D24470CBCEAF47F05763B42254D0CA2B20F6663B", + "descriptionHash": "2940B4D400424577E7DC70414393C026ABC43D2D8E5CE41E3660211D116EBF089D456A2C0CD1AD2C84137EDF3714D2522649B57034B17C75B6805B77E3B7FBDC", "descriptionLocation": "/mnt/vss/_work/1/s/msgraph-metadata/clean_beta_openapi/openapi.yaml", "lockFileVersion": "1.0.0", "kiotaVersion": "1.7.0", diff --git a/mobilitymanagementpolicies/item_included_groups_group_item_request_builder.go b/mobilitymanagementpolicies/item_included_groups_group_item_request_builder.go index e7bb434632b..1599bd4838f 100644 --- a/mobilitymanagementpolicies/item_included_groups_group_item_request_builder.go +++ b/mobilitymanagementpolicies/item_included_groups_group_item_request_builder.go @@ -25,3 +25,7 @@ func NewItemIncludedGroupsGroupItemRequestBuilder(rawUrl string, requestAdapter func (m *ItemIncludedGroupsGroupItemRequestBuilder) Ref()(*ItemIncludedGroupsItemRefRequestBuilder) { return NewItemIncludedGroupsItemRefRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *ItemIncludedGroupsGroupItemRequestBuilder) ServiceProvisioningErrors()(*ItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilder) { + return NewItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/mobilitymanagementpolicies/item_included_groups_item_service_provisioning_errors_count_request_builder.go b/mobilitymanagementpolicies/item_included_groups_item_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..e17c7cae217 --- /dev/null +++ b/mobilitymanagementpolicies/item_included_groups_item_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package mobilitymanagementpolicies + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type ItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type ItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// ItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilder) { + m := &ItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/mobilityManagementPolicies/{mobilityManagementPolicy%2Did}/includedGroups/{group%2Did}/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *ItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *ItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*ItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilder) { + return NewItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/mobilitymanagementpolicies/item_included_groups_item_service_provisioning_errors_request_builder.go b/mobilitymanagementpolicies/item_included_groups_item_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..2deee110d5c --- /dev/null +++ b/mobilitymanagementpolicies/item_included_groups_item_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package mobilitymanagementpolicies + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \mobilityManagementPolicies\{mobilityManagementPolicy-id}\includedGroups\{group-id}\serviceProvisioningErrors +type ItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +type ItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// ItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilder) { + m := &ItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/mobilityManagementPolicies/{mobilityManagementPolicy%2Did}/includedGroups/{group%2Did}/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *ItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilder) Count()(*ItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilder) { + return NewItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*ItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilder) { + return NewItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/models/access_review_schedule_definition.go b/models/access_review_schedule_definition.go index 6ea0a31f39e..57188494686 100644 --- a/models/access_review_schedule_definition.go +++ b/models/access_review_schedule_definition.go @@ -75,7 +75,7 @@ func (m *AccessReviewScheduleDefinition) GetDescriptionForAdmins()(*string) { } return nil } -// GetDescriptionForReviewers gets the descriptionForReviewers property value. 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. +// GetDescriptionForReviewers gets the descriptionForReviewers property value. 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. func (m *AccessReviewScheduleDefinition) GetDescriptionForReviewers()(*string) { val, err := m.GetBackingStore().Get("descriptionForReviewers") if err != nil { @@ -97,7 +97,7 @@ func (m *AccessReviewScheduleDefinition) GetDisplayName()(*string) { } return nil } -// GetFallbackReviewers gets the fallbackReviewers property value. 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. +// GetFallbackReviewers gets the fallbackReviewers property value. 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 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. func (m *AccessReviewScheduleDefinition) GetFallbackReviewers()([]AccessReviewReviewerScopeable) { val, err := m.GetBackingStore().Get("fallbackReviewers") if err != nil { @@ -309,7 +309,7 @@ func (m *AccessReviewScheduleDefinition) GetFieldDeserializers()(map[string]func } return res } -// GetInstanceEnumerationScope gets the instanceEnumerationScope property value. 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. +// GetInstanceEnumerationScope gets the instanceEnumerationScope property value. 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. func (m *AccessReviewScheduleDefinition) GetInstanceEnumerationScope()(AccessReviewScopeable) { val, err := m.GetBackingStore().Get("instanceEnumerationScope") if err != nil { @@ -320,7 +320,7 @@ func (m *AccessReviewScheduleDefinition) GetInstanceEnumerationScope()(AccessRev } return nil } -// GetInstances gets the instances property value. Set of access reviews instances for this access review series. Access reviews that do not recur will only have one instance; otherwise, there is an instance for each recurrence. +// GetInstances gets the instances property value. Set of access reviews instances for this access review series. Access reviews that don't recur will only have one instance; otherwise, there's an instance for each recurrence. func (m *AccessReviewScheduleDefinition) GetInstances()([]AccessReviewInstanceable) { val, err := m.GetBackingStore().Get("instances") if err != nil { @@ -375,7 +375,7 @@ func (m *AccessReviewScheduleDefinition) GetSettings()(AccessReviewScheduleSetti } return nil } -// GetStageSettings gets the stageSettings property value. 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. +// GetStageSettings gets the stageSettings property value. 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. func (m *AccessReviewScheduleDefinition) GetStageSettings()([]AccessReviewStageSettingsable) { val, err := m.GetBackingStore().Get("stageSettings") if err != nil { @@ -572,7 +572,7 @@ func (m *AccessReviewScheduleDefinition) SetDescriptionForAdmins(value *string)( panic(err) } } -// SetDescriptionForReviewers sets the descriptionForReviewers property value. 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. +// SetDescriptionForReviewers sets the descriptionForReviewers property value. 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. func (m *AccessReviewScheduleDefinition) SetDescriptionForReviewers(value *string)() { err := m.GetBackingStore().Set("descriptionForReviewers", value) if err != nil { @@ -586,21 +586,21 @@ func (m *AccessReviewScheduleDefinition) SetDisplayName(value *string)() { panic(err) } } -// SetFallbackReviewers sets the fallbackReviewers property value. 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. +// SetFallbackReviewers sets the fallbackReviewers property value. 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 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. func (m *AccessReviewScheduleDefinition) SetFallbackReviewers(value []AccessReviewReviewerScopeable)() { err := m.GetBackingStore().Set("fallbackReviewers", value) if err != nil { panic(err) } } -// SetInstanceEnumerationScope sets the instanceEnumerationScope property value. 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. +// SetInstanceEnumerationScope sets the instanceEnumerationScope property value. 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. func (m *AccessReviewScheduleDefinition) SetInstanceEnumerationScope(value AccessReviewScopeable)() { err := m.GetBackingStore().Set("instanceEnumerationScope", value) if err != nil { panic(err) } } -// SetInstances sets the instances property value. Set of access reviews instances for this access review series. Access reviews that do not recur will only have one instance; otherwise, there is an instance for each recurrence. +// SetInstances sets the instances property value. Set of access reviews instances for this access review series. Access reviews that don't recur will only have one instance; otherwise, there's an instance for each recurrence. func (m *AccessReviewScheduleDefinition) SetInstances(value []AccessReviewInstanceable)() { err := m.GetBackingStore().Set("instances", value) if err != nil { @@ -635,7 +635,7 @@ func (m *AccessReviewScheduleDefinition) SetSettings(value AccessReviewScheduleS panic(err) } } -// SetStageSettings sets the stageSettings property value. 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. +// SetStageSettings sets the stageSettings property value. 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. func (m *AccessReviewScheduleDefinition) SetStageSettings(value []AccessReviewStageSettingsable)() { err := m.GetBackingStore().Set("stageSettings", value) if err != nil { diff --git a/models/action_step.go b/models/action_step.go index 4585b589d8c..fa7ff163a54 100644 --- a/models/action_step.go +++ b/models/action_step.go @@ -22,7 +22,7 @@ func NewActionStep()(*ActionStep) { func CreateActionStepFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewActionStep(), nil } -// GetActionUrl gets the actionUrl property value. A link to the documentation or Azure portal page that is associated with the action step. +// GetActionUrl gets the actionUrl property value. A link to the documentation or Microsoft Entra admin center page that is associated with the action step. func (m *ActionStep) GetActionUrl()(ActionUrlable) { val, err := m.GetBackingStore().Get("actionUrl") if err != nil { @@ -161,7 +161,7 @@ func (m *ActionStep) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c } return nil } -// SetActionUrl sets the actionUrl property value. A link to the documentation or Azure portal page that is associated with the action step. +// SetActionUrl sets the actionUrl property value. A link to the documentation or Microsoft Entra admin center page that is associated with the action step. func (m *ActionStep) SetActionUrl(value ActionUrlable)() { err := m.GetBackingStore().Set("actionUrl", value) if err != nil { diff --git a/models/action_url.go b/models/action_url.go index efe2a6d73d7..49c3d7fcd37 100644 --- a/models/action_url.go +++ b/models/action_url.go @@ -95,7 +95,7 @@ func (m *ActionUrl) GetOdataType()(*string) { } return nil } -// GetUrl gets the url property value. The URL to the documentation or Azure portal page. +// GetUrl gets the url property value. The URL to the documentation or Microsoft Entra admin center page. func (m *ActionUrl) GetUrl()(*string) { val, err := m.GetBackingStore().Get("url") if err != nil { @@ -159,7 +159,7 @@ func (m *ActionUrl) SetOdataType(value *string)() { panic(err) } } -// SetUrl sets the url property value. The URL to the documentation or Azure portal page. +// SetUrl sets the url property value. The URL to the documentation or Microsoft Entra admin center page. func (m *ActionUrl) SetUrl(value *string)() { err := m.GetBackingStore().Set("url", value) if err != nil { diff --git a/models/admin.go b/models/admin.go index 2446f424a6e..d1d5292d47c 100644 --- a/models/admin.go +++ b/models/admin.go @@ -468,73 +468,3 @@ type Adminable interface { SetTodo(value AdminTodoable)() SetWindows(value AdminWindowsable)() } - -// AdminWindows -type AdminWindows struct { - Entity -} -// NewAdminWindows instantiates a new adminWindows and sets the default values. -func NewAdminWindows()(*AdminWindows) { - m := &AdminWindows{ - Entity: *NewEntity(), - } - return m -} -// CreateAdminWindowsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value -func CreateAdminWindowsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewAdminWindows(), nil -} -// GetFieldDeserializers the deserialization information for the current model -func (m *AdminWindows) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - res := m.Entity.GetFieldDeserializers() - res["updates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetObjectValue(CreateAdminWindowsUpdatesFromDiscriminatorValue) - if err != nil { - return err - } - if val != nil { - m.SetUpdates(val.(AdminWindowsUpdatesable)) - } - return nil - } - return res -} -// GetUpdates gets the updates property value. Entity that acts as a container for all Windows Update for Business deployment service functionalities. Read-only. -func (m *AdminWindows) GetUpdates()(AdminWindowsUpdatesable) { - val, err := m.GetBackingStore().Get("updates") - if err != nil { - panic(err) - } - if val != nil { - return val.(AdminWindowsUpdatesable) - } - return nil -} -// Serialize serializes information the current object -func (m *AdminWindows) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - err := m.Entity.Serialize(writer) - if err != nil { - return err - } - { - err = writer.WriteObjectValue("updates", m.GetUpdates()) - if err != nil { - return err - } - } - return nil -} -// SetUpdates sets the updates property value. Entity that acts as a container for all Windows Update for Business deployment service functionalities. Read-only. -func (m *AdminWindows) SetUpdates(value AdminWindowsUpdatesable)() { - err := m.GetBackingStore().Set("updates", value) - if err != nil { - panic(err) - } -} -// AdminWindowsable -type AdminWindowsable interface { - Entityable - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetUpdates()(AdminWindowsUpdatesable) - SetUpdates(value AdminWindowsUpdatesable)() -} diff --git a/models/admin_windows.go b/models/admin_windows.go new file mode 100644 index 00000000000..cdd938a9b06 --- /dev/null +++ b/models/admin_windows.go @@ -0,0 +1,75 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AdminWindows +type AdminWindows struct { + Entity +} +// NewAdminWindows instantiates a new adminWindows and sets the default values. +func NewAdminWindows()(*AdminWindows) { + m := &AdminWindows{ + Entity: *NewEntity(), + } + return m +} +// CreateAdminWindowsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAdminWindowsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAdminWindows(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AdminWindows) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["updates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAdminWindowsUpdatesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUpdates(val.(AdminWindowsUpdatesable)) + } + return nil + } + return res +} +// GetUpdates gets the updates property value. Entity that acts as a container for all Windows Update for Business deployment service functionalities. Read-only. +func (m *AdminWindows) GetUpdates()(AdminWindowsUpdatesable) { + val, err := m.GetBackingStore().Get("updates") + if err != nil { + panic(err) + } + if val != nil { + return val.(AdminWindowsUpdatesable) + } + return nil +} +// Serialize serializes information the current object +func (m *AdminWindows) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("updates", m.GetUpdates()) + if err != nil { + return err + } + } + return nil +} +// SetUpdates sets the updates property value. Entity that acts as a container for all Windows Update for Business deployment service functionalities. Read-only. +func (m *AdminWindows) SetUpdates(value AdminWindowsUpdatesable)() { + err := m.GetBackingStore().Set("updates", value) + if err != nil { + panic(err) + } +} +// AdminWindowsable +type AdminWindowsable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetUpdates()(AdminWindowsUpdatesable) + SetUpdates(value AdminWindowsUpdatesable)() +} diff --git a/models/agreement_file_properties.go b/models/agreement_file_properties.go index 6484a0870a4..ecb0f560f78 100644 --- a/models/agreement_file_properties.go +++ b/models/agreement_file_properties.go @@ -42,7 +42,7 @@ func CreateAgreementFilePropertiesFromDiscriminatorValue(parseNode i878a80d2330e } return NewAgreementFileProperties(), nil } -// GetCreatedDateTime gets the createdDateTime property value. 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. +// GetCreatedDateTime gets the createdDateTime property value. 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. func (m *AgreementFileProperties) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { val, err := m.GetBackingStore().Get("createdDateTime") if err != nil { @@ -161,7 +161,7 @@ func (m *AgreementFileProperties) GetFileName()(*string) { } return nil } -// GetIsDefault gets the isDefault property value. 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. +// GetIsDefault gets the isDefault property value. 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. func (m *AgreementFileProperties) GetIsDefault()(*bool) { val, err := m.GetBackingStore().Get("isDefault") if err != nil { @@ -244,7 +244,7 @@ func (m *AgreementFileProperties) Serialize(writer i878a80d2330e89d26896388a3f48 } return nil } -// SetCreatedDateTime sets the createdDateTime property value. 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. +// SetCreatedDateTime sets the createdDateTime property value. 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. func (m *AgreementFileProperties) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { err := m.GetBackingStore().Set("createdDateTime", value) if err != nil { @@ -272,7 +272,7 @@ func (m *AgreementFileProperties) SetFileName(value *string)() { panic(err) } } -// SetIsDefault sets the isDefault property value. 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. +// SetIsDefault sets the isDefault property value. 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. func (m *AgreementFileProperties) SetIsDefault(value *bool)() { err := m.GetBackingStore().Set("isDefault", value) if err != nil { diff --git a/models/api_application.go b/models/api_application.go index 5c213d4d85c..7bc64792994 100644 --- a/models/api_application.go +++ b/models/api_application.go @@ -166,7 +166,7 @@ func (m *ApiApplication) GetOdataType()(*string) { } return nil } -// GetPreAuthorizedApplications gets the preAuthorizedApplications property value. 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. +// GetPreAuthorizedApplications gets the preAuthorizedApplications property value. 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. func (m *ApiApplication) GetPreAuthorizedApplications()([]PreAuthorizedApplicationable) { val, err := m.GetBackingStore().Get("preAuthorizedApplications") if err != nil { @@ -285,7 +285,7 @@ func (m *ApiApplication) SetOdataType(value *string)() { panic(err) } } -// SetPreAuthorizedApplications sets the preAuthorizedApplications property value. 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. +// SetPreAuthorizedApplications sets the preAuthorizedApplications property value. 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. func (m *ApiApplication) SetPreAuthorizedApplications(value []PreAuthorizedApplicationable)() { err := m.GetBackingStore().Set("preAuthorizedApplications", value) if err != nil { diff --git a/models/app_credential_sign_in_activity.go b/models/app_credential_sign_in_activity.go index c4582637196..bef6a527bd7 100644 --- a/models/app_credential_sign_in_activity.go +++ b/models/app_credential_sign_in_activity.go @@ -20,7 +20,7 @@ func NewAppCredentialSignInActivity()(*AppCredentialSignInActivity) { func CreateAppCredentialSignInActivityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewAppCredentialSignInActivity(), nil } -// GetAppId gets the appId property value. The globally unique appId (also called client ID on the Azure portal) of the credential application. +// GetAppId gets the appId property value. The globally unique appId (also called client ID on the Microsoft Entra admin center) of the credential application. func (m *AppCredentialSignInActivity) GetAppId()(*string) { val, err := m.GetBackingStore().Get("appId") if err != nil { @@ -333,7 +333,7 @@ func (m *AppCredentialSignInActivity) Serialize(writer i878a80d2330e89d26896388a } return nil } -// SetAppId sets the appId property value. The globally unique appId (also called client ID on the Azure portal) of the credential application. +// SetAppId sets the appId property value. The globally unique appId (also called client ID on the Microsoft Entra admin center) of the credential application. func (m *AppCredentialSignInActivity) SetAppId(value *string)() { err := m.GetBackingStore().Set("appId", value) if err != nil { diff --git a/models/app_identity.go b/models/app_identity.go index 1e40b5c09ce..286cc6a895d 100644 --- a/models/app_identity.go +++ b/models/app_identity.go @@ -49,7 +49,7 @@ func (m *AppIdentity) GetAppId()(*string) { func (m *AppIdentity) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { return m.backingStore } -// GetDisplayName gets the displayName property value. Refers to the Application Name displayed in the Azure Portal. +// GetDisplayName gets the displayName property value. Refers to the application name displayed in the Microsoft Entra admin center. func (m *AppIdentity) GetDisplayName()(*string) { val, err := m.GetBackingStore().Get("displayName") if err != nil { @@ -206,7 +206,7 @@ func (m *AppIdentity) SetAppId(value *string)() { func (m *AppIdentity) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { m.backingStore = value } -// SetDisplayName sets the displayName property value. Refers to the Application Name displayed in the Azure Portal. +// SetDisplayName sets the displayName property value. Refers to the application name displayed in the Microsoft Entra admin center. func (m *AppIdentity) SetDisplayName(value *string)() { err := m.GetBackingStore().Set("displayName", value) if err != nil { diff --git a/models/attachment_base.go b/models/attachment_base.go index 32d63c77e6e..e2ab0f8c405 100644 --- a/models/attachment_base.go +++ b/models/attachment_base.go @@ -105,7 +105,7 @@ func (m *AttachmentBase) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3a } return nil } -// GetName gets the name property value. The display name of the attachment. This does not need to be the actual file name. +// GetName gets the name property value. The display name of the attachment. This doesn't need to be the actual file name. func (m *AttachmentBase) GetName()(*string) { val, err := m.GetBackingStore().Get("name") if err != nil { @@ -173,7 +173,7 @@ func (m *AttachmentBase) SetLastModifiedDateTime(value *i336074805fc853987abe6f7 panic(err) } } -// SetName sets the name property value. The display name of the attachment. This does not need to be the actual file name. +// SetName sets the name property value. The display name of the attachment. This doesn't need to be the actual file name. func (m *AttachmentBase) SetName(value *string)() { err := m.GetBackingStore().Set("name", value) if err != nil { diff --git a/models/certificate_authority_as_entity.go b/models/certificate_authority_as_entity.go index 9ab8916e68a..64dff15aa9e 100644 --- a/models/certificate_authority_as_entity.go +++ b/models/certificate_authority_as_entity.go @@ -19,7 +19,7 @@ func NewCertificateAuthorityAsEntity()(*CertificateAuthorityAsEntity) { func CreateCertificateAuthorityAsEntityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewCertificateAuthorityAsEntity(), nil } -// GetCertificate gets the certificate property value. The trusted certificate. +// GetCertificate gets the certificate property value. The certificate property func (m *CertificateAuthorityAsEntity) GetCertificate()([]byte) { val, err := m.GetBackingStore().Get("certificate") if err != nil { @@ -75,7 +75,7 @@ func (m *CertificateAuthorityAsEntity) GetFieldDeserializers()(map[string]func(i } return res } -// GetIsRootAuthority gets the isRootAuthority property value. Indicates if the certificate is a root authority. In a certificateBasedApplicationConfiguration object, at least one object in the trustedCertificateAuthorities collection must be a root authority. +// GetIsRootAuthority gets the isRootAuthority property value. The isRootAuthority property func (m *CertificateAuthorityAsEntity) GetIsRootAuthority()(*bool) { val, err := m.GetBackingStore().Get("isRootAuthority") if err != nil { @@ -86,7 +86,7 @@ func (m *CertificateAuthorityAsEntity) GetIsRootAuthority()(*bool) { } return nil } -// GetIssuer gets the issuer property value. The issuer of the trusted certificate. +// GetIssuer gets the issuer property value. The issuer property func (m *CertificateAuthorityAsEntity) GetIssuer()(*string) { val, err := m.GetBackingStore().Get("issuer") if err != nil { @@ -97,7 +97,7 @@ func (m *CertificateAuthorityAsEntity) GetIssuer()(*string) { } return nil } -// GetIssuerSubjectKeyIdentifier gets the issuerSubjectKeyIdentifier property value. The subject key identifier of the trusted certificate. +// GetIssuerSubjectKeyIdentifier gets the issuerSubjectKeyIdentifier property value. The issuerSubjectKeyIdentifier property func (m *CertificateAuthorityAsEntity) GetIssuerSubjectKeyIdentifier()(*string) { val, err := m.GetBackingStore().Get("issuerSubjectKeyIdentifier") if err != nil { @@ -140,28 +140,28 @@ func (m *CertificateAuthorityAsEntity) Serialize(writer i878a80d2330e89d26896388 } return nil } -// SetCertificate sets the certificate property value. The trusted certificate. +// SetCertificate sets the certificate property value. The certificate property func (m *CertificateAuthorityAsEntity) SetCertificate(value []byte)() { err := m.GetBackingStore().Set("certificate", value) if err != nil { panic(err) } } -// SetIsRootAuthority sets the isRootAuthority property value. Indicates if the certificate is a root authority. In a certificateBasedApplicationConfiguration object, at least one object in the trustedCertificateAuthorities collection must be a root authority. +// SetIsRootAuthority sets the isRootAuthority property value. The isRootAuthority property func (m *CertificateAuthorityAsEntity) SetIsRootAuthority(value *bool)() { err := m.GetBackingStore().Set("isRootAuthority", value) if err != nil { panic(err) } } -// SetIssuer sets the issuer property value. The issuer of the trusted certificate. +// SetIssuer sets the issuer property value. The issuer property func (m *CertificateAuthorityAsEntity) SetIssuer(value *string)() { err := m.GetBackingStore().Set("issuer", value) if err != nil { panic(err) } } -// SetIssuerSubjectKeyIdentifier sets the issuerSubjectKeyIdentifier property value. The subject key identifier of the trusted certificate. +// SetIssuerSubjectKeyIdentifier sets the issuerSubjectKeyIdentifier property value. The issuerSubjectKeyIdentifier property func (m *CertificateAuthorityAsEntity) SetIssuerSubjectKeyIdentifier(value *string)() { err := m.GetBackingStore().Set("issuerSubjectKeyIdentifier", value) if err != nil { diff --git a/models/certificate_authority_path.go b/models/certificate_authority_path.go index 332142a78c3..fab5d7c7bd5 100644 --- a/models/certificate_authority_path.go +++ b/models/certificate_authority_path.go @@ -19,7 +19,7 @@ func NewCertificateAuthorityPath()(*CertificateAuthorityPath) { func CreateCertificateAuthorityPathFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewCertificateAuthorityPath(), nil } -// GetCertificateBasedApplicationConfigurations gets the certificateBasedApplicationConfigurations property value. Defines the trusted certificate authorities for certificates that can be added to apps and service principals in the tenant. +// GetCertificateBasedApplicationConfigurations gets the certificateBasedApplicationConfigurations property value. The certificateBasedApplicationConfigurations property func (m *CertificateAuthorityPath) GetCertificateBasedApplicationConfigurations()([]CertificateBasedApplicationConfigurationable) { val, err := m.GetBackingStore().Get("certificateBasedApplicationConfigurations") if err != nil { @@ -71,7 +71,7 @@ func (m *CertificateAuthorityPath) Serialize(writer i878a80d2330e89d26896388a3f4 } return nil } -// SetCertificateBasedApplicationConfigurations sets the certificateBasedApplicationConfigurations property value. Defines the trusted certificate authorities for certificates that can be added to apps and service principals in the tenant. +// SetCertificateBasedApplicationConfigurations sets the certificateBasedApplicationConfigurations property value. The certificateBasedApplicationConfigurations property func (m *CertificateAuthorityPath) SetCertificateBasedApplicationConfigurations(value []CertificateBasedApplicationConfigurationable)() { err := m.GetBackingStore().Set("certificateBasedApplicationConfigurations", value) if err != nil { diff --git a/models/certificate_based_application_configuration.go b/models/certificate_based_application_configuration.go index a11868c58fb..54074ad32a1 100644 --- a/models/certificate_based_application_configuration.go +++ b/models/certificate_based_application_configuration.go @@ -21,7 +21,7 @@ func NewCertificateBasedApplicationConfiguration()(*CertificateBasedApplicationC func CreateCertificateBasedApplicationConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewCertificateBasedApplicationConfiguration(), nil } -// GetDescription gets the description property value. The description of the trusted certificate authorities. +// GetDescription gets the description property value. The description property func (m *CertificateBasedApplicationConfiguration) GetDescription()(*string) { val, err := m.GetBackingStore().Get("description") if err != nil { @@ -32,7 +32,7 @@ func (m *CertificateBasedApplicationConfiguration) GetDescription()(*string) { } return nil } -// GetDisplayName gets the displayName property value. The display name of the trusted certificate authorities. +// GetDisplayName gets the displayName property value. The displayName property func (m *CertificateBasedApplicationConfiguration) GetDisplayName()(*string) { val, err := m.GetBackingStore().Get("displayName") if err != nil { @@ -88,14 +88,14 @@ func (m *CertificateBasedApplicationConfiguration) Serialize(writer i878a80d2330 } return nil } -// SetDescription sets the description property value. The description of the trusted certificate authorities. +// SetDescription sets the description property value. The description property func (m *CertificateBasedApplicationConfiguration) SetDescription(value *string)() { err := m.GetBackingStore().Set("description", value) if err != nil { panic(err) } } -// SetDisplayName sets the displayName property value. The display name of the trusted certificate authorities. +// SetDisplayName sets the displayName property value. The displayName property func (m *CertificateBasedApplicationConfiguration) SetDisplayName(value *string)() { err := m.GetBackingStore().Set("displayName", value) if err != nil { diff --git a/models/communications_application_instance_identity.go b/models/communications_application_instance_identity.go index 6f01d67cdf0..3fbd602eb86 100644 --- a/models/communications_application_instance_identity.go +++ b/models/communications_application_instance_identity.go @@ -46,7 +46,7 @@ func (m *CommunicationsApplicationInstanceIdentity) GetFieldDeserializers()(map[ } return res } -// GetHidden gets the hidden property value. True if the participant would not like to be shown in other participants' rosters. +// GetHidden gets the hidden property value. True if the participant wouldn't like to be shown in other participants' rosters. func (m *CommunicationsApplicationInstanceIdentity) GetHidden()(*bool) { val, err := m.GetBackingStore().Get("hidden") if err != nil { @@ -88,7 +88,7 @@ func (m *CommunicationsApplicationInstanceIdentity) Serialize(writer i878a80d233 } return nil } -// SetHidden sets the hidden property value. True if the participant would not like to be shown in other participants' rosters. +// SetHidden sets the hidden property value. True if the participant wouldn't like to be shown in other participants' rosters. func (m *CommunicationsApplicationInstanceIdentity) SetHidden(value *bool)() { err := m.GetBackingStore().Set("hidden", value) if err != nil { diff --git a/models/custom_extension_handler.go b/models/custom_extension_handler.go index 5b7586879fd..4be5ee21290 100644 --- a/models/custom_extension_handler.go +++ b/models/custom_extension_handler.go @@ -19,7 +19,7 @@ func NewCustomExtensionHandler()(*CustomExtensionHandler) { func CreateCustomExtensionHandlerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewCustomExtensionHandler(), nil } -// GetCustomExtension gets the customExtension property value. Indicates which custom workflow extension will be executed at this stage. Nullable. Supports $expand. +// GetCustomExtension gets the customExtension property value. Indicates which custom workflow extension is executed at this stage. Nullable. Supports $expand. func (m *CustomExtensionHandler) GetCustomExtension()(CustomAccessPackageWorkflowExtensionable) { val, err := m.GetBackingStore().Get("customExtension") if err != nil { @@ -87,7 +87,7 @@ func (m *CustomExtensionHandler) Serialize(writer i878a80d2330e89d26896388a3f487 } return nil } -// SetCustomExtension sets the customExtension property value. Indicates which custom workflow extension will be executed at this stage. Nullable. Supports $expand. +// SetCustomExtension sets the customExtension property value. Indicates which custom workflow extension is executed at this stage. Nullable. Supports $expand. func (m *CustomExtensionHandler) SetCustomExtension(value CustomAccessPackageWorkflowExtensionable)() { err := m.GetBackingStore().Set("customExtension", value) if err != nil { diff --git a/models/default_user_role_permissions.go b/models/default_user_role_permissions.go index a56ad963b59..308c4c436af 100644 --- a/models/default_user_role_permissions.go +++ b/models/default_user_role_permissions.go @@ -34,7 +34,7 @@ func (m *DefaultUserRolePermissions) GetAdditionalData()(map[string]any) { } return val.(map[string]any) } -// GetAllowedToCreateApps gets the allowedToCreateApps property value. 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. +// GetAllowedToCreateApps gets the allowedToCreateApps property value. 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. func (m *DefaultUserRolePermissions) GetAllowedToCreateApps()(*bool) { val, err := m.GetBackingStore().Get("allowedToCreateApps") if err != nil { @@ -45,7 +45,7 @@ func (m *DefaultUserRolePermissions) GetAllowedToCreateApps()(*bool) { } return nil } -// GetAllowedToCreateSecurityGroups gets the allowedToCreateSecurityGroups property value. 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. +// GetAllowedToCreateSecurityGroups gets the allowedToCreateSecurityGroups property value. 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. func (m *DefaultUserRolePermissions) GetAllowedToCreateSecurityGroups()(*bool) { val, err := m.GetBackingStore().Get("allowedToCreateSecurityGroups") if err != nil { @@ -56,7 +56,7 @@ func (m *DefaultUserRolePermissions) GetAllowedToCreateSecurityGroups()(*bool) { } return nil } -// GetAllowedToCreateTenants gets the allowedToCreateTenants property value. 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. +// GetAllowedToCreateTenants gets the allowedToCreateTenants property value. 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. func (m *DefaultUserRolePermissions) GetAllowedToCreateTenants()(*bool) { val, err := m.GetBackingStore().Get("allowedToCreateTenants") if err != nil { @@ -222,21 +222,21 @@ func (m *DefaultUserRolePermissions) SetAdditionalData(value map[string]any)() { panic(err) } } -// SetAllowedToCreateApps sets the allowedToCreateApps property value. 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. +// SetAllowedToCreateApps sets the allowedToCreateApps property value. 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. func (m *DefaultUserRolePermissions) SetAllowedToCreateApps(value *bool)() { err := m.GetBackingStore().Set("allowedToCreateApps", value) if err != nil { panic(err) } } -// SetAllowedToCreateSecurityGroups sets the allowedToCreateSecurityGroups property value. 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. +// SetAllowedToCreateSecurityGroups sets the allowedToCreateSecurityGroups property value. 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. func (m *DefaultUserRolePermissions) SetAllowedToCreateSecurityGroups(value *bool)() { err := m.GetBackingStore().Set("allowedToCreateSecurityGroups", value) if err != nil { panic(err) } } -// SetAllowedToCreateTenants sets the allowedToCreateTenants property value. 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. +// SetAllowedToCreateTenants sets the allowedToCreateTenants property value. 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. func (m *DefaultUserRolePermissions) SetAllowedToCreateTenants(value *bool)() { err := m.GetBackingStore().Set("allowedToCreateTenants", value) if err != nil { diff --git a/models/device_management_configuration_setting_group_collection_definition.go b/models/device_management_configuration_setting_group_collection_definition.go index 7702cbf6faf..1b640305b33 100644 --- a/models/device_management_configuration_setting_group_collection_definition.go +++ b/models/device_management_configuration_setting_group_collection_definition.go @@ -44,7 +44,7 @@ func (m *DeviceManagementConfigurationSettingGroupCollectionDefinition) GetField } return res } -// GetMaximumCount gets the maximumCount property value. Maximum number of setting group count in the collection +// GetMaximumCount gets the maximumCount property value. Maximum number of setting group count in the collection. Valid values 1 to 100 func (m *DeviceManagementConfigurationSettingGroupCollectionDefinition) GetMaximumCount()(*int32) { val, err := m.GetBackingStore().Get("maximumCount") if err != nil { @@ -55,7 +55,7 @@ func (m *DeviceManagementConfigurationSettingGroupCollectionDefinition) GetMaxim } return nil } -// GetMinimumCount gets the minimumCount property value. Minimum number of setting group count in the collection +// GetMinimumCount gets the minimumCount property value. Minimum number of setting group count in the collection. Valid values 1 to 100 func (m *DeviceManagementConfigurationSettingGroupCollectionDefinition) GetMinimumCount()(*int32) { val, err := m.GetBackingStore().Get("minimumCount") if err != nil { @@ -86,14 +86,14 @@ func (m *DeviceManagementConfigurationSettingGroupCollectionDefinition) Serializ } return nil } -// SetMaximumCount sets the maximumCount property value. Maximum number of setting group count in the collection +// SetMaximumCount sets the maximumCount property value. Maximum number of setting group count in the collection. Valid values 1 to 100 func (m *DeviceManagementConfigurationSettingGroupCollectionDefinition) SetMaximumCount(value *int32)() { err := m.GetBackingStore().Set("maximumCount", value) if err != nil { panic(err) } } -// SetMinimumCount sets the minimumCount property value. Minimum number of setting group count in the collection +// SetMinimumCount sets the minimumCount property value. Minimum number of setting group count in the collection. Valid values 1 to 100 func (m *DeviceManagementConfigurationSettingGroupCollectionDefinition) SetMinimumCount(value *int32)() { err := m.GetBackingStore().Set("minimumCount", value) if err != nil { diff --git a/models/device_management_configuration_simple_setting_collection_definition.go b/models/device_management_configuration_simple_setting_collection_definition.go index 492062bd79a..85c8cbd8299 100644 --- a/models/device_management_configuration_simple_setting_collection_definition.go +++ b/models/device_management_configuration_simple_setting_collection_definition.go @@ -44,7 +44,7 @@ func (m *DeviceManagementConfigurationSimpleSettingCollectionDefinition) GetFiel } return res } -// GetMaximumCount gets the maximumCount property value. Maximum number of simple settings in the collection +// GetMaximumCount gets the maximumCount property value. Maximum number of simple settings in the collection. Valid values 1 to 100 func (m *DeviceManagementConfigurationSimpleSettingCollectionDefinition) GetMaximumCount()(*int32) { val, err := m.GetBackingStore().Get("maximumCount") if err != nil { @@ -55,7 +55,7 @@ func (m *DeviceManagementConfigurationSimpleSettingCollectionDefinition) GetMaxi } return nil } -// GetMinimumCount gets the minimumCount property value. Minimum number of simple settings in the collection +// GetMinimumCount gets the minimumCount property value. Minimum number of simple settings in the collection. Valid values 1 to 100 func (m *DeviceManagementConfigurationSimpleSettingCollectionDefinition) GetMinimumCount()(*int32) { val, err := m.GetBackingStore().Get("minimumCount") if err != nil { @@ -86,14 +86,14 @@ func (m *DeviceManagementConfigurationSimpleSettingCollectionDefinition) Seriali } return nil } -// SetMaximumCount sets the maximumCount property value. Maximum number of simple settings in the collection +// SetMaximumCount sets the maximumCount property value. Maximum number of simple settings in the collection. Valid values 1 to 100 func (m *DeviceManagementConfigurationSimpleSettingCollectionDefinition) SetMaximumCount(value *int32)() { err := m.GetBackingStore().Set("maximumCount", value) if err != nil { panic(err) } } -// SetMinimumCount sets the minimumCount property value. Minimum number of simple settings in the collection +// SetMinimumCount sets the minimumCount property value. Minimum number of simple settings in the collection. Valid values 1 to 100 func (m *DeviceManagementConfigurationSimpleSettingCollectionDefinition) SetMinimumCount(value *int32)() { err := m.GetBackingStore().Set("minimumCount", value) if err != nil { diff --git a/models/device_management_configuration_simple_setting_definition.go b/models/device_management_configuration_simple_setting_definition.go index 7492cbcc736..8823bd51d21 100644 --- a/models/device_management_configuration_simple_setting_definition.go +++ b/models/device_management_configuration_simple_setting_definition.go @@ -37,7 +37,7 @@ func CreateDeviceManagementConfigurationSimpleSettingDefinitionFromDiscriminator } return NewDeviceManagementConfigurationSimpleSettingDefinition(), nil } -// GetDefaultValue gets the defaultValue property value. Default setting value for this setting +// GetDefaultValue gets the defaultValue property value. Default setting value for this setting. func (m *DeviceManagementConfigurationSimpleSettingDefinition) GetDefaultValue()(DeviceManagementConfigurationSettingValueable) { val, err := m.GetBackingStore().Get("defaultValue") if err != nil { @@ -48,7 +48,7 @@ func (m *DeviceManagementConfigurationSimpleSettingDefinition) GetDefaultValue() } return nil } -// GetDependedOnBy gets the dependedOnBy property value. list of child settings that depend on this setting +// GetDependedOnBy gets the dependedOnBy property value. list of child settings that depend on this setting. func (m *DeviceManagementConfigurationSimpleSettingDefinition) GetDependedOnBy()([]DeviceManagementConfigurationSettingDependedOnByable) { val, err := m.GetBackingStore().Get("dependedOnBy") if err != nil { @@ -59,7 +59,7 @@ func (m *DeviceManagementConfigurationSimpleSettingDefinition) GetDependedOnBy() } return nil } -// GetDependentOn gets the dependentOn property value. list of parent settings this setting is dependent on +// GetDependentOn gets the dependentOn property value. list of parent settings this setting is dependent on. func (m *DeviceManagementConfigurationSimpleSettingDefinition) GetDependentOn()([]DeviceManagementConfigurationDependentOnable) { val, err := m.GetBackingStore().Get("dependentOn") if err != nil { @@ -127,7 +127,7 @@ func (m *DeviceManagementConfigurationSimpleSettingDefinition) GetFieldDeseriali } return res } -// GetValueDefinition gets the valueDefinition property value. Definition of the value for this setting +// GetValueDefinition gets the valueDefinition property value. Definition of the value for this setting. func (m *DeviceManagementConfigurationSimpleSettingDefinition) GetValueDefinition()(DeviceManagementConfigurationSettingValueDefinitionable) { val, err := m.GetBackingStore().Get("valueDefinition") if err != nil { @@ -182,28 +182,28 @@ func (m *DeviceManagementConfigurationSimpleSettingDefinition) Serialize(writer } return nil } -// SetDefaultValue sets the defaultValue property value. Default setting value for this setting +// SetDefaultValue sets the defaultValue property value. Default setting value for this setting. func (m *DeviceManagementConfigurationSimpleSettingDefinition) SetDefaultValue(value DeviceManagementConfigurationSettingValueable)() { err := m.GetBackingStore().Set("defaultValue", value) if err != nil { panic(err) } } -// SetDependedOnBy sets the dependedOnBy property value. list of child settings that depend on this setting +// SetDependedOnBy sets the dependedOnBy property value. list of child settings that depend on this setting. func (m *DeviceManagementConfigurationSimpleSettingDefinition) SetDependedOnBy(value []DeviceManagementConfigurationSettingDependedOnByable)() { err := m.GetBackingStore().Set("dependedOnBy", value) if err != nil { panic(err) } } -// SetDependentOn sets the dependentOn property value. list of parent settings this setting is dependent on +// SetDependentOn sets the dependentOn property value. list of parent settings this setting is dependent on. func (m *DeviceManagementConfigurationSimpleSettingDefinition) SetDependentOn(value []DeviceManagementConfigurationDependentOnable)() { err := m.GetBackingStore().Set("dependentOn", value) if err != nil { panic(err) } } -// SetValueDefinition sets the valueDefinition property value. Definition of the value for this setting +// SetValueDefinition sets the valueDefinition property value. Definition of the value for this setting. func (m *DeviceManagementConfigurationSimpleSettingDefinition) SetValueDefinition(value DeviceManagementConfigurationSettingValueDefinitionable)() { err := m.GetBackingStore().Set("valueDefinition", value) if err != nil { diff --git a/models/directory_audit.go b/models/directory_audit.go index c747e80eedd..80de55c963a 100644 --- a/models/directory_audit.go +++ b/models/directory_audit.go @@ -20,7 +20,7 @@ func NewDirectoryAudit()(*DirectoryAudit) { func CreateDirectoryAuditFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewDirectoryAudit(), nil } -// GetActivityDateTime gets the activityDateTime property value. Indicates the date and time the activity was performed. The Timestamp type is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z.Supports $filter (eq, ge, le) and $orderby. +// GetActivityDateTime gets the activityDateTime property value. Indicates the date and time the activity was performed. The Timestamp type is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Supports $filter (eq, ge, le) and $orderby. func (m *DirectoryAudit) GetActivityDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { val, err := m.GetBackingStore().Get("activityDateTime") if err != nil { @@ -31,7 +31,7 @@ func (m *DirectoryAudit) GetActivityDateTime()(*i336074805fc853987abe6f7fe3ad97a } return nil } -// GetActivityDisplayName gets the activityDisplayName property value. Indicates the activity name or the operation name (E.g. 'Create User', 'Add member to group'). For a list of activities logged, refer to Azure AD audit log categories and activities. Supports $filter (eq, startswith). +// GetActivityDisplayName gets the activityDisplayName property value. Indicates the activity name or the operation name (for example 'Create User', 'Add member to group'). For a list of activities logged, refer to Azure AD audit log categories and activities. Supports $filter (eq, startswith). func (m *DirectoryAudit) GetActivityDisplayName()(*string) { val, err := m.GetBackingStore().Get("activityDisplayName") if err != nil { @@ -42,7 +42,7 @@ func (m *DirectoryAudit) GetActivityDisplayName()(*string) { } return nil } -// GetAdditionalDetails gets the additionalDetails property value. Indicates additional details on the activity. +// GetAdditionalDetails gets the additionalDetails property value. Indicates more details on the activity. func (m *DirectoryAudit) GetAdditionalDetails()([]KeyValueable) { val, err := m.GetBackingStore().Get("additionalDetails") if err != nil { @@ -234,7 +234,7 @@ func (m *DirectoryAudit) GetLoggedByService()(*string) { } return nil } -// GetOperationType gets the operationType property value. Indicates the type of operation that was performed. The possible values include but are not limited to the following: Add, Assign, Update, Unassign, and Delete. +// GetOperationType gets the operationType property value. Indicates the type of operation that was performed. The possible values include but aren't limited to the following: Add, Assign, Update, Unassign, and Delete. func (m *DirectoryAudit) GetOperationType()(*string) { val, err := m.GetBackingStore().Get("operationType") if err != nil { @@ -382,21 +382,21 @@ func (m *DirectoryAudit) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a } return nil } -// SetActivityDateTime sets the activityDateTime property value. Indicates the date and time the activity was performed. The Timestamp type is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z.Supports $filter (eq, ge, le) and $orderby. +// SetActivityDateTime sets the activityDateTime property value. Indicates the date and time the activity was performed. The Timestamp type is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Supports $filter (eq, ge, le) and $orderby. func (m *DirectoryAudit) SetActivityDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { err := m.GetBackingStore().Set("activityDateTime", value) if err != nil { panic(err) } } -// SetActivityDisplayName sets the activityDisplayName property value. Indicates the activity name or the operation name (E.g. 'Create User', 'Add member to group'). For a list of activities logged, refer to Azure AD audit log categories and activities. Supports $filter (eq, startswith). +// SetActivityDisplayName sets the activityDisplayName property value. Indicates the activity name or the operation name (for example 'Create User', 'Add member to group'). For a list of activities logged, refer to Azure AD audit log categories and activities. Supports $filter (eq, startswith). func (m *DirectoryAudit) SetActivityDisplayName(value *string)() { err := m.GetBackingStore().Set("activityDisplayName", value) if err != nil { panic(err) } } -// SetAdditionalDetails sets the additionalDetails property value. Indicates additional details on the activity. +// SetAdditionalDetails sets the additionalDetails property value. Indicates more details on the activity. func (m *DirectoryAudit) SetAdditionalDetails(value []KeyValueable)() { err := m.GetBackingStore().Set("additionalDetails", value) if err != nil { @@ -431,7 +431,7 @@ func (m *DirectoryAudit) SetLoggedByService(value *string)() { panic(err) } } -// SetOperationType sets the operationType property value. Indicates the type of operation that was performed. The possible values include but are not limited to the following: Add, Assign, Update, Unassign, and Delete. +// SetOperationType sets the operationType property value. Indicates the type of operation that was performed. The possible values include but aren't limited to the following: Add, Assign, Update, Unassign, and Delete. func (m *DirectoryAudit) SetOperationType(value *string)() { err := m.GetBackingStore().Set("operationType", value) if err != nil { diff --git a/models/ediscovery/case_escaped.go b/models/ediscovery/case_escaped.go index f31f3c43161..2ae96a55b53 100644 --- a/models/ediscovery/case_escaped.go +++ b/models/ediscovery/case_escaped.go @@ -697,3 +697,42 @@ func (m *CaseEscaped) SetTags(value []Tagable)() { panic(err) } } +// CaseEscapedable +type CaseEscapedable interface { + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetClosedBy()(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.IdentitySetable) + GetClosedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCustodians()([]Custodianable) + GetDescription()(*string) + GetDisplayName()(*string) + GetExternalId()(*string) + GetLastModifiedBy()(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.IdentitySetable) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLegalHolds()([]LegalHoldable) + GetNoncustodialDataSources()([]NoncustodialDataSourceable) + GetOperations()([]CaseOperationable) + GetReviewSets()([]ReviewSetable) + GetSettings()(CaseSettingsable) + GetSourceCollections()([]SourceCollectionable) + GetStatus()(*CaseStatus) + GetTags()([]Tagable) + SetClosedBy(value ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.IdentitySetable)() + SetClosedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCustodians(value []Custodianable)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetExternalId(value *string)() + SetLastModifiedBy(value ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.IdentitySetable)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLegalHolds(value []LegalHoldable)() + SetNoncustodialDataSources(value []NoncustodialDataSourceable)() + SetOperations(value []CaseOperationable)() + SetReviewSets(value []ReviewSetable)() + SetSettings(value CaseSettingsable)() + SetSourceCollections(value []SourceCollectionable)() + SetStatus(value *CaseStatus)() + SetTags(value []Tagable)() +} diff --git a/models/ediscovery/case_escapedable.go b/models/ediscovery/case_escapedable.go deleted file mode 100644 index 1c01938cdcb..00000000000 --- a/models/ediscovery/case_escapedable.go +++ /dev/null @@ -1,47 +0,0 @@ -package ediscovery - -import ( - i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" - ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" -) - -// CaseEscapedable -type CaseEscapedable interface { - ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Entityable - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetClosedBy()(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.IdentitySetable) - GetClosedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) - GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) - GetCustodians()([]Custodianable) - GetDescription()(*string) - GetDisplayName()(*string) - GetExternalId()(*string) - GetLastModifiedBy()(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.IdentitySetable) - GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) - GetLegalHolds()([]LegalHoldable) - GetNoncustodialDataSources()([]NoncustodialDataSourceable) - GetOperations()([]CaseOperationable) - GetReviewSets()([]ReviewSetable) - GetSettings()(CaseSettingsable) - GetSourceCollections()([]SourceCollectionable) - GetStatus()(*CaseStatus) - GetTags()([]Tagable) - SetClosedBy(value ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.IdentitySetable)() - SetClosedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() - SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() - SetCustodians(value []Custodianable)() - SetDescription(value *string)() - SetDisplayName(value *string)() - SetExternalId(value *string)() - SetLastModifiedBy(value ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.IdentitySetable)() - SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() - SetLegalHolds(value []LegalHoldable)() - SetNoncustodialDataSources(value []NoncustodialDataSourceable)() - SetOperations(value []CaseOperationable)() - SetReviewSets(value []ReviewSetable)() - SetSettings(value CaseSettingsable)() - SetSourceCollections(value []SourceCollectionable)() - SetStatus(value *CaseStatus)() - SetTags(value []Tagable)() -} diff --git a/models/endpoint.go b/models/endpoint.go index c773dd3f80c..a7d30cb205e 100644 --- a/models/endpoint.go +++ b/models/endpoint.go @@ -21,7 +21,7 @@ func NewEndpoint()(*Endpoint) { func CreateEndpointFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewEndpoint(), nil } -// GetCapability gets the capability property value. Describes the capability that is associated with this resource. (e.g. Messages, Conversations, etc.) Not nullable. Read-only. +// GetCapability gets the capability property value. Describes the capability that is associated with this resource. (for example, Messages, Conversations, etc.) Not nullable. Read-only. func (m *Endpoint) GetCapability()(*string) { val, err := m.GetBackingStore().Get("capability") if err != nil { @@ -109,7 +109,7 @@ func (m *Endpoint) GetProviderName()(*string) { } return nil } -// GetProviderResourceId gets the providerResourceId property value. For Microsoft 365 groups, this is set to a well-known name for the resource (e.g. Yammer.FeedURL etc.). Not nullable. Read-only. +// GetProviderResourceId gets the providerResourceId property value. For Microsoft 365 groups, this is set to a well-known name for the resource (for example, Yammer.FeedURL etc.). Not nullable. Read-only. func (m *Endpoint) GetProviderResourceId()(*string) { val, err := m.GetBackingStore().Get("providerResourceId") if err != nil { @@ -169,7 +169,7 @@ func (m *Endpoint) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c01 } return nil } -// SetCapability sets the capability property value. Describes the capability that is associated with this resource. (e.g. Messages, Conversations, etc.) Not nullable. Read-only. +// SetCapability sets the capability property value. Describes the capability that is associated with this resource. (for example, Messages, Conversations, etc.) Not nullable. Read-only. func (m *Endpoint) SetCapability(value *string)() { err := m.GetBackingStore().Set("capability", value) if err != nil { @@ -190,7 +190,7 @@ func (m *Endpoint) SetProviderName(value *string)() { panic(err) } } -// SetProviderResourceId sets the providerResourceId property value. For Microsoft 365 groups, this is set to a well-known name for the resource (e.g. Yammer.FeedURL etc.). Not nullable. Read-only. +// SetProviderResourceId sets the providerResourceId property value. For Microsoft 365 groups, this is set to a well-known name for the resource (for example, Yammer.FeedURL etc.). Not nullable. Read-only. func (m *Endpoint) SetProviderResourceId(value *string)() { err := m.GetBackingStore().Set("providerResourceId", value) if err != nil { diff --git a/models/externalconnectors/property.go b/models/externalconnectors/property.go index 553b03d7db8..3f21a0fbc2e 100644 --- a/models/externalconnectors/property.go +++ b/models/externalconnectors/property.go @@ -34,7 +34,7 @@ func (m *Property) GetAdditionalData()(map[string]any) { } return val.(map[string]any) } -// GetAliases gets the aliases property value. A set of aliases or a friendly names for the property. Maximum 32 characters. Only alphanumeric characters allowed. For example, each string might not contain control characters, whitespace, or any of the following: :, ;, ,, (, ), [, ], {, }, %, $, +, !, *, =, &, ?, @, #, /, ~, ', ', <, >, `, ^. Optional. +// GetAliases gets the aliases property value. A set of aliases or friendly names for the property. Maximum 32 characters. Only alphanumeric characters allowed. For example, each string might not contain control characters, whitespace, or any of the following: :, ;, ,, (, ), [, ], {, }, %, $, +, !, *, =, &, ?, @, #, /, ~, ', ', <, >, `, ^. Optional. func (m *Property) GetAliases()([]string) { val, err := m.GetBackingStore().Get("aliases") if err != nil { @@ -220,7 +220,7 @@ func (m *Property) GetIsRetrievable()(*bool) { } return nil } -// GetIsSearchable gets the isSearchable property value. 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. +// GetIsSearchable gets the isSearchable property value. Specifies if the property is searchable. Only properties of type string or stringCollection can be searchable. Non-searchable properties aren't added to the search index. Optional. func (m *Property) GetIsSearchable()(*bool) { val, err := m.GetBackingStore().Get("isSearchable") if err != nil { @@ -231,7 +231,7 @@ func (m *Property) GetIsSearchable()(*bool) { } return nil } -// GetLabels gets the labels property value. 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). Optional.The possible values are: title, url, createdBy, lastModifiedBy, authors, createdDateTime, lastModifiedDateTime, fileName, fileExtension, unknownFutureValue, iconUrl, containerName, containerUrl. Note that you must use the Prefer: include-unknown-enum-members request header to get the following values in this evolvable enum: iconUrl, containerName, containerUrl. +// GetLabels gets the labels property value. 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, containerName, containerUrl. You must use the Prefer: include-unknown-enum-members request header to get the following values in this evolvable enum: iconUrl, containerName, containerUrl. func (m *Property) GetLabels()([]Label) { val, err := m.GetBackingStore().Get("labels") if err != nil { @@ -370,7 +370,7 @@ func (m *Property) SetAdditionalData(value map[string]any)() { panic(err) } } -// SetAliases sets the aliases property value. A set of aliases or a friendly names for the property. Maximum 32 characters. Only alphanumeric characters allowed. For example, each string might not contain control characters, whitespace, or any of the following: :, ;, ,, (, ), [, ], {, }, %, $, +, !, *, =, &, ?, @, #, /, ~, ', ', <, >, `, ^. Optional. +// SetAliases sets the aliases property value. A set of aliases or friendly names for the property. Maximum 32 characters. Only alphanumeric characters allowed. For example, each string might not contain control characters, whitespace, or any of the following: :, ;, ,, (, ), [, ], {, }, %, $, +, !, *, =, &, ?, @, #, /, ~, ', ', <, >, `, ^. Optional. func (m *Property) SetAliases(value []string)() { err := m.GetBackingStore().Set("aliases", value) if err != nil { @@ -409,14 +409,14 @@ func (m *Property) SetIsRetrievable(value *bool)() { panic(err) } } -// SetIsSearchable sets the isSearchable property value. 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. +// SetIsSearchable sets the isSearchable property value. Specifies if the property is searchable. Only properties of type string or stringCollection can be searchable. Non-searchable properties aren't added to the search index. Optional. func (m *Property) SetIsSearchable(value *bool)() { err := m.GetBackingStore().Set("isSearchable", value) if err != nil { panic(err) } } -// SetLabels sets the labels property value. 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). Optional.The possible values are: title, url, createdBy, lastModifiedBy, authors, createdDateTime, lastModifiedDateTime, fileName, fileExtension, unknownFutureValue, iconUrl, containerName, containerUrl. Note that you must use the Prefer: include-unknown-enum-members request header to get the following values in this evolvable enum: iconUrl, containerName, containerUrl. +// SetLabels sets the labels property value. 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, containerName, containerUrl. You must use the Prefer: include-unknown-enum-members request header to get the following values in this evolvable enum: iconUrl, containerName, containerUrl. func (m *Property) SetLabels(value []Label)() { err := m.GetBackingStore().Set("labels", value) if err != nil { diff --git a/models/file_encryption_info.go b/models/file_encryption_info.go new file mode 100644 index 00000000000..ec2e5fea110 --- /dev/null +++ b/models/file_encryption_info.go @@ -0,0 +1,362 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +// FileEncryptionInfo contains properties for file encryption information for the content version of a line of business app. +type FileEncryptionInfo struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewFileEncryptionInfo instantiates a new fileEncryptionInfo and sets the default values. +func NewFileEncryptionInfo()(*FileEncryptionInfo) { + m := &FileEncryptionInfo{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateFileEncryptionInfoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateFileEncryptionInfoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFileEncryptionInfo(), nil +} +// GetAdditionalData gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *FileEncryptionInfo) GetAdditionalData()(map[string]any) { + val , err := m.backingStore.Get("additionalData") + if err != nil { + panic(err) + } + if val == nil { + var value = make(map[string]any); + m.SetAdditionalData(value); + } + return val.(map[string]any) +} +// GetBackingStore gets the backingStore property value. Stores model information. +func (m *FileEncryptionInfo) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetEncryptionKey gets the encryptionKey property value. The key used to encrypt the file content. +func (m *FileEncryptionInfo) GetEncryptionKey()([]byte) { + val, err := m.GetBackingStore().Get("encryptionKey") + if err != nil { + panic(err) + } + if val != nil { + return val.([]byte) + } + return nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *FileEncryptionInfo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["encryptionKey"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetEncryptionKey(val) + } + return nil + } + res["fileDigest"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetFileDigest(val) + } + return nil + } + res["fileDigestAlgorithm"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFileDigestAlgorithm(val) + } + return nil + } + res["initializationVector"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetInitializationVector(val) + } + return nil + } + res["mac"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetMac(val) + } + return nil + } + res["macKey"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetMacKey(val) + } + return nil + } + res["@odata.type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOdataType(val) + } + return nil + } + res["profileIdentifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProfileIdentifier(val) + } + return nil + } + return res +} +// GetFileDigest gets the fileDigest property value. The file digest prior to encryption. ProfileVersion1 requires a non-null FileDigest. +func (m *FileEncryptionInfo) GetFileDigest()([]byte) { + val, err := m.GetBackingStore().Get("fileDigest") + if err != nil { + panic(err) + } + if val != nil { + return val.([]byte) + } + return nil +} +// GetFileDigestAlgorithm gets the fileDigestAlgorithm property value. The file digest algorithm. ProfileVersion1 currently only supports SHA256 for the FileDigestAlgorithm. +func (m *FileEncryptionInfo) GetFileDigestAlgorithm()(*string) { + val, err := m.GetBackingStore().Get("fileDigestAlgorithm") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetInitializationVector gets the initializationVector property value. The initialization vector (IV) used for the encryption algorithm. Must be 16 bytes. +func (m *FileEncryptionInfo) GetInitializationVector()([]byte) { + val, err := m.GetBackingStore().Get("initializationVector") + if err != nil { + panic(err) + } + if val != nil { + return val.([]byte) + } + return nil +} +// GetMac gets the mac property value. The hash of the concatenation of the IV and encrypted file content. Must be 32 bytes. +func (m *FileEncryptionInfo) GetMac()([]byte) { + val, err := m.GetBackingStore().Get("mac") + if err != nil { + panic(err) + } + if val != nil { + return val.([]byte) + } + return nil +} +// GetMacKey gets the macKey property value. The key used to compute the message authentication code of the concatenation of the IV and encrypted file content. Must be 32 bytes. +func (m *FileEncryptionInfo) GetMacKey()([]byte) { + val, err := m.GetBackingStore().Get("macKey") + if err != nil { + panic(err) + } + if val != nil { + return val.([]byte) + } + return nil +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *FileEncryptionInfo) GetOdataType()(*string) { + val, err := m.GetBackingStore().Get("odataType") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetProfileIdentifier gets the profileIdentifier property value. The profile identifier. Maps to the strategy used to encrypt the file. Currently, only ProfileVersion1 is supported. +func (m *FileEncryptionInfo) GetProfileIdentifier()(*string) { + val, err := m.GetBackingStore().Get("profileIdentifier") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// Serialize serializes information the current object +func (m *FileEncryptionInfo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteByteArrayValue("encryptionKey", m.GetEncryptionKey()) + if err != nil { + return err + } + } + { + err := writer.WriteByteArrayValue("fileDigest", m.GetFileDigest()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("fileDigestAlgorithm", m.GetFileDigestAlgorithm()) + if err != nil { + return err + } + } + { + err := writer.WriteByteArrayValue("initializationVector", m.GetInitializationVector()) + if err != nil { + return err + } + } + { + err := writer.WriteByteArrayValue("mac", m.GetMac()) + if err != nil { + return err + } + } + { + err := writer.WriteByteArrayValue("macKey", m.GetMacKey()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("profileIdentifier", m.GetProfileIdentifier()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *FileEncryptionInfo) SetAdditionalData(value map[string]any)() { + err := m.GetBackingStore().Set("additionalData", value) + if err != nil { + panic(err) + } +} +// SetBackingStore sets the backingStore property value. Stores model information. +func (m *FileEncryptionInfo) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetEncryptionKey sets the encryptionKey property value. The key used to encrypt the file content. +func (m *FileEncryptionInfo) SetEncryptionKey(value []byte)() { + err := m.GetBackingStore().Set("encryptionKey", value) + if err != nil { + panic(err) + } +} +// SetFileDigest sets the fileDigest property value. The file digest prior to encryption. ProfileVersion1 requires a non-null FileDigest. +func (m *FileEncryptionInfo) SetFileDigest(value []byte)() { + err := m.GetBackingStore().Set("fileDigest", value) + if err != nil { + panic(err) + } +} +// SetFileDigestAlgorithm sets the fileDigestAlgorithm property value. The file digest algorithm. ProfileVersion1 currently only supports SHA256 for the FileDigestAlgorithm. +func (m *FileEncryptionInfo) SetFileDigestAlgorithm(value *string)() { + err := m.GetBackingStore().Set("fileDigestAlgorithm", value) + if err != nil { + panic(err) + } +} +// SetInitializationVector sets the initializationVector property value. The initialization vector (IV) used for the encryption algorithm. Must be 16 bytes. +func (m *FileEncryptionInfo) SetInitializationVector(value []byte)() { + err := m.GetBackingStore().Set("initializationVector", value) + if err != nil { + panic(err) + } +} +// SetMac sets the mac property value. The hash of the concatenation of the IV and encrypted file content. Must be 32 bytes. +func (m *FileEncryptionInfo) SetMac(value []byte)() { + err := m.GetBackingStore().Set("mac", value) + if err != nil { + panic(err) + } +} +// SetMacKey sets the macKey property value. The key used to compute the message authentication code of the concatenation of the IV and encrypted file content. Must be 32 bytes. +func (m *FileEncryptionInfo) SetMacKey(value []byte)() { + err := m.GetBackingStore().Set("macKey", value) + if err != nil { + panic(err) + } +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *FileEncryptionInfo) SetOdataType(value *string)() { + err := m.GetBackingStore().Set("odataType", value) + if err != nil { + panic(err) + } +} +// SetProfileIdentifier sets the profileIdentifier property value. The profile identifier. Maps to the strategy used to encrypt the file. Currently, only ProfileVersion1 is supported. +func (m *FileEncryptionInfo) SetProfileIdentifier(value *string)() { + err := m.GetBackingStore().Set("profileIdentifier", value) + if err != nil { + panic(err) + } +} +// FileEncryptionInfoable +type FileEncryptionInfoable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetEncryptionKey()([]byte) + GetFileDigest()([]byte) + GetFileDigestAlgorithm()(*string) + GetInitializationVector()([]byte) + GetMac()([]byte) + GetMacKey()([]byte) + GetOdataType()(*string) + GetProfileIdentifier()(*string) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetEncryptionKey(value []byte)() + SetFileDigest(value []byte)() + SetFileDigestAlgorithm(value *string)() + SetInitializationVector(value []byte)() + SetMac(value []byte)() + SetMacKey(value []byte)() + SetOdataType(value *string)() + SetProfileIdentifier(value *string)() +} diff --git a/models/governance_subject.go b/models/governance_subject.go index 788c41d087f..ccb1a2e4a65 100644 --- a/models/governance_subject.go +++ b/models/governance_subject.go @@ -30,7 +30,7 @@ func (m *GovernanceSubject) GetDisplayName()(*string) { } return nil } -// GetEmail gets the email property value. The email address of the user subject. If the subject is in other types, it is empty. +// GetEmail gets the email property value. The email address of the user subject. If the subject is in other types, it's empty. func (m *GovernanceSubject) GetEmail()(*string) { val, err := m.GetBackingStore().Get("email") if err != nil { @@ -86,7 +86,7 @@ func (m *GovernanceSubject) GetFieldDeserializers()(map[string]func(i878a80d2330 } return res } -// GetPrincipalName gets the principalName property value. The principal name of the user subject. If the subject is in other types, it is empty. +// GetPrincipalName gets the principalName property value. The principal name of the user subject. If the subject is in other types, it's empty. func (m *GovernanceSubject) GetPrincipalName()(*string) { val, err := m.GetBackingStore().Get("principalName") if err != nil { @@ -147,14 +147,14 @@ func (m *GovernanceSubject) SetDisplayName(value *string)() { panic(err) } } -// SetEmail sets the email property value. The email address of the user subject. If the subject is in other types, it is empty. +// SetEmail sets the email property value. The email address of the user subject. If the subject is in other types, it's empty. func (m *GovernanceSubject) SetEmail(value *string)() { err := m.GetBackingStore().Set("email", value) if err != nil { panic(err) } } -// SetPrincipalName sets the principalName property value. The principal name of the user subject. If the subject is in other types, it is empty. +// SetPrincipalName sets the principalName property value. The principal name of the user subject. If the subject is in other types, it's empty. func (m *GovernanceSubject) SetPrincipalName(value *string)() { err := m.GetBackingStore().Set("principalName", value) if err != nil { diff --git a/models/identity_user_flow_attribute.go b/models/identity_user_flow_attribute.go index 7d5ef43b0c0..41bb2a385f2 100644 --- a/models/identity_user_flow_attribute.go +++ b/models/identity_user_flow_attribute.go @@ -61,7 +61,7 @@ func (m *IdentityUserFlowAttribute) GetDescription()(*string) { } return nil } -// GetDisplayName gets the displayName property value. The display name of the user flow attribute. +// GetDisplayName gets the displayName property value. The display name of the user flow attribute. Supports $filter (eq, ne). func (m *IdentityUserFlowAttribute) GetDisplayName()(*string) { val, err := m.GetBackingStore().Get("displayName") if err != nil { @@ -176,7 +176,7 @@ func (m *IdentityUserFlowAttribute) SetDescription(value *string)() { panic(err) } } -// SetDisplayName sets the displayName property value. The display name of the user flow attribute. +// SetDisplayName sets the displayName property value. The display name of the user flow attribute. Supports $filter (eq, ne). func (m *IdentityUserFlowAttribute) SetDisplayName(value *string)() { err := m.GetBackingStore().Set("displayName", value) if err != nil { diff --git a/models/insight_identity.go b/models/insight_identity.go index 73b9bd107f2..8703ff59039 100644 --- a/models/insight_identity.go +++ b/models/insight_identity.go @@ -105,7 +105,7 @@ func (m *InsightIdentity) GetFieldDeserializers()(map[string]func(i878a80d2330e8 } return res } -// GetId gets the id property value. The id of the user who shared the item. +// GetId gets the id property value. The ID of the user who shared the item. func (m *InsightIdentity) GetId()(*string) { val, err := m.GetBackingStore().Get("id") if err != nil { @@ -186,7 +186,7 @@ func (m *InsightIdentity) SetDisplayName(value *string)() { panic(err) } } -// SetId sets the id property value. The id of the user who shared the item. +// SetId sets the id property value. The ID of the user who shared the item. func (m *InsightIdentity) SetId(value *string)() { err := m.GetBackingStore().Set("id", value) if err != nil { diff --git a/models/ios_vpp_app_assigned_license_collection_response.go b/models/ios_vpp_app_assigned_license_collection_response.go new file mode 100644 index 00000000000..87ae59c3d2f --- /dev/null +++ b/models/ios_vpp_app_assigned_license_collection_response.go @@ -0,0 +1,87 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosVppAppAssignedLicenseCollectionResponse +type IosVppAppAssignedLicenseCollectionResponse struct { + BaseCollectionPaginationCountResponse +} +// NewIosVppAppAssignedLicenseCollectionResponse instantiates a new iosVppAppAssignedLicenseCollectionResponse and sets the default values. +func NewIosVppAppAssignedLicenseCollectionResponse()(*IosVppAppAssignedLicenseCollectionResponse) { + m := &IosVppAppAssignedLicenseCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIosVppAppAssignedLicenseCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosVppAppAssignedLicenseCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosVppAppAssignedLicenseCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosVppAppAssignedLicenseCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIosVppAppAssignedLicenseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IosVppAppAssignedLicenseable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(IosVppAppAssignedLicenseable) + } + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IosVppAppAssignedLicenseCollectionResponse) GetValue()([]IosVppAppAssignedLicenseable) { + val, err := m.GetBackingStore().Get("value") + if err != nil { + panic(err) + } + if val != nil { + return val.([]IosVppAppAssignedLicenseable) + } + return nil +} +// Serialize serializes information the current object +func (m *IosVppAppAssignedLicenseCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IosVppAppAssignedLicenseCollectionResponse) SetValue(value []IosVppAppAssignedLicenseable)() { + err := m.GetBackingStore().Set("value", value) + if err != nil { + panic(err) + } +} +// IosVppAppAssignedLicenseCollectionResponseable +type IosVppAppAssignedLicenseCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IosVppAppAssignedLicenseable) + SetValue(value []IosVppAppAssignedLicenseable)() +} diff --git a/models/key_credential_configuration.go b/models/key_credential_configuration.go index d2b8f6b3137..7bc14ecbfb0 100644 --- a/models/key_credential_configuration.go +++ b/models/key_credential_configuration.go @@ -39,7 +39,7 @@ func (m *KeyCredentialConfiguration) GetAdditionalData()(map[string]any) { func (m *KeyCredentialConfiguration) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { return m.backingStore } -// GetCertificateBasedApplicationConfigurationIds gets the certificateBasedApplicationConfigurationIds property value. Collection of GUIDs that point to the certificateBasedApplicationConfiguration that contains the collection of allowed root and intermediate certificate authorities. +// GetCertificateBasedApplicationConfigurationIds gets the certificateBasedApplicationConfigurationIds property value. The certificateBasedApplicationConfigurationIds property func (m *KeyCredentialConfiguration) GetCertificateBasedApplicationConfigurationIds()([]string) { val, err := m.GetBackingStore().Get("certificateBasedApplicationConfigurationIds") if err != nil { @@ -207,7 +207,7 @@ func (m *KeyCredentialConfiguration) SetAdditionalData(value map[string]any)() { func (m *KeyCredentialConfiguration) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { m.backingStore = value } -// SetCertificateBasedApplicationConfigurationIds sets the certificateBasedApplicationConfigurationIds property value. Collection of GUIDs that point to the certificateBasedApplicationConfiguration that contains the collection of allowed root and intermediate certificate authorities. +// SetCertificateBasedApplicationConfigurationIds sets the certificateBasedApplicationConfigurationIds property value. The certificateBasedApplicationConfigurationIds property func (m *KeyCredentialConfiguration) SetCertificateBasedApplicationConfigurationIds(value []string)() { err := m.GetBackingStore().Set("certificateBasedApplicationConfigurationIds", value) if err != nil { diff --git a/models/microsoft_authenticator_feature_settings.go b/models/microsoft_authenticator_feature_settings.go index 8d4a1eedbc4..2f91c4feade 100644 --- a/models/microsoft_authenticator_feature_settings.go +++ b/models/microsoft_authenticator_feature_settings.go @@ -38,7 +38,7 @@ func (m *MicrosoftAuthenticatorFeatureSettings) GetAdditionalData()(map[string]a func (m *MicrosoftAuthenticatorFeatureSettings) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { return m.backingStore } -// GetCompanionAppAllowedState gets the companionAppAllowedState property value. Determines whether users will be able to approve push notifications on other Microsoft applications such as Outlook Mobile. +// GetCompanionAppAllowedState gets the companionAppAllowedState property value. Determines whether users are able to approve push notifications on other Microsoft applications such as Outlook Mobile. func (m *MicrosoftAuthenticatorFeatureSettings) GetCompanionAppAllowedState()(AuthenticationMethodFeatureConfigurationable) { val, err := m.GetBackingStore().Get("companionAppAllowedState") if err != nil { @@ -49,7 +49,7 @@ func (m *MicrosoftAuthenticatorFeatureSettings) GetCompanionAppAllowedState()(Au } return nil } -// GetDisplayAppInformationRequiredState gets the displayAppInformationRequiredState property value. Determines whether the user's Authenticator app will show them the client app they are signing into. +// GetDisplayAppInformationRequiredState gets the displayAppInformationRequiredState property value. Determines whether the user's Authenticator app shows them the client app they're signing into. func (m *MicrosoftAuthenticatorFeatureSettings) GetDisplayAppInformationRequiredState()(AuthenticationMethodFeatureConfigurationable) { val, err := m.GetBackingStore().Get("displayAppInformationRequiredState") if err != nil { @@ -60,7 +60,7 @@ func (m *MicrosoftAuthenticatorFeatureSettings) GetDisplayAppInformationRequired } return nil } -// GetDisplayLocationInformationRequiredState gets the displayLocationInformationRequiredState property value. Determines whether the user's Authenticator app will show them the geographic location of where the authentication request originated from. +// GetDisplayLocationInformationRequiredState gets the displayLocationInformationRequiredState property value. Determines whether the user's Authenticator app shows them the geographic location of where the authentication request originated from. func (m *MicrosoftAuthenticatorFeatureSettings) GetDisplayLocationInformationRequiredState()(AuthenticationMethodFeatureConfigurationable) { val, err := m.GetBackingStore().Get("displayLocationInformationRequiredState") if err != nil { @@ -199,21 +199,21 @@ func (m *MicrosoftAuthenticatorFeatureSettings) SetAdditionalData(value map[stri func (m *MicrosoftAuthenticatorFeatureSettings) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { m.backingStore = value } -// SetCompanionAppAllowedState sets the companionAppAllowedState property value. Determines whether users will be able to approve push notifications on other Microsoft applications such as Outlook Mobile. +// SetCompanionAppAllowedState sets the companionAppAllowedState property value. Determines whether users are able to approve push notifications on other Microsoft applications such as Outlook Mobile. func (m *MicrosoftAuthenticatorFeatureSettings) SetCompanionAppAllowedState(value AuthenticationMethodFeatureConfigurationable)() { err := m.GetBackingStore().Set("companionAppAllowedState", value) if err != nil { panic(err) } } -// SetDisplayAppInformationRequiredState sets the displayAppInformationRequiredState property value. Determines whether the user's Authenticator app will show them the client app they are signing into. +// SetDisplayAppInformationRequiredState sets the displayAppInformationRequiredState property value. Determines whether the user's Authenticator app shows them the client app they're signing into. func (m *MicrosoftAuthenticatorFeatureSettings) SetDisplayAppInformationRequiredState(value AuthenticationMethodFeatureConfigurationable)() { err := m.GetBackingStore().Set("displayAppInformationRequiredState", value) if err != nil { panic(err) } } -// SetDisplayLocationInformationRequiredState sets the displayLocationInformationRequiredState property value. Determines whether the user's Authenticator app will show them the geographic location of where the authentication request originated from. +// SetDisplayLocationInformationRequiredState sets the displayLocationInformationRequiredState property value. Determines whether the user's Authenticator app shows them the geographic location of where the authentication request originated from. func (m *MicrosoftAuthenticatorFeatureSettings) SetDisplayLocationInformationRequiredState(value AuthenticationMethodFeatureConfigurationable)() { err := m.GetBackingStore().Set("displayLocationInformationRequiredState", value) if err != nil { diff --git a/models/mobile_app_content_collection_response.go b/models/mobile_app_content_collection_response.go new file mode 100644 index 00000000000..9e3728bd09e --- /dev/null +++ b/models/mobile_app_content_collection_response.go @@ -0,0 +1,87 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppContentCollectionResponse +type MobileAppContentCollectionResponse struct { + BaseCollectionPaginationCountResponse +} +// NewMobileAppContentCollectionResponse instantiates a new mobileAppContentCollectionResponse and sets the default values. +func NewMobileAppContentCollectionResponse()(*MobileAppContentCollectionResponse) { + m := &MobileAppContentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMobileAppContentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileAppContentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMobileAppContentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileAppContentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMobileAppContentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MobileAppContentable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(MobileAppContentable) + } + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MobileAppContentCollectionResponse) GetValue()([]MobileAppContentable) { + val, err := m.GetBackingStore().Get("value") + if err != nil { + panic(err) + } + if val != nil { + return val.([]MobileAppContentable) + } + return nil +} +// Serialize serializes information the current object +func (m *MobileAppContentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MobileAppContentCollectionResponse) SetValue(value []MobileAppContentable)() { + err := m.GetBackingStore().Set("value", value) + if err != nil { + panic(err) + } +} +// MobileAppContentCollectionResponseable +type MobileAppContentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MobileAppContentable) + SetValue(value []MobileAppContentable)() +} diff --git a/models/mobile_app_content_file_collection_response.go b/models/mobile_app_content_file_collection_response.go new file mode 100644 index 00000000000..7fe3abbf497 --- /dev/null +++ b/models/mobile_app_content_file_collection_response.go @@ -0,0 +1,87 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppContentFileCollectionResponse +type MobileAppContentFileCollectionResponse struct { + BaseCollectionPaginationCountResponse +} +// NewMobileAppContentFileCollectionResponse instantiates a new mobileAppContentFileCollectionResponse and sets the default values. +func NewMobileAppContentFileCollectionResponse()(*MobileAppContentFileCollectionResponse) { + m := &MobileAppContentFileCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMobileAppContentFileCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileAppContentFileCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMobileAppContentFileCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileAppContentFileCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMobileAppContentFileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MobileAppContentFileable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(MobileAppContentFileable) + } + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MobileAppContentFileCollectionResponse) GetValue()([]MobileAppContentFileable) { + val, err := m.GetBackingStore().Get("value") + if err != nil { + panic(err) + } + if val != nil { + return val.([]MobileAppContentFileable) + } + return nil +} +// Serialize serializes information the current object +func (m *MobileAppContentFileCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MobileAppContentFileCollectionResponse) SetValue(value []MobileAppContentFileable)() { + err := m.GetBackingStore().Set("value", value) + if err != nil { + panic(err) + } +} +// MobileAppContentFileCollectionResponseable +type MobileAppContentFileCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MobileAppContentFileable) + SetValue(value []MobileAppContentFileable)() +} diff --git a/models/mobile_contained_app_collection_response.go b/models/mobile_contained_app_collection_response.go new file mode 100644 index 00000000000..114d0c9d323 --- /dev/null +++ b/models/mobile_contained_app_collection_response.go @@ -0,0 +1,87 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileContainedAppCollectionResponse +type MobileContainedAppCollectionResponse struct { + BaseCollectionPaginationCountResponse +} +// NewMobileContainedAppCollectionResponse instantiates a new mobileContainedAppCollectionResponse and sets the default values. +func NewMobileContainedAppCollectionResponse()(*MobileContainedAppCollectionResponse) { + m := &MobileContainedAppCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMobileContainedAppCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileContainedAppCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMobileContainedAppCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileContainedAppCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMobileContainedAppFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MobileContainedAppable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(MobileContainedAppable) + } + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MobileContainedAppCollectionResponse) GetValue()([]MobileContainedAppable) { + val, err := m.GetBackingStore().Get("value") + if err != nil { + panic(err) + } + if val != nil { + return val.([]MobileContainedAppable) + } + return nil +} +// Serialize serializes information the current object +func (m *MobileContainedAppCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MobileContainedAppCollectionResponse) SetValue(value []MobileContainedAppable)() { + err := m.GetBackingStore().Set("value", value) + if err != nil { + panic(err) + } +} +// MobileContainedAppCollectionResponseable +type MobileContainedAppCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MobileContainedAppable) + SetValue(value []MobileContainedAppable)() +} diff --git a/models/on_interactive_auth_flow_start_external_users_self_service_sign_up.go b/models/on_interactive_auth_flow_start_external_users_self_service_sign_up.go index bfc46f652a9..bb3843cde0f 100644 --- a/models/on_interactive_auth_flow_start_external_users_self_service_sign_up.go +++ b/models/on_interactive_auth_flow_start_external_users_self_service_sign_up.go @@ -36,7 +36,7 @@ func (m *OnInteractiveAuthFlowStartExternalUsersSelfServiceSignUp) GetFieldDeser } return res } -// GetIsSignUpAllowed gets the isSignUpAllowed property value. Optional. Specifes whether the authentication flow includes an option to sign up (create account) as well as sign in. Default value is false meaning only sign in is enabled. +// GetIsSignUpAllowed gets the isSignUpAllowed property value. Optional. Specifies whether the authentication flow includes an option to sign up (create account) and sign in. Default value is false meaning only sign in is enabled. func (m *OnInteractiveAuthFlowStartExternalUsersSelfServiceSignUp) GetIsSignUpAllowed()(*bool) { val, err := m.GetBackingStore().Get("isSignUpAllowed") if err != nil { @@ -61,7 +61,7 @@ func (m *OnInteractiveAuthFlowStartExternalUsersSelfServiceSignUp) Serialize(wri } return nil } -// SetIsSignUpAllowed sets the isSignUpAllowed property value. Optional. Specifes whether the authentication flow includes an option to sign up (create account) as well as sign in. Default value is false meaning only sign in is enabled. +// SetIsSignUpAllowed sets the isSignUpAllowed property value. Optional. Specifies whether the authentication flow includes an option to sign up (create account) and sign in. Default value is false meaning only sign in is enabled. func (m *OnInteractiveAuthFlowStartExternalUsersSelfServiceSignUp) SetIsSignUpAllowed(value *bool)() { err := m.GetBackingStore().Set("isSignUpAllowed", value) if err != nil { diff --git a/models/password_single_sign_on_field.go b/models/password_single_sign_on_field.go index 3350582feab..ebf27f9f3ba 100644 --- a/models/password_single_sign_on_field.go +++ b/models/password_single_sign_on_field.go @@ -115,7 +115,7 @@ func (m *PasswordSingleSignOnField) GetFieldDeserializers()(map[string]func(i878 } return res } -// GetFieldId gets the fieldId property value. Id used to identity the field type. This is an internal id and possible values are param1, param2, paramuserName, parampassword. +// GetFieldId gets the fieldId property value. Id used to identity the field type. This is an internal ID and possible values are param1, param2, paramuserName, parampassword. func (m *PasswordSingleSignOnField) GetFieldId()(*string) { val, err := m.GetBackingStore().Get("fieldId") if err != nil { @@ -213,7 +213,7 @@ func (m *PasswordSingleSignOnField) SetDefaultLabel(value *string)() { panic(err) } } -// SetFieldId sets the fieldId property value. Id used to identity the field type. This is an internal id and possible values are param1, param2, paramuserName, parampassword. +// SetFieldId sets the fieldId property value. Id used to identity the field type. This is an internal ID and possible values are param1, param2, paramuserName, parampassword. func (m *PasswordSingleSignOnField) SetFieldId(value *string)() { err := m.GetBackingStore().Set("fieldId", value) if err != nil { diff --git a/models/phone_authentication_method.go b/models/phone_authentication_method.go index 568f287831a..094b1e635a7 100644 --- a/models/phone_authentication_method.go +++ b/models/phone_authentication_method.go @@ -56,7 +56,7 @@ func (m *PhoneAuthenticationMethod) GetFieldDeserializers()(map[string]func(i878 } return res } -// GetPhoneNumber gets the phoneNumber property value. The phone number to text or call for authentication. Phone numbers use the format '+ x', with extension optional. For example, +1 5555551234 or +1 5555551234x123 are valid. Numbers are rejected when creating/updating if they do not match the required format. +// GetPhoneNumber gets the phoneNumber property value. The phone number to text or call for authentication. Phone numbers use the format '+ x', with extension optional. For example, +1 5555551234 or +1 5555551234x123 are valid. Numbers are rejected when creating/updating if they don't match the required format. func (m *PhoneAuthenticationMethod) GetPhoneNumber()(*string) { val, err := m.GetBackingStore().Get("phoneNumber") if err != nil { @@ -117,7 +117,7 @@ func (m *PhoneAuthenticationMethod) Serialize(writer i878a80d2330e89d26896388a3f } return nil } -// SetPhoneNumber sets the phoneNumber property value. The phone number to text or call for authentication. Phone numbers use the format '+ x', with extension optional. For example, +1 5555551234 or +1 5555551234x123 are valid. Numbers are rejected when creating/updating if they do not match the required format. +// SetPhoneNumber sets the phoneNumber property value. The phone number to text or call for authentication. Phone numbers use the format '+ x', with extension optional. For example, +1 5555551234 or +1 5555551234x123 are valid. Numbers are rejected when creating/updating if they don't match the required format. func (m *PhoneAuthenticationMethod) SetPhoneNumber(value *string)() { err := m.GetBackingStore().Set("phoneNumber", value) if err != nil { diff --git a/models/pkcs12_certificate_information.go b/models/pkcs12_certificate_information.go index 573d4604914..c6a4ec65929 100644 --- a/models/pkcs12_certificate_information.go +++ b/models/pkcs12_certificate_information.go @@ -93,7 +93,7 @@ func (m *Pkcs12CertificateInformation) GetFieldDeserializers()(map[string]func(i } return res } -// GetIsActive gets the isActive property value. 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. +// GetIsActive gets the isActive property value. 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. func (m *Pkcs12CertificateInformation) GetIsActive()(*bool) { val, err := m.GetBackingStore().Get("isActive") if err != nil { @@ -199,7 +199,7 @@ func (m *Pkcs12CertificateInformation) SetAdditionalData(value map[string]any)() func (m *Pkcs12CertificateInformation) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { m.backingStore = value } -// SetIsActive sets the isActive property value. 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. +// SetIsActive sets the isActive property value. 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. func (m *Pkcs12CertificateInformation) SetIsActive(value *bool)() { err := m.GetBackingStore().Set("isActive", value) if err != nil { diff --git a/models/risk_detection.go b/models/risk_detection.go index 5c2fb782a9a..ea34b174ae9 100644 --- a/models/risk_detection.go +++ b/models/risk_detection.go @@ -179,6 +179,16 @@ func (m *RiskDetection) GetFieldDeserializers()(map[string]func(i878a80d2330e89d } return nil } + res["mitreTechniqueId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMitreTechniqueId(val) + } + return nil + } res["requestId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -324,6 +334,17 @@ func (m *RiskDetection) GetLocation()(SignInLocationable) { } return nil } +// GetMitreTechniqueId gets the mitreTechniqueId property value. The mitreTechniqueId property +func (m *RiskDetection) GetMitreTechniqueId()(*string) { + val, err := m.GetBackingStore().Get("mitreTechniqueId") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} // GetRequestId gets the requestId property value. Request ID of the sign-in associated with the risk detection. This property is null if the risk detection is not associated with a sign-in. func (m *RiskDetection) GetRequestId()(*string) { val, err := m.GetBackingStore().Get("requestId") @@ -507,6 +528,12 @@ func (m *RiskDetection) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0 return err } } + { + err = writer.WriteStringValue("mitreTechniqueId", m.GetMitreTechniqueId()) + if err != nil { + return err + } + } { err = writer.WriteStringValue("requestId", m.GetRequestId()) if err != nil { @@ -643,6 +670,13 @@ func (m *RiskDetection) SetLocation(value SignInLocationable)() { panic(err) } } +// SetMitreTechniqueId sets the mitreTechniqueId property value. The mitreTechniqueId property +func (m *RiskDetection) SetMitreTechniqueId(value *string)() { + err := m.GetBackingStore().Set("mitreTechniqueId", value) + if err != nil { + panic(err) + } +} // SetRequestId sets the requestId property value. Request ID of the sign-in associated with the risk detection. This property is null if the risk detection is not associated with a sign-in. func (m *RiskDetection) SetRequestId(value *string)() { err := m.GetBackingStore().Set("requestId", value) @@ -733,6 +767,7 @@ type RiskDetectionable interface { GetIpAddress()(*string) GetLastUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) GetLocation()(SignInLocationable) + GetMitreTechniqueId()(*string) GetRequestId()(*string) GetRiskDetail()(*RiskDetail) GetRiskEventType()(*string) @@ -753,6 +788,7 @@ type RiskDetectionable interface { SetIpAddress(value *string)() SetLastUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() SetLocation(value SignInLocationable)() + SetMitreTechniqueId(value *string)() SetRequestId(value *string)() SetRiskDetail(value *RiskDetail)() SetRiskEventType(value *string)() diff --git a/models/search_hit.go b/models/search_hit.go index 4778c406995..ab2a41f3f47 100644 --- a/models/search_hit.go +++ b/models/search_hit.go @@ -22,17 +22,6 @@ func NewSearchHit()(*SearchHit) { func CreateSearchHitFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewSearchHit(), nil } -// Get_summary gets the _summary property value. The _summary property -func (m *SearchHit) Get_summary()(*string) { - val, err := m.GetBackingStore().Get("_summary") - if err != nil { - panic(err) - } - if val != nil { - return val.(*string) - } - return nil -} // GetAdditionalData gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. func (m *SearchHit) GetAdditionalData()(map[string]any) { val , err := m.backingStore.Get("additionalData") @@ -93,16 +82,6 @@ func (m *SearchHit) GetFieldDeserializers()(map[string]func(i878a80d2330e89d2689 } return nil } - res["_summary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.Set_summary(val) - } - return nil - } res["contentSource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -363,12 +342,6 @@ func (m *SearchHit) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c0 return err } } - { - err := writer.WriteStringValue("_summary", m.Get_summary()) - if err != nil { - return err - } - } { err := writer.WriteAdditionalData(m.GetAdditionalData()) if err != nil { @@ -377,13 +350,6 @@ func (m *SearchHit) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c0 } return nil } -// Set_summary sets the _summary property value. The _summary property -func (m *SearchHit) Set_summary(value *string)() { - err := m.GetBackingStore().Set("_summary", value) - if err != nil { - panic(err) - } -} // SetAdditionalData sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. func (m *SearchHit) SetAdditionalData(value map[string]any)() { err := m.GetBackingStore().Set("additionalData", value) @@ -477,7 +443,6 @@ type SearchHitable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - Get_summary()(*string) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) GetContentSource()(*string) GetHitId()(*string) @@ -490,7 +455,6 @@ type SearchHitable interface { GetScore()(*int32) GetSource()(Entityable) GetSummary()(*string) - Set_summary(value *string)() SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() SetContentSource(value *string)() SetHitId(value *string)() diff --git a/models/security/tenant_allow_or_block_list_action.go b/models/security/tenant_allow_or_block_list_action.go index 3427a0a9777..dbcccdef194 100644 --- a/models/security/tenant_allow_or_block_list_action.go +++ b/models/security/tenant_allow_or_block_list_action.go @@ -23,7 +23,7 @@ func NewTenantAllowOrBlockListAction()(*TenantAllowOrBlockListAction) { func CreateTenantAllowOrBlockListActionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewTenantAllowOrBlockListAction(), nil } -// GetAction gets the action property value. Specifies whether the tenant allow block list is an allow or block. The possible values are: allow, block, and unkownFutureValue. +// GetAction gets the action property value. Specifies whether the tenant allow-or-block list is an allow or block. The possible values are: allow, block, and unkownFutureValue. func (m *TenantAllowOrBlockListAction) GetAction()(*TenantAllowBlockListAction) { val, err := m.GetBackingStore().Get("action") if err != nil { @@ -122,7 +122,7 @@ func (m *TenantAllowOrBlockListAction) GetFieldDeserializers()(map[string]func(i } return res } -// GetNote gets the note property value. Specifies the note added to the tenant allow block list entry in the format of string. +// GetNote gets the note property value. Specifies the note added to the tenant allow-or-block list entry in the format of string. func (m *TenantAllowOrBlockListAction) GetNote()(*string) { val, err := m.GetBackingStore().Get("note") if err != nil { @@ -202,7 +202,7 @@ func (m *TenantAllowOrBlockListAction) Serialize(writer i878a80d2330e89d26896388 } return nil } -// SetAction sets the action property value. Specifies whether the tenant allow block list is an allow or block. The possible values are: allow, block, and unkownFutureValue. +// SetAction sets the action property value. Specifies whether the tenant allow-or-block list is an allow or block. The possible values are: allow, block, and unkownFutureValue. func (m *TenantAllowOrBlockListAction) SetAction(value *TenantAllowBlockListAction)() { err := m.GetBackingStore().Set("action", value) if err != nil { @@ -227,7 +227,7 @@ func (m *TenantAllowOrBlockListAction) SetExpirationDateTime(value *i336074805fc panic(err) } } -// SetNote sets the note property value. Specifies the note added to the tenant allow block list entry in the format of string. +// SetNote sets the note property value. Specifies the note added to the tenant allow-or-block list entry in the format of string. func (m *TenantAllowOrBlockListAction) SetNote(value *string)() { err := m.GetBackingStore().Set("note", value) if err != nil { diff --git a/models/service_principal_risk_detection.go b/models/service_principal_risk_detection.go index 6c69a8caa7b..0ea9c8c9472 100644 --- a/models/service_principal_risk_detection.go +++ b/models/service_principal_risk_detection.go @@ -216,6 +216,16 @@ func (m *ServicePrincipalRiskDetection) GetFieldDeserializers()(map[string]func( } return nil } + res["mitreTechniqueId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMitreTechniqueId(val) + } + return nil + } res["requestId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -352,6 +362,17 @@ func (m *ServicePrincipalRiskDetection) GetLocation()(SignInLocationable) { } return nil } +// GetMitreTechniqueId gets the mitreTechniqueId property value. The mitreTechniqueId property +func (m *ServicePrincipalRiskDetection) GetMitreTechniqueId()(*string) { + val, err := m.GetBackingStore().Get("mitreTechniqueId") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} // GetRequestId gets the requestId property value. Request identifier of the sign-in activity associated with the risk detection. This property is null if the risk detection is not associated with a sign-in activity. Supports $filter (eq). func (m *ServicePrincipalRiskDetection) GetRequestId()(*string) { val, err := m.GetBackingStore().Get("requestId") @@ -525,6 +546,12 @@ func (m *ServicePrincipalRiskDetection) Serialize(writer i878a80d2330e89d2689638 return err } } + { + err = writer.WriteStringValue("mitreTechniqueId", m.GetMitreTechniqueId()) + if err != nil { + return err + } + } { err = writer.WriteStringValue("requestId", m.GetRequestId()) if err != nil { @@ -662,6 +689,13 @@ func (m *ServicePrincipalRiskDetection) SetLocation(value SignInLocationable)() panic(err) } } +// SetMitreTechniqueId sets the mitreTechniqueId property value. The mitreTechniqueId property +func (m *ServicePrincipalRiskDetection) SetMitreTechniqueId(value *string)() { + err := m.GetBackingStore().Set("mitreTechniqueId", value) + if err != nil { + panic(err) + } +} // SetRequestId sets the requestId property value. Request identifier of the sign-in activity associated with the risk detection. This property is null if the risk detection is not associated with a sign-in activity. Supports $filter (eq). func (m *ServicePrincipalRiskDetection) SetRequestId(value *string)() { err := m.GetBackingStore().Set("requestId", value) @@ -740,6 +774,7 @@ type ServicePrincipalRiskDetectionable interface { GetKeyIds()([]string) GetLastUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) GetLocation()(SignInLocationable) + GetMitreTechniqueId()(*string) GetRequestId()(*string) GetRiskDetail()(*RiskDetail) GetRiskEventType()(*string) @@ -760,6 +795,7 @@ type ServicePrincipalRiskDetectionable interface { SetKeyIds(value []string)() SetLastUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() SetLocation(value SignInLocationable)() + SetMitreTechniqueId(value *string)() SetRequestId(value *string)() SetRiskDetail(value *RiskDetail)() SetRiskEventType(value *string)() diff --git a/models/service_provisioning_error_collection_response.go b/models/service_provisioning_error_collection_response.go new file mode 100644 index 00000000000..7456e5f2c20 --- /dev/null +++ b/models/service_provisioning_error_collection_response.go @@ -0,0 +1,87 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServiceProvisioningErrorCollectionResponse +type ServiceProvisioningErrorCollectionResponse struct { + BaseCollectionPaginationCountResponse +} +// NewServiceProvisioningErrorCollectionResponse instantiates a new serviceProvisioningErrorCollectionResponse and sets the default values. +func NewServiceProvisioningErrorCollectionResponse()(*ServiceProvisioningErrorCollectionResponse) { + m := &ServiceProvisioningErrorCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewServiceProvisioningErrorCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ServiceProvisioningErrorCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateServiceProvisioningErrorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ServiceProvisioningErrorable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ServiceProvisioningErrorable) + } + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ServiceProvisioningErrorCollectionResponse) GetValue()([]ServiceProvisioningErrorable) { + val, err := m.GetBackingStore().Get("value") + if err != nil { + panic(err) + } + if val != nil { + return val.([]ServiceProvisioningErrorable) + } + return nil +} +// Serialize serializes information the current object +func (m *ServiceProvisioningErrorCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ServiceProvisioningErrorCollectionResponse) SetValue(value []ServiceProvisioningErrorable)() { + err := m.GetBackingStore().Set("value", value) + if err != nil { + panic(err) + } +} +// ServiceProvisioningErrorCollectionResponseable +type ServiceProvisioningErrorCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ServiceProvisioningErrorable) + SetValue(value []ServiceProvisioningErrorable)() +} diff --git a/models/sign_in.go b/models/sign_in.go index 08fabfbfdcb..a80f934d842 100644 --- a/models/sign_in.go +++ b/models/sign_in.go @@ -20,7 +20,7 @@ func NewSignIn()(*SignIn) { func CreateSignInFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewSignIn(), nil } -// GetAppDisplayName gets the appDisplayName property value. The application name displayed in the Azure portal. Supports $filter (eq, startsWith). +// GetAppDisplayName gets the appDisplayName property value. The application name displayed in the Microsoft Entra admin center. Supports $filter (eq, startsWith). func (m *SignIn) GetAppDisplayName()(*string) { val, err := m.GetBackingStore().Get("appDisplayName") if err != nil { @@ -1983,7 +1983,7 @@ func (m *SignIn) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c } return nil } -// SetAppDisplayName sets the appDisplayName property value. The application name displayed in the Azure portal. Supports $filter (eq, startsWith). +// SetAppDisplayName sets the appDisplayName property value. The application name displayed in the Microsoft Entra admin center. Supports $filter (eq, startsWith). func (m *SignIn) SetAppDisplayName(value *string)() { err := m.GetBackingStore().Set("appDisplayName", value) if err != nil { diff --git a/models/subject_rights_request.go b/models/subject_rights_request.go index ef847ecfe50..d77a7d5b705 100644 --- a/models/subject_rights_request.go +++ b/models/subject_rights_request.go @@ -363,13 +363,13 @@ func (m *SubjectRightsRequest) GetFieldDeserializers()(map[string]func(i878a80d2 } return nil } - res["mailboxlocations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + res["mailboxLocations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(CreateSubjectRightsRequestMailboxLocationFromDiscriminatorValue) if err != nil { return err } if val != nil { - m.SetMailboxlocations(val.(SubjectRightsRequestMailboxLocationable)) + m.SetMailboxLocations(val.(SubjectRightsRequestMailboxLocationable)) } return nil } @@ -415,13 +415,13 @@ func (m *SubjectRightsRequest) GetFieldDeserializers()(map[string]func(i878a80d2 } return nil } - res["sitelocations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + res["siteLocations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(CreateSubjectRightsRequestSiteLocationFromDiscriminatorValue) if err != nil { return err } if val != nil { - m.SetSitelocations(val.(SubjectRightsRequestSiteLocationable)) + m.SetSiteLocations(val.(SubjectRightsRequestSiteLocationable)) } return nil } @@ -484,7 +484,7 @@ func (m *SubjectRightsRequest) GetHistory()([]SubjectRightsRequestHistoryable) { } return nil } -// GetIncludeAllVersions gets the includeAllVersions property value. Include all versions of the documents. By default, the current copies of the documents will be returned. If SharePoint sites have versioning enabled, including all versions will include 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. +// GetIncludeAllVersions gets the includeAllVersions property value. Include all versions of the documents. By default, the current copies of the documents will be returned. If SharePoint sites have versioning enabled, including all versions include 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. func (m *SubjectRightsRequest) GetIncludeAllVersions()(*bool) { val, err := m.GetBackingStore().Get("includeAllVersions") if err != nil { @@ -550,9 +550,9 @@ func (m *SubjectRightsRequest) GetLastModifiedDateTime()(*i336074805fc853987abe6 } return nil } -// GetMailboxlocations gets the mailboxlocations property value. The mailboxlocations property -func (m *SubjectRightsRequest) GetMailboxlocations()(SubjectRightsRequestMailboxLocationable) { - val, err := m.GetBackingStore().Get("mailboxlocations") +// GetMailboxLocations gets the mailboxLocations property value. 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. +func (m *SubjectRightsRequest) GetMailboxLocations()(SubjectRightsRequestMailboxLocationable) { + val, err := m.GetBackingStore().Get("mailboxLocations") if err != nil { panic(err) } @@ -572,7 +572,7 @@ func (m *SubjectRightsRequest) GetNotes()([]AuthoredNoteable) { } return nil } -// GetPauseAfterEstimate gets the pauseAfterEstimate property value. Pause the request after estimate has finished. By default, the data estimate will run and then pause, 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. +// GetPauseAfterEstimate gets the pauseAfterEstimate property value. 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. func (m *SubjectRightsRequest) GetPauseAfterEstimate()(*bool) { val, err := m.GetBackingStore().Get("pauseAfterEstimate") if err != nil { @@ -583,7 +583,7 @@ func (m *SubjectRightsRequest) GetPauseAfterEstimate()(*bool) { } return nil } -// GetRegulations gets the regulations property value. List of regulations that this request will fulfill. +// GetRegulations gets the regulations property value. List of regulations that this request fulfills. func (m *SubjectRightsRequest) GetRegulations()([]string) { val, err := m.GetBackingStore().Get("regulations") if err != nil { @@ -594,9 +594,9 @@ func (m *SubjectRightsRequest) GetRegulations()([]string) { } return nil } -// GetSitelocations gets the sitelocations property value. The sitelocations property -func (m *SubjectRightsRequest) GetSitelocations()(SubjectRightsRequestSiteLocationable) { - val, err := m.GetBackingStore().Get("sitelocations") +// GetSiteLocations gets the siteLocations property value. 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. +func (m *SubjectRightsRequest) GetSiteLocations()(SubjectRightsRequestSiteLocationable) { + val, err := m.GetBackingStore().Get("siteLocations") if err != nil { panic(err) } @@ -789,7 +789,7 @@ func (m *SubjectRightsRequest) Serialize(writer i878a80d2330e89d26896388a3f487ee } } { - err = writer.WriteObjectValue("mailboxlocations", m.GetMailboxlocations()) + err = writer.WriteObjectValue("mailboxLocations", m.GetMailboxLocations()) if err != nil { return err } @@ -819,7 +819,7 @@ func (m *SubjectRightsRequest) Serialize(writer i878a80d2330e89d26896388a3f487ee } } { - err = writer.WriteObjectValue("sitelocations", m.GetSitelocations()) + err = writer.WriteObjectValue("siteLocations", m.GetSiteLocations()) if err != nil { return err } @@ -949,7 +949,7 @@ func (m *SubjectRightsRequest) SetHistory(value []SubjectRightsRequestHistoryabl panic(err) } } -// SetIncludeAllVersions sets the includeAllVersions property value. Include all versions of the documents. By default, the current copies of the documents will be returned. If SharePoint sites have versioning enabled, including all versions will include 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. +// SetIncludeAllVersions sets the includeAllVersions property value. Include all versions of the documents. By default, the current copies of the documents will be returned. If SharePoint sites have versioning enabled, including all versions include 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. func (m *SubjectRightsRequest) SetIncludeAllVersions(value *bool)() { err := m.GetBackingStore().Set("includeAllVersions", value) if err != nil { @@ -991,9 +991,9 @@ func (m *SubjectRightsRequest) SetLastModifiedDateTime(value *i336074805fc853987 panic(err) } } -// SetMailboxlocations sets the mailboxlocations property value. The mailboxlocations property -func (m *SubjectRightsRequest) SetMailboxlocations(value SubjectRightsRequestMailboxLocationable)() { - err := m.GetBackingStore().Set("mailboxlocations", value) +// SetMailboxLocations sets the mailboxLocations property value. 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. +func (m *SubjectRightsRequest) SetMailboxLocations(value SubjectRightsRequestMailboxLocationable)() { + err := m.GetBackingStore().Set("mailboxLocations", value) if err != nil { panic(err) } @@ -1005,23 +1005,23 @@ func (m *SubjectRightsRequest) SetNotes(value []AuthoredNoteable)() { panic(err) } } -// SetPauseAfterEstimate sets the pauseAfterEstimate property value. Pause the request after estimate has finished. By default, the data estimate will run and then pause, 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. +// SetPauseAfterEstimate sets the pauseAfterEstimate property value. 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. func (m *SubjectRightsRequest) SetPauseAfterEstimate(value *bool)() { err := m.GetBackingStore().Set("pauseAfterEstimate", value) if err != nil { panic(err) } } -// SetRegulations sets the regulations property value. List of regulations that this request will fulfill. +// SetRegulations sets the regulations property value. List of regulations that this request fulfills. func (m *SubjectRightsRequest) SetRegulations(value []string)() { err := m.GetBackingStore().Set("regulations", value) if err != nil { panic(err) } } -// SetSitelocations sets the sitelocations property value. The sitelocations property -func (m *SubjectRightsRequest) SetSitelocations(value SubjectRightsRequestSiteLocationable)() { - err := m.GetBackingStore().Set("sitelocations", value) +// SetSiteLocations sets the siteLocations property value. 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. +func (m *SubjectRightsRequest) SetSiteLocations(value SubjectRightsRequestSiteLocationable)() { + err := m.GetBackingStore().Set("siteLocations", value) if err != nil { panic(err) } @@ -1077,11 +1077,11 @@ type SubjectRightsRequestable interface { GetInternalDueDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) GetLastModifiedBy()(IdentitySetable) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) - GetMailboxlocations()(SubjectRightsRequestMailboxLocationable) + GetMailboxLocations()(SubjectRightsRequestMailboxLocationable) GetNotes()([]AuthoredNoteable) GetPauseAfterEstimate()(*bool) GetRegulations()([]string) - GetSitelocations()(SubjectRightsRequestSiteLocationable) + GetSiteLocations()(SubjectRightsRequestSiteLocationable) GetStages()([]SubjectRightsRequestStageDetailable) GetStatus()(*SubjectRightsRequestStatus) GetTeam()(Teamable) @@ -1105,11 +1105,11 @@ type SubjectRightsRequestable interface { SetInternalDueDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() SetLastModifiedBy(value IdentitySetable)() SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() - SetMailboxlocations(value SubjectRightsRequestMailboxLocationable)() + SetMailboxLocations(value SubjectRightsRequestMailboxLocationable)() SetNotes(value []AuthoredNoteable)() SetPauseAfterEstimate(value *bool)() SetRegulations(value []string)() - SetSitelocations(value SubjectRightsRequestSiteLocationable)() + SetSiteLocations(value SubjectRightsRequestSiteLocationable)() SetStages(value []SubjectRightsRequestStageDetailable)() SetStatus(value *SubjectRightsRequestStatus)() SetTeam(value Teamable)() diff --git a/models/synchronization_job_restart_criteria.go b/models/synchronization_job_restart_criteria.go index 98e7bdf6ae8..0c97953923d 100644 --- a/models/synchronization_job_restart_criteria.go +++ b/models/synchronization_job_restart_criteria.go @@ -74,7 +74,7 @@ func (m *SynchronizationJobRestartCriteria) GetOdataType()(*string) { } return nil } -// GetResetScope gets the resetScope property value. 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. +// GetResetScope gets the resetScope property value. 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 Microsoft Entra admin center. It is similar to setting the resetScope to include QuarantineState, Watermark, and Escrows. This option meets most customer needs. func (m *SynchronizationJobRestartCriteria) GetResetScope()(*SynchronizationJobRestartScope) { val, err := m.GetBackingStore().Get("resetScope") if err != nil { @@ -126,7 +126,7 @@ func (m *SynchronizationJobRestartCriteria) SetOdataType(value *string)() { panic(err) } } -// SetResetScope sets the resetScope property value. 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. +// SetResetScope sets the resetScope property value. 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 Microsoft Entra admin center. It is similar to setting the resetScope to include QuarantineState, Watermark, and Escrows. This option meets most customer needs. func (m *SynchronizationJobRestartCriteria) SetResetScope(value *SynchronizationJobRestartScope)() { err := m.GetBackingStore().Set("resetScope", value) if err != nil { diff --git a/models/synchronization_template.go b/models/synchronization_template.go index 7ec420d1c89..812cca86525 100644 --- a/models/synchronization_template.go +++ b/models/synchronization_template.go @@ -156,7 +156,7 @@ func (m *SynchronizationTemplate) GetFieldDeserializers()(map[string]func(i878a8 } return res } -// GetMetadata gets the metadata property value. Additional extension properties. Unless mentioned explicitly, metadata values should not be changed. +// GetMetadata gets the metadata property value. Additional extension properties. Unless mentioned explicitly, metadata values shouldn't be changed. func (m *SynchronizationTemplate) GetMetadata()([]SynchronizationMetadataEntryable) { val, err := m.GetBackingStore().Get("metadata") if err != nil { @@ -269,7 +269,7 @@ func (m *SynchronizationTemplate) SetFactoryTag(value *string)() { panic(err) } } -// SetMetadata sets the metadata property value. Additional extension properties. Unless mentioned explicitly, metadata values should not be changed. +// SetMetadata sets the metadata property value. Additional extension properties. Unless mentioned explicitly, metadata values shouldn't be changed. func (m *SynchronizationTemplate) SetMetadata(value []SynchronizationMetadataEntryable)() { err := m.GetBackingStore().Set("metadata", value) if err != nil { diff --git a/models/term_column.go b/models/term_column.go index a22bd91c37a..4ad201c6b1d 100644 --- a/models/term_column.go +++ b/models/term_column.go @@ -34,7 +34,7 @@ func (m *TermColumn) GetAdditionalData()(map[string]any) { } return val.(map[string]any) } -// GetAllowMultipleValues gets the allowMultipleValues property value. Specifies whether the column will allow more than one value +// GetAllowMultipleValues gets the allowMultipleValues property value. Specifies whether the column allows more than one value func (m *TermColumn) GetAllowMultipleValues()(*bool) { val, err := m.GetBackingStore().Get("allowMultipleValues") if err != nil { @@ -141,7 +141,7 @@ func (m *TermColumn) SetAdditionalData(value map[string]any)() { panic(err) } } -// SetAllowMultipleValues sets the allowMultipleValues property value. Specifies whether the column will allow more than one value +// SetAllowMultipleValues sets the allowMultipleValues property value. Specifies whether the column allows more than one value func (m *TermColumn) SetAllowMultipleValues(value *bool)() { err := m.GetBackingStore().Set("allowMultipleValues", value) if err != nil { diff --git a/models/ti_indicator.go b/models/ti_indicator.go index 100f0d83a1f..6aa3202c0ac 100644 --- a/models/ti_indicator.go +++ b/models/ti_indicator.go @@ -42,7 +42,7 @@ func (m *TiIndicator) GetActivityGroupNames()([]string) { } return nil } -// GetAdditionalInformation gets the additionalInformation property value. A catchall area into which extra data from the indicator not covered by the other tiIndicator properties may be placed. Data placed into additionalInformation will typically not be utilized by the targetProduct security tool. +// GetAdditionalInformation gets the additionalInformation property value. A catchall area for extra data from the indicator that is not specifically covered by other tiIndicator properties. The security tool specified by targetProduct typically does not utilize this data. func (m *TiIndicator) GetAdditionalInformation()(*string) { val, err := m.GetBackingStore().Get("additionalInformation") if err != nil { @@ -1641,7 +1641,7 @@ func (m *TiIndicator) SetActivityGroupNames(value []string)() { panic(err) } } -// SetAdditionalInformation sets the additionalInformation property value. A catchall area into which extra data from the indicator not covered by the other tiIndicator properties may be placed. Data placed into additionalInformation will typically not be utilized by the targetProduct security tool. +// SetAdditionalInformation sets the additionalInformation property value. A catchall area for extra data from the indicator that is not specifically covered by other tiIndicator properties. The security tool specified by targetProduct typically does not utilize this data. func (m *TiIndicator) SetAdditionalInformation(value *string)() { err := m.GetBackingStore().Set("additionalInformation", value) if err != nil { diff --git a/models/trusted_certificate_authority_as_entity_base.go b/models/trusted_certificate_authority_as_entity_base.go index df13e0cb6f8..a71ed459234 100644 --- a/models/trusted_certificate_authority_as_entity_base.go +++ b/models/trusted_certificate_authority_as_entity_base.go @@ -60,7 +60,7 @@ func (m *TrustedCertificateAuthorityAsEntityBase) GetFieldDeserializers()(map[st } return res } -// GetTrustedCertificateAuthorities gets the trustedCertificateAuthorities property value. Collection of trusted certificate authorities. +// GetTrustedCertificateAuthorities gets the trustedCertificateAuthorities property value. The trustedCertificateAuthorities property func (m *TrustedCertificateAuthorityAsEntityBase) GetTrustedCertificateAuthorities()([]CertificateAuthorityAsEntityable) { val, err := m.GetBackingStore().Get("trustedCertificateAuthorities") if err != nil { @@ -91,7 +91,7 @@ func (m *TrustedCertificateAuthorityAsEntityBase) Serialize(writer i878a80d2330e } return nil } -// SetTrustedCertificateAuthorities sets the trustedCertificateAuthorities property value. Collection of trusted certificate authorities. +// SetTrustedCertificateAuthorities sets the trustedCertificateAuthorities property value. The trustedCertificateAuthorities property func (m *TrustedCertificateAuthorityAsEntityBase) SetTrustedCertificateAuthorities(value []CertificateAuthorityAsEntityable)() { err := m.GetBackingStore().Set("trustedCertificateAuthorities", value) if err != nil { diff --git a/models/unified_rbac_resource_namespace.go b/models/unified_rbac_resource_namespace.go index 55a7a41d37a..333c0074645 100644 --- a/models/unified_rbac_resource_namespace.go +++ b/models/unified_rbac_resource_namespace.go @@ -61,7 +61,7 @@ func (m *UnifiedRbacResourceNamespace) GetName()(*string) { } return nil } -// GetResourceActions gets the resourceActions property value. Operations that an authorized principal are allowed to perform. +// GetResourceActions gets the resourceActions property value. Operations that an authorized principal is allowed to perform. func (m *UnifiedRbacResourceNamespace) GetResourceActions()([]UnifiedRbacResourceActionable) { val, err := m.GetBackingStore().Get("resourceActions") if err != nil { @@ -105,7 +105,7 @@ func (m *UnifiedRbacResourceNamespace) SetName(value *string)() { panic(err) } } -// SetResourceActions sets the resourceActions property value. Operations that an authorized principal are allowed to perform. +// SetResourceActions sets the resourceActions property value. Operations that an authorized principal is allowed to perform. func (m *UnifiedRbacResourceNamespace) SetResourceActions(value []UnifiedRbacResourceActionable)() { err := m.GetBackingStore().Set("resourceActions", value) if err != nil { diff --git a/models/unified_role_management_alert_definition.go b/models/unified_role_management_alert_definition.go index bddf9b63034..ebaf59a54f9 100644 --- a/models/unified_role_management_alert_definition.go +++ b/models/unified_role_management_alert_definition.go @@ -30,7 +30,7 @@ func (m *UnifiedRoleManagementAlertDefinition) GetDescription()(*string) { } return nil } -// GetDisplayName gets the displayName property value. The friendly display name that renders in Privileged Identity Management (PIM) alerts in the Azure portal. +// GetDisplayName gets the displayName property value. The friendly display name that renders in Privileged Identity Management (PIM) alerts in the Microsoft Entra admin center. func (m *UnifiedRoleManagementAlertDefinition) GetDisplayName()(*string) { val, err := m.GetBackingStore().Get("displayName") if err != nil { @@ -157,7 +157,7 @@ func (m *UnifiedRoleManagementAlertDefinition) GetHowToPrevent()(*string) { } return nil } -// GetIsConfigurable gets the isConfigurable property value. true if the alert configuration can be customized in the tenant, and false otherwise. For example, the number and percentage thresholds of the 'There are too many global administrators' alert can be configured by users, while the 'This organization does not have Azure AD Premium P2' cannot be configured, because the criteria is restricted. +// GetIsConfigurable gets the isConfigurable property value. true if the alert configuration can be customized in the tenant, and false otherwise. For example, the number and percentage thresholds of the 'There are too many global administrators' alert can be configured by users, while the 'This organization doesn't have Azure AD Premium P2' can't be configured, because the criteria are restricted. func (m *UnifiedRoleManagementAlertDefinition) GetIsConfigurable()(*bool) { val, err := m.GetBackingStore().Get("isConfigurable") if err != nil { @@ -310,7 +310,7 @@ func (m *UnifiedRoleManagementAlertDefinition) SetDescription(value *string)() { panic(err) } } -// SetDisplayName sets the displayName property value. The friendly display name that renders in Privileged Identity Management (PIM) alerts in the Azure portal. +// SetDisplayName sets the displayName property value. The friendly display name that renders in Privileged Identity Management (PIM) alerts in the Microsoft Entra admin center. func (m *UnifiedRoleManagementAlertDefinition) SetDisplayName(value *string)() { err := m.GetBackingStore().Set("displayName", value) if err != nil { @@ -324,7 +324,7 @@ func (m *UnifiedRoleManagementAlertDefinition) SetHowToPrevent(value *string)() panic(err) } } -// SetIsConfigurable sets the isConfigurable property value. true if the alert configuration can be customized in the tenant, and false otherwise. For example, the number and percentage thresholds of the 'There are too many global administrators' alert can be configured by users, while the 'This organization does not have Azure AD Premium P2' cannot be configured, because the criteria is restricted. +// SetIsConfigurable sets the isConfigurable property value. true if the alert configuration can be customized in the tenant, and false otherwise. For example, the number and percentage thresholds of the 'There are too many global administrators' alert can be configured by users, while the 'This organization doesn't have Azure AD Premium P2' can't be configured, because the criteria are restricted. func (m *UnifiedRoleManagementAlertDefinition) SetIsConfigurable(value *bool)() { err := m.GetBackingStore().Set("isConfigurable", value) if err != nil { diff --git a/models/upload_session.go b/models/upload_session.go index 05e45a5e128..2accf9d2a5e 100644 --- a/models/upload_session.go +++ b/models/upload_session.go @@ -101,7 +101,7 @@ func (m *UploadSession) GetFieldDeserializers()(map[string]func(i878a80d2330e89d } return res } -// GetNextExpectedRanges gets the nextExpectedRanges property value. When uploading files to document libraries, this is 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. +// GetNextExpectedRanges gets the nextExpectedRanges property value. When uploading files to document libraries, this is 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. func (m *UploadSession) GetNextExpectedRanges()([]string) { val, err := m.GetBackingStore().Get("nextExpectedRanges") if err != nil { @@ -186,7 +186,7 @@ func (m *UploadSession) SetExpirationDateTime(value *i336074805fc853987abe6f7fe3 panic(err) } } -// SetNextExpectedRanges sets the nextExpectedRanges property value. When uploading files to document libraries, this is 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. +// SetNextExpectedRanges sets the nextExpectedRanges property value. When uploading files to document libraries, this is 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. func (m *UploadSession) SetNextExpectedRanges(value []string)() { err := m.GetBackingStore().Set("nextExpectedRanges", value) if err != nil { diff --git a/models/user.go b/models/user.go index 868c08304dd..a41fcb6830e 100644 --- a/models/user.go +++ b/models/user.go @@ -3319,7 +3319,7 @@ func (m *User) GetRefreshTokensValidFromDateTime()(*i336074805fc853987abe6f7fe3a } return nil } -// GetRegisteredDevices gets the registeredDevices property value. Devices that are registered for the user. Read-only. Nullable. Supports $expand. +// GetRegisteredDevices gets the registeredDevices property value. Devices that are registered for the user. Read-only. Nullable. Supports $expand and returns up to 100 objects. func (m *User) GetRegisteredDevices()([]DirectoryObjectable) { val, err := m.GetBackingStore().Get("registeredDevices") if err != nil { @@ -5726,7 +5726,7 @@ func (m *User) SetRefreshTokensValidFromDateTime(value *i336074805fc853987abe6f7 panic(err) } } -// SetRegisteredDevices sets the registeredDevices property value. Devices that are registered for the user. Read-only. Nullable. Supports $expand. +// SetRegisteredDevices sets the registeredDevices property value. Devices that are registered for the user. Read-only. Nullable. Supports $expand and returns up to 100 objects. func (m *User) SetRegisteredDevices(value []DirectoryObjectable)() { err := m.GetBackingStore().Set("registeredDevices", value) if err != nil { diff --git a/models/vendor_escaped.go b/models/vendor_escaped.go index a28805fc91b..039587f8c5e 100644 --- a/models/vendor_escaped.go +++ b/models/vendor_escaped.go @@ -792,53 +792,3 @@ func (m *VendorEscaped) SetWebsite(value *string)() { panic(err) } } -// VendorEscapedable -type VendorEscapedable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder - ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetAddress()(PostalAddressTypeable) - GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) - GetBalance()(*float64) - GetBlocked()(*string) - GetCurrency()(Currencyable) - GetCurrencyCode()(*string) - GetCurrencyId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) - GetDisplayName()(*string) - GetEmail()(*string) - GetId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) - GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) - GetNumber()(*string) - GetOdataType()(*string) - GetPaymentMethod()(PaymentMethodable) - GetPaymentMethodId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) - GetPaymentTerm()(PaymentTermable) - GetPaymentTermsId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) - GetPhoneNumber()(*string) - GetPicture()([]Pictureable) - GetTaxLiable()(*bool) - GetTaxRegistrationNumber()(*string) - GetWebsite()(*string) - SetAddress(value PostalAddressTypeable)() - SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() - SetBalance(value *float64)() - SetBlocked(value *string)() - SetCurrency(value Currencyable)() - SetCurrencyCode(value *string)() - SetCurrencyId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() - SetDisplayName(value *string)() - SetEmail(value *string)() - SetId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() - SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() - SetNumber(value *string)() - SetOdataType(value *string)() - SetPaymentMethod(value PaymentMethodable)() - SetPaymentMethodId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() - SetPaymentTerm(value PaymentTermable)() - SetPaymentTermsId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() - SetPhoneNumber(value *string)() - SetPicture(value []Pictureable)() - SetTaxLiable(value *bool)() - SetTaxRegistrationNumber(value *string)() - SetWebsite(value *string)() -} diff --git a/models/vendor_escapedable.go b/models/vendor_escapedable.go new file mode 100644 index 00000000000..54b10410140 --- /dev/null +++ b/models/vendor_escapedable.go @@ -0,0 +1,59 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +// VendorEscapedable +type VendorEscapedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAddress()(PostalAddressTypeable) + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetBalance()(*float64) + GetBlocked()(*string) + GetCurrency()(Currencyable) + GetCurrencyCode()(*string) + GetCurrencyId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetDisplayName()(*string) + GetEmail()(*string) + GetId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetNumber()(*string) + GetOdataType()(*string) + GetPaymentMethod()(PaymentMethodable) + GetPaymentMethodId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetPaymentTerm()(PaymentTermable) + GetPaymentTermsId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetPhoneNumber()(*string) + GetPicture()([]Pictureable) + GetTaxLiable()(*bool) + GetTaxRegistrationNumber()(*string) + GetWebsite()(*string) + SetAddress(value PostalAddressTypeable)() + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetBalance(value *float64)() + SetBlocked(value *string)() + SetCurrency(value Currencyable)() + SetCurrencyCode(value *string)() + SetCurrencyId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetDisplayName(value *string)() + SetEmail(value *string)() + SetId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetNumber(value *string)() + SetOdataType(value *string)() + SetPaymentMethod(value PaymentMethodable)() + SetPaymentMethodId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetPaymentTerm(value PaymentTermable)() + SetPaymentTermsId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetPhoneNumber(value *string)() + SetPicture(value []Pictureable)() + SetTaxLiable(value *bool)() + SetTaxRegistrationNumber(value *string)() + SetWebsite(value *string)() +} diff --git a/models/virtual_event_registration.go b/models/virtual_event_registration.go index cf66ea14511..7d71abd75c0 100644 --- a/models/virtual_event_registration.go +++ b/models/virtual_event_registration.go @@ -20,7 +20,7 @@ func NewVirtualEventRegistration()(*VirtualEventRegistration) { func CreateVirtualEventRegistrationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewVirtualEventRegistration(), nil } -// GetCancelationDateTime gets the cancelationDateTime property value. The cancelationDateTime property +// GetCancelationDateTime gets the cancelationDateTime property value. Date and time when the registrant cancels their registration for the virtual event. Only appears when applicable. 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. func (m *VirtualEventRegistration) GetCancelationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { val, err := m.GetBackingStore().Get("cancelationDateTime") if err != nil { @@ -31,7 +31,7 @@ func (m *VirtualEventRegistration) GetCancelationDateTime()(*i336074805fc853987a } return nil } -// GetEmail gets the email property value. The email property +// GetEmail gets the email property value. Email address of the registrant. func (m *VirtualEventRegistration) GetEmail()(*string) { val, err := m.GetBackingStore().Get("email") if err != nil { @@ -149,7 +149,7 @@ func (m *VirtualEventRegistration) GetFieldDeserializers()(map[string]func(i878a } return res } -// GetFirstName gets the firstName property value. The firstName property +// GetFirstName gets the firstName property value. First name of the registrant. func (m *VirtualEventRegistration) GetFirstName()(*string) { val, err := m.GetBackingStore().Get("firstName") if err != nil { @@ -160,7 +160,7 @@ func (m *VirtualEventRegistration) GetFirstName()(*string) { } return nil } -// GetLastName gets the lastName property value. The lastName property +// GetLastName gets the lastName property value. Last name of the registrant. func (m *VirtualEventRegistration) GetLastName()(*string) { val, err := m.GetBackingStore().Get("lastName") if err != nil { @@ -171,7 +171,7 @@ func (m *VirtualEventRegistration) GetLastName()(*string) { } return nil } -// GetRegistrationDateTime gets the registrationDateTime property value. The registrationDateTime property +// GetRegistrationDateTime gets the registrationDateTime property value. Date and time when the registrant registers for the virtual event. 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. func (m *VirtualEventRegistration) GetRegistrationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { val, err := m.GetBackingStore().Get("registrationDateTime") if err != nil { @@ -182,7 +182,7 @@ func (m *VirtualEventRegistration) GetRegistrationDateTime()(*i336074805fc853987 } return nil } -// GetRegistrationQuestionAnswers gets the registrationQuestionAnswers property value. The registrationQuestionAnswers property +// GetRegistrationQuestionAnswers gets the registrationQuestionAnswers property value. The registrant's answer to the registration questions. func (m *VirtualEventRegistration) GetRegistrationQuestionAnswers()([]VirtualEventRegistrationQuestionAnswerable) { val, err := m.GetBackingStore().Get("registrationQuestionAnswers") if err != nil { @@ -193,7 +193,7 @@ func (m *VirtualEventRegistration) GetRegistrationQuestionAnswers()([]VirtualEve } return nil } -// GetSessions gets the sessions property value. The sessions property +// GetSessions gets the sessions property value. Sessions of the webinar. func (m *VirtualEventRegistration) GetSessions()([]VirtualEventSessionable) { val, err := m.GetBackingStore().Get("sessions") if err != nil { @@ -204,7 +204,7 @@ func (m *VirtualEventRegistration) GetSessions()([]VirtualEventSessionable) { } return nil } -// GetStatus gets the status property value. The status property +// GetStatus gets the status property value. Registration status of the registrant. Read-only. Possible values are: registered, canceled, waitlisted, pendingApproval, rejectedByOrganizer, unknownFutureValue. func (m *VirtualEventRegistration) GetStatus()(*VirtualEventAttendeeRegistrationStatus) { val, err := m.GetBackingStore().Get("status") if err != nil { @@ -215,7 +215,7 @@ func (m *VirtualEventRegistration) GetStatus()(*VirtualEventAttendeeRegistration } return nil } -// GetUserId gets the userId property value. The userId property +// GetUserId gets the userId property value. The registrant's ID in Azure Active Directory (Azure AD). Only appears when the registrant is registered in Azure AD. func (m *VirtualEventRegistration) GetUserId()(*string) { val, err := m.GetBackingStore().Get("userId") if err != nil { @@ -301,63 +301,63 @@ func (m *VirtualEventRegistration) Serialize(writer i878a80d2330e89d26896388a3f4 } return nil } -// SetCancelationDateTime sets the cancelationDateTime property value. The cancelationDateTime property +// SetCancelationDateTime sets the cancelationDateTime property value. Date and time when the registrant cancels their registration for the virtual event. Only appears when applicable. 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. func (m *VirtualEventRegistration) SetCancelationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { err := m.GetBackingStore().Set("cancelationDateTime", value) if err != nil { panic(err) } } -// SetEmail sets the email property value. The email property +// SetEmail sets the email property value. Email address of the registrant. func (m *VirtualEventRegistration) SetEmail(value *string)() { err := m.GetBackingStore().Set("email", value) if err != nil { panic(err) } } -// SetFirstName sets the firstName property value. The firstName property +// SetFirstName sets the firstName property value. First name of the registrant. func (m *VirtualEventRegistration) SetFirstName(value *string)() { err := m.GetBackingStore().Set("firstName", value) if err != nil { panic(err) } } -// SetLastName sets the lastName property value. The lastName property +// SetLastName sets the lastName property value. Last name of the registrant. func (m *VirtualEventRegistration) SetLastName(value *string)() { err := m.GetBackingStore().Set("lastName", value) if err != nil { panic(err) } } -// SetRegistrationDateTime sets the registrationDateTime property value. The registrationDateTime property +// SetRegistrationDateTime sets the registrationDateTime property value. Date and time when the registrant registers for the virtual event. 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. func (m *VirtualEventRegistration) SetRegistrationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { err := m.GetBackingStore().Set("registrationDateTime", value) if err != nil { panic(err) } } -// SetRegistrationQuestionAnswers sets the registrationQuestionAnswers property value. The registrationQuestionAnswers property +// SetRegistrationQuestionAnswers sets the registrationQuestionAnswers property value. The registrant's answer to the registration questions. func (m *VirtualEventRegistration) SetRegistrationQuestionAnswers(value []VirtualEventRegistrationQuestionAnswerable)() { err := m.GetBackingStore().Set("registrationQuestionAnswers", value) if err != nil { panic(err) } } -// SetSessions sets the sessions property value. The sessions property +// SetSessions sets the sessions property value. Sessions of the webinar. func (m *VirtualEventRegistration) SetSessions(value []VirtualEventSessionable)() { err := m.GetBackingStore().Set("sessions", value) if err != nil { panic(err) } } -// SetStatus sets the status property value. The status property +// SetStatus sets the status property value. Registration status of the registrant. Read-only. Possible values are: registered, canceled, waitlisted, pendingApproval, rejectedByOrganizer, unknownFutureValue. func (m *VirtualEventRegistration) SetStatus(value *VirtualEventAttendeeRegistrationStatus)() { err := m.GetBackingStore().Set("status", value) if err != nil { panic(err) } } -// SetUserId sets the userId property value. The userId property +// SetUserId sets the userId property value. The registrant's ID in Azure Active Directory (Azure AD). Only appears when the registrant is registered in Azure AD. func (m *VirtualEventRegistration) SetUserId(value *string)() { err := m.GetBackingStore().Set("userId", value) if err != nil { diff --git a/models/virtual_event_registration_configuration.go b/models/virtual_event_registration_configuration.go index d513cd73bff..f21cb5e77d1 100644 --- a/models/virtual_event_registration_configuration.go +++ b/models/virtual_event_registration_configuration.go @@ -37,7 +37,7 @@ func CreateVirtualEventRegistrationConfigurationFromDiscriminatorValue(parseNode } return NewVirtualEventRegistrationConfiguration(), nil } -// GetCapacity gets the capacity property value. The capacity property +// GetCapacity gets the capacity property value. Total capacity of the virtual event. func (m *VirtualEventRegistrationConfiguration) GetCapacity()(*int32) { val, err := m.GetBackingStore().Get("capacity") if err != nil { @@ -89,7 +89,7 @@ func (m *VirtualEventRegistrationConfiguration) GetFieldDeserializers()(map[stri } return res } -// GetQuestions gets the questions property value. The questions property +// GetQuestions gets the questions property value. Registration questions. func (m *VirtualEventRegistrationConfiguration) GetQuestions()([]VirtualEventRegistrationQuestionable) { val, err := m.GetBackingStore().Get("questions") if err != nil { @@ -100,7 +100,7 @@ func (m *VirtualEventRegistrationConfiguration) GetQuestions()([]VirtualEventReg } return nil } -// GetRegistrationWebUrl gets the registrationWebUrl property value. The registrationWebUrl property +// GetRegistrationWebUrl gets the registrationWebUrl property value. Registration URL of the virtual event. func (m *VirtualEventRegistrationConfiguration) GetRegistrationWebUrl()(*string) { val, err := m.GetBackingStore().Get("registrationWebUrl") if err != nil { @@ -143,21 +143,21 @@ func (m *VirtualEventRegistrationConfiguration) Serialize(writer i878a80d2330e89 } return nil } -// SetCapacity sets the capacity property value. The capacity property +// SetCapacity sets the capacity property value. Total capacity of the virtual event. func (m *VirtualEventRegistrationConfiguration) SetCapacity(value *int32)() { err := m.GetBackingStore().Set("capacity", value) if err != nil { panic(err) } } -// SetQuestions sets the questions property value. The questions property +// SetQuestions sets the questions property value. Registration questions. func (m *VirtualEventRegistrationConfiguration) SetQuestions(value []VirtualEventRegistrationQuestionable)() { err := m.GetBackingStore().Set("questions", value) if err != nil { panic(err) } } -// SetRegistrationWebUrl sets the registrationWebUrl property value. The registrationWebUrl property +// SetRegistrationWebUrl sets the registrationWebUrl property value. Registration URL of the virtual event. func (m *VirtualEventRegistrationConfiguration) SetRegistrationWebUrl(value *string)() { err := m.GetBackingStore().Set("registrationWebUrl", value) if err != nil { diff --git a/models/virtual_event_session.go b/models/virtual_event_session.go index e4d4d2dc1b5..9415f193d72 100644 --- a/models/virtual_event_session.go +++ b/models/virtual_event_session.go @@ -40,7 +40,7 @@ func (m *VirtualEventSession) GetFieldDeserializers()(map[string]func(i878a80d23 } return res } -// GetRegistrations gets the registrations property value. The registrations property +// GetRegistrations gets the registrations property value. Registration records of this virtual event session. func (m *VirtualEventSession) GetRegistrations()([]VirtualEventRegistrationable) { val, err := m.GetBackingStore().Get("registrations") if err != nil { @@ -71,7 +71,7 @@ func (m *VirtualEventSession) Serialize(writer i878a80d2330e89d26896388a3f487eef } return nil } -// SetRegistrations sets the registrations property value. The registrations property +// SetRegistrations sets the registrations property value. Registration records of this virtual event session. func (m *VirtualEventSession) SetRegistrations(value []VirtualEventRegistrationable)() { err := m.GetBackingStore().Set("registrations", value) if err != nil { diff --git a/models/virtual_event_webinar.go b/models/virtual_event_webinar.go index 4613df631fd..170b9120aa8 100644 --- a/models/virtual_event_webinar.go +++ b/models/virtual_event_webinar.go @@ -98,7 +98,7 @@ func (m *VirtualEventWebinar) GetFieldDeserializers()(map[string]func(i878a80d23 } return res } -// GetRegistrationConfiguration gets the registrationConfiguration property value. The registrationConfiguration property +// GetRegistrationConfiguration gets the registrationConfiguration property value. Registration configuration of the webinar. func (m *VirtualEventWebinar) GetRegistrationConfiguration()(VirtualEventRegistrationConfigurationable) { val, err := m.GetBackingStore().Get("registrationConfiguration") if err != nil { @@ -109,7 +109,7 @@ func (m *VirtualEventWebinar) GetRegistrationConfiguration()(VirtualEventRegistr } return nil } -// GetRegistrations gets the registrations property value. The registrations property +// GetRegistrations gets the registrations property value. Registration records of the webinar. func (m *VirtualEventWebinar) GetRegistrations()([]VirtualEventRegistrationable) { val, err := m.GetBackingStore().Get("registrations") if err != nil { @@ -179,14 +179,14 @@ func (m *VirtualEventWebinar) SetCoOrganizers(value []CommunicationsUserIdentity panic(err) } } -// SetRegistrationConfiguration sets the registrationConfiguration property value. The registrationConfiguration property +// SetRegistrationConfiguration sets the registrationConfiguration property value. Registration configuration of the webinar. func (m *VirtualEventWebinar) SetRegistrationConfiguration(value VirtualEventRegistrationConfigurationable)() { err := m.GetBackingStore().Set("registrationConfiguration", value) if err != nil { panic(err) } } -// SetRegistrations sets the registrations property value. The registrations property +// SetRegistrations sets the registrations property value. Registration records of the webinar. func (m *VirtualEventWebinar) SetRegistrations(value []VirtualEventRegistrationable)() { err := m.GetBackingStore().Set("registrations", value) if err != nil { diff --git a/models/workbook_range_view.go b/models/workbook_range_view.go index 1f7fbc4c213..ef6e4e6e24c 100644 --- a/models/workbook_range_view.go +++ b/models/workbook_range_view.go @@ -249,7 +249,7 @@ func (m *WorkbookRangeView) GetRows()([]WorkbookRangeViewable) { } return nil } -// GetText gets the text property value. 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. +// GetText gets the text property value. 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. func (m *WorkbookRangeView) GetText()(Jsonable) { val, err := m.GetBackingStore().Get("text") if err != nil { @@ -260,7 +260,7 @@ func (m *WorkbookRangeView) GetText()(Jsonable) { } return nil } -// GetValues gets the values property value. 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. +// GetValues gets the values property value. 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. func (m *WorkbookRangeView) GetValues()(Jsonable) { val, err := m.GetBackingStore().Get("values") if err != nil { @@ -431,14 +431,14 @@ func (m *WorkbookRangeView) SetRows(value []WorkbookRangeViewable)() { panic(err) } } -// SetText sets the text property value. 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. +// SetText sets the text property value. 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. func (m *WorkbookRangeView) SetText(value Jsonable)() { err := m.GetBackingStore().Set("text", value) if err != nil { panic(err) } } -// SetValues sets the values property value. 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. +// SetValues sets the values property value. 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. func (m *WorkbookRangeView) SetValues(value Jsonable)() { err := m.GetBackingStore().Set("values", value) if err != nil { diff --git a/models/workspace_collection_response.go b/models/workspace_collection_response.go new file mode 100644 index 00000000000..9d73a682fef --- /dev/null +++ b/models/workspace_collection_response.go @@ -0,0 +1,87 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// WorkspaceCollectionResponse +type WorkspaceCollectionResponse struct { + BaseCollectionPaginationCountResponse +} +// NewWorkspaceCollectionResponse instantiates a new workspaceCollectionResponse and sets the default values. +func NewWorkspaceCollectionResponse()(*WorkspaceCollectionResponse) { + m := &WorkspaceCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateWorkspaceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateWorkspaceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewWorkspaceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *WorkspaceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateWorkspaceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Workspaceable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(Workspaceable) + } + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *WorkspaceCollectionResponse) GetValue()([]Workspaceable) { + val, err := m.GetBackingStore().Get("value") + if err != nil { + panic(err) + } + if val != nil { + return val.([]Workspaceable) + } + return nil +} +// Serialize serializes information the current object +func (m *WorkspaceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *WorkspaceCollectionResponse) SetValue(value []Workspaceable)() { + err := m.GetBackingStore().Set("value", value) + if err != nil { + panic(err) + } +} +// WorkspaceCollectionResponseable +type WorkspaceCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Workspaceable) + SetValue(value []Workspaceable)() +} diff --git a/models/x509_certificate_authentication_method_configuration.go b/models/x509_certificate_authentication_method_configuration.go index 4104198eba3..63502e6963d 100644 --- a/models/x509_certificate_authentication_method_configuration.go +++ b/models/x509_certificate_authentication_method_configuration.go @@ -88,6 +88,16 @@ func (m *X509CertificateAuthenticationMethodConfiguration) GetFieldDeserializers } return nil } + res["issuerHintsConfiguration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateX509CertificateIssuerHintsConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetIssuerHintsConfiguration(val.(X509CertificateIssuerHintsConfigurationable)) + } + return nil + } return res } // GetIncludeTargets gets the includeTargets property value. A collection of groups that are enabled to use the authentication method. @@ -101,6 +111,17 @@ func (m *X509CertificateAuthenticationMethodConfiguration) GetIncludeTargets()([ } return nil } +// GetIssuerHintsConfiguration gets the issuerHintsConfiguration property value. The issuerHintsConfiguration property +func (m *X509CertificateAuthenticationMethodConfiguration) GetIssuerHintsConfiguration()(X509CertificateIssuerHintsConfigurationable) { + val, err := m.GetBackingStore().Get("issuerHintsConfiguration") + if err != nil { + panic(err) + } + if val != nil { + return val.(X509CertificateIssuerHintsConfigurationable) + } + return nil +} // Serialize serializes information the current object func (m *X509CertificateAuthenticationMethodConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { err := m.AuthenticationMethodConfiguration.Serialize(writer) @@ -137,6 +158,12 @@ func (m *X509CertificateAuthenticationMethodConfiguration) Serialize(writer i878 return err } } + { + err = writer.WriteObjectValue("issuerHintsConfiguration", m.GetIssuerHintsConfiguration()) + if err != nil { + return err + } + } return nil } // SetAuthenticationModeConfiguration sets the authenticationModeConfiguration property value. Defines strong authentication configurations. This configuration includes the default authentication mode and the different rules for strong authentication bindings. @@ -160,6 +187,13 @@ func (m *X509CertificateAuthenticationMethodConfiguration) SetIncludeTargets(val panic(err) } } +// SetIssuerHintsConfiguration sets the issuerHintsConfiguration property value. The issuerHintsConfiguration property +func (m *X509CertificateAuthenticationMethodConfiguration) SetIssuerHintsConfiguration(value X509CertificateIssuerHintsConfigurationable)() { + err := m.GetBackingStore().Set("issuerHintsConfiguration", value) + if err != nil { + panic(err) + } +} // X509CertificateAuthenticationMethodConfigurationable type X509CertificateAuthenticationMethodConfigurationable interface { AuthenticationMethodConfigurationable @@ -167,7 +201,9 @@ type X509CertificateAuthenticationMethodConfigurationable interface { GetAuthenticationModeConfiguration()(X509CertificateAuthenticationModeConfigurationable) GetCertificateUserBindings()([]X509CertificateUserBindingable) GetIncludeTargets()([]AuthenticationMethodTargetable) + GetIssuerHintsConfiguration()(X509CertificateIssuerHintsConfigurationable) SetAuthenticationModeConfiguration(value X509CertificateAuthenticationModeConfigurationable)() SetCertificateUserBindings(value []X509CertificateUserBindingable)() SetIncludeTargets(value []AuthenticationMethodTargetable)() + SetIssuerHintsConfiguration(value X509CertificateIssuerHintsConfigurationable)() } diff --git a/models/x509_certificate_issuer_hints_configuration.go b/models/x509_certificate_issuer_hints_configuration.go new file mode 100644 index 00000000000..332fd68f1b9 --- /dev/null +++ b/models/x509_certificate_issuer_hints_configuration.go @@ -0,0 +1,147 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +// X509CertificateIssuerHintsConfiguration +type X509CertificateIssuerHintsConfiguration struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewX509CertificateIssuerHintsConfiguration instantiates a new x509CertificateIssuerHintsConfiguration and sets the default values. +func NewX509CertificateIssuerHintsConfiguration()(*X509CertificateIssuerHintsConfiguration) { + m := &X509CertificateIssuerHintsConfiguration{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateX509CertificateIssuerHintsConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateX509CertificateIssuerHintsConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewX509CertificateIssuerHintsConfiguration(), nil +} +// GetAdditionalData gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *X509CertificateIssuerHintsConfiguration) GetAdditionalData()(map[string]any) { + val , err := m.backingStore.Get("additionalData") + if err != nil { + panic(err) + } + if val == nil { + var value = make(map[string]any); + m.SetAdditionalData(value); + } + return val.(map[string]any) +} +// GetBackingStore gets the backingStore property value. Stores model information. +func (m *X509CertificateIssuerHintsConfiguration) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetFieldDeserializers the deserialization information for the current model +func (m *X509CertificateIssuerHintsConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["@odata.type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOdataType(val) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseX509CertificateIssuerHintsState) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*X509CertificateIssuerHintsState)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *X509CertificateIssuerHintsConfiguration) GetOdataType()(*string) { + val, err := m.GetBackingStore().Get("odataType") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetState gets the state property value. The state property +func (m *X509CertificateIssuerHintsConfiguration) GetState()(*X509CertificateIssuerHintsState) { + val, err := m.GetBackingStore().Get("state") + if err != nil { + panic(err) + } + if val != nil { + return val.(*X509CertificateIssuerHintsState) + } + return nil +} +// Serialize serializes information the current object +func (m *X509CertificateIssuerHintsConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err := writer.WriteStringValue("state", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *X509CertificateIssuerHintsConfiguration) SetAdditionalData(value map[string]any)() { + err := m.GetBackingStore().Set("additionalData", value) + if err != nil { + panic(err) + } +} +// SetBackingStore sets the backingStore property value. Stores model information. +func (m *X509CertificateIssuerHintsConfiguration) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *X509CertificateIssuerHintsConfiguration) SetOdataType(value *string)() { + err := m.GetBackingStore().Set("odataType", value) + if err != nil { + panic(err) + } +} +// SetState sets the state property value. The state property +func (m *X509CertificateIssuerHintsConfiguration) SetState(value *X509CertificateIssuerHintsState)() { + err := m.GetBackingStore().Set("state", value) + if err != nil { + panic(err) + } +} +// X509CertificateIssuerHintsConfigurationable +type X509CertificateIssuerHintsConfigurationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetOdataType()(*string) + GetState()(*X509CertificateIssuerHintsState) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetOdataType(value *string)() + SetState(value *X509CertificateIssuerHintsState)() +} diff --git a/models/x509_certificate_issuer_hints_state.go b/models/x509_certificate_issuer_hints_state.go new file mode 100644 index 00000000000..a697734c584 --- /dev/null +++ b/models/x509_certificate_issuer_hints_state.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// +type X509CertificateIssuerHintsState int + +const ( + DISABLED_X509CERTIFICATEISSUERHINTSSTATE X509CertificateIssuerHintsState = iota + ENABLED_X509CERTIFICATEISSUERHINTSSTATE + UNKNOWNFUTUREVALUE_X509CERTIFICATEISSUERHINTSSTATE +) + +func (i X509CertificateIssuerHintsState) String() string { + return []string{"disabled", "enabled", "unknownFutureValue"}[i] +} +func ParseX509CertificateIssuerHintsState(v string) (any, error) { + result := DISABLED_X509CERTIFICATEISSUERHINTSSTATE + switch v { + case "disabled": + result = DISABLED_X509CERTIFICATEISSUERHINTSSTATE + case "enabled": + result = ENABLED_X509CERTIFICATEISSUERHINTSSTATE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_X509CERTIFICATEISSUERHINTSSTATE + default: + return 0, errors.New("Unknown X509CertificateIssuerHintsState value: " + v) + } + return &result, nil +} +func SerializeX509CertificateIssuerHintsState(values []X509CertificateIssuerHintsState) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i X509CertificateIssuerHintsState) isMultiValue() bool { + return false +} diff --git a/onpremisespublishingprofiles/item_connector_groups_request_builder.go b/onpremisespublishingprofiles/item_connector_groups_request_builder.go index e93708990ac..919f7d037b5 100644 --- a/onpremisespublishingprofiles/item_connector_groups_request_builder.go +++ b/onpremisespublishingprofiles/item_connector_groups_request_builder.go @@ -96,10 +96,10 @@ func (m *ItemConnectorGroupsRequestBuilder) Get(ctx context.Context, requestConf } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConnectorGroupCollectionResponseable), nil } -// Post create a new connectorGroup. +// Post create a connectorGroup object. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/connectorgroup-post-connectorgroups?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/connectorgroup-post?view=graph-rest-1.0 func (m *ItemConnectorGroupsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConnectorGroupable, requestConfiguration *ItemConnectorGroupsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConnectorGroupable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -134,7 +134,7 @@ func (m *ItemConnectorGroupsRequestBuilder) ToGetRequestInformation(ctx context. } return requestInfo, nil } -// ToPostRequestInformation create a new connectorGroup. +// ToPostRequestInformation create a connectorGroup object. func (m *ItemConnectorGroupsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConnectorGroupable, requestConfiguration *ItemConnectorGroupsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/places/item_graph_room_list_request_builder.go b/places/item_graph_room_list_request_builder.go index 122d8ac9886..69372bade98 100644 --- a/places/item_graph_room_list_request_builder.go +++ b/places/item_graph_room_list_request_builder.go @@ -59,6 +59,10 @@ func (m *ItemGraphRoomListRequestBuilder) Get(ctx context.Context, requestConfig } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.RoomListable), nil } +// Rooms provides operations to manage the rooms property of the microsoft.graph.roomList entity. +func (m *ItemGraphRoomListRequestBuilder) Rooms()(*ItemGraphRoomListRoomsRequestBuilder) { + return NewItemGraphRoomListRoomsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation get the item of type microsoft.graph.place as microsoft.graph.roomList func (m *ItemGraphRoomListRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemGraphRoomListRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() @@ -79,3 +83,7 @@ func (m *ItemGraphRoomListRequestBuilder) ToGetRequestInformation(ctx context.Co func (m *ItemGraphRoomListRequestBuilder) WithUrl(rawUrl string)(*ItemGraphRoomListRequestBuilder) { return NewItemGraphRoomListRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); } +// Workspaces provides operations to manage the workspaces property of the microsoft.graph.roomList entity. +func (m *ItemGraphRoomListRequestBuilder) Workspaces()(*ItemGraphRoomListWorkspacesRequestBuilder) { + return NewItemGraphRoomListWorkspacesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/places/item_graph_room_list_rooms_count_request_builder.go b/places/item_graph_room_list_rooms_count_request_builder.go new file mode 100644 index 00000000000..adcaa9442aa --- /dev/null +++ b/places/item_graph_room_list_rooms_count_request_builder.go @@ -0,0 +1,80 @@ +package places + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemGraphRoomListRoomsCountRequestBuilder provides operations to count the resources in the collection. +type ItemGraphRoomListRoomsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemGraphRoomListRoomsCountRequestBuilderGetQueryParameters get the number of the resource +type ItemGraphRoomListRoomsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// ItemGraphRoomListRoomsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemGraphRoomListRoomsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemGraphRoomListRoomsCountRequestBuilderGetQueryParameters +} +// NewItemGraphRoomListRoomsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewItemGraphRoomListRoomsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemGraphRoomListRoomsCountRequestBuilder) { + m := &ItemGraphRoomListRoomsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/places/{place%2Did}/graph.roomList/rooms/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewItemGraphRoomListRoomsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewItemGraphRoomListRoomsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemGraphRoomListRoomsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemGraphRoomListRoomsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *ItemGraphRoomListRoomsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemGraphRoomListRoomsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *ItemGraphRoomListRoomsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemGraphRoomListRoomsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemGraphRoomListRoomsCountRequestBuilder) WithUrl(rawUrl string)(*ItemGraphRoomListRoomsCountRequestBuilder) { + return NewItemGraphRoomListRoomsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/places/item_graph_room_list_rooms_request_builder.go b/places/item_graph_room_list_rooms_request_builder.go new file mode 100644 index 00000000000..e909b77b31d --- /dev/null +++ b/places/item_graph_room_list_rooms_request_builder.go @@ -0,0 +1,151 @@ +package places + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemGraphRoomListRoomsRequestBuilder provides operations to manage the rooms property of the microsoft.graph.roomList entity. +type ItemGraphRoomListRoomsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemGraphRoomListRoomsRequestBuilderGetQueryParameters get rooms from places +type ItemGraphRoomListRoomsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// ItemGraphRoomListRoomsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemGraphRoomListRoomsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemGraphRoomListRoomsRequestBuilderGetQueryParameters +} +// ItemGraphRoomListRoomsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemGraphRoomListRoomsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByRoomId provides operations to manage the rooms property of the microsoft.graph.roomList entity. +func (m *ItemGraphRoomListRoomsRequestBuilder) ByRoomId(roomId string)(*ItemGraphRoomListRoomsRoomItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if roomId != "" { + urlTplParams["room%2Did"] = roomId + } + return NewItemGraphRoomListRoomsRoomItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemGraphRoomListRoomsRequestBuilderInternal instantiates a new RoomsRequestBuilder and sets the default values. +func NewItemGraphRoomListRoomsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemGraphRoomListRoomsRequestBuilder) { + m := &ItemGraphRoomListRoomsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/places/{place%2Did}/graph.roomList/rooms{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewItemGraphRoomListRoomsRequestBuilder instantiates a new RoomsRequestBuilder and sets the default values. +func NewItemGraphRoomListRoomsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemGraphRoomListRoomsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemGraphRoomListRoomsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *ItemGraphRoomListRoomsRequestBuilder) Count()(*ItemGraphRoomListRoomsCountRequestBuilder) { + return NewItemGraphRoomListRoomsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get get rooms from places +func (m *ItemGraphRoomListRoomsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemGraphRoomListRoomsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.RoomCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateRoomCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.RoomCollectionResponseable), nil +} +// Post create new navigation property to rooms for places +func (m *ItemGraphRoomListRoomsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Roomable, requestConfiguration *ItemGraphRoomListRoomsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Roomable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateRoomFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Roomable), nil +} +// ToGetRequestInformation get rooms from places +func (m *ItemGraphRoomListRoomsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemGraphRoomListRoomsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to rooms for places +func (m *ItemGraphRoomListRoomsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Roomable, requestConfiguration *ItemGraphRoomListRoomsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemGraphRoomListRoomsRequestBuilder) WithUrl(rawUrl string)(*ItemGraphRoomListRoomsRequestBuilder) { + return NewItemGraphRoomListRoomsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/places/item_graph_room_list_rooms_room_item_request_builder.go b/places/item_graph_room_list_rooms_room_item_request_builder.go new file mode 100644 index 00000000000..20c4f90eb1f --- /dev/null +++ b/places/item_graph_room_list_rooms_room_item_request_builder.go @@ -0,0 +1,159 @@ +package places + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemGraphRoomListRoomsRoomItemRequestBuilder provides operations to manage the rooms property of the microsoft.graph.roomList entity. +type ItemGraphRoomListRoomsRoomItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemGraphRoomListRoomsRoomItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemGraphRoomListRoomsRoomItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ItemGraphRoomListRoomsRoomItemRequestBuilderGetQueryParameters get rooms from places +type ItemGraphRoomListRoomsRoomItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// ItemGraphRoomListRoomsRoomItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemGraphRoomListRoomsRoomItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemGraphRoomListRoomsRoomItemRequestBuilderGetQueryParameters +} +// ItemGraphRoomListRoomsRoomItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemGraphRoomListRoomsRoomItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewItemGraphRoomListRoomsRoomItemRequestBuilderInternal instantiates a new RoomItemRequestBuilder and sets the default values. +func NewItemGraphRoomListRoomsRoomItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemGraphRoomListRoomsRoomItemRequestBuilder) { + m := &ItemGraphRoomListRoomsRoomItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/places/{place%2Did}/graph.roomList/rooms/{room%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewItemGraphRoomListRoomsRoomItemRequestBuilder instantiates a new RoomItemRequestBuilder and sets the default values. +func NewItemGraphRoomListRoomsRoomItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemGraphRoomListRoomsRoomItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemGraphRoomListRoomsRoomItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property rooms for places +func (m *ItemGraphRoomListRoomsRoomItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *ItemGraphRoomListRoomsRoomItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get get rooms from places +func (m *ItemGraphRoomListRoomsRoomItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemGraphRoomListRoomsRoomItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Roomable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateRoomFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Roomable), nil +} +// Patch update the navigation property rooms in places +func (m *ItemGraphRoomListRoomsRoomItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Roomable, requestConfiguration *ItemGraphRoomListRoomsRoomItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Roomable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateRoomFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Roomable), nil +} +// ToDeleteRequestInformation delete navigation property rooms for places +func (m *ItemGraphRoomListRoomsRoomItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *ItemGraphRoomListRoomsRoomItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation get rooms from places +func (m *ItemGraphRoomListRoomsRoomItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemGraphRoomListRoomsRoomItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property rooms in places +func (m *ItemGraphRoomListRoomsRoomItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Roomable, requestConfiguration *ItemGraphRoomListRoomsRoomItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemGraphRoomListRoomsRoomItemRequestBuilder) WithUrl(rawUrl string)(*ItemGraphRoomListRoomsRoomItemRequestBuilder) { + return NewItemGraphRoomListRoomsRoomItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/places/item_graph_room_list_workspaces_count_request_builder.go b/places/item_graph_room_list_workspaces_count_request_builder.go new file mode 100644 index 00000000000..aead9eb103a --- /dev/null +++ b/places/item_graph_room_list_workspaces_count_request_builder.go @@ -0,0 +1,80 @@ +package places + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemGraphRoomListWorkspacesCountRequestBuilder provides operations to count the resources in the collection. +type ItemGraphRoomListWorkspacesCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemGraphRoomListWorkspacesCountRequestBuilderGetQueryParameters get the number of the resource +type ItemGraphRoomListWorkspacesCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// ItemGraphRoomListWorkspacesCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemGraphRoomListWorkspacesCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemGraphRoomListWorkspacesCountRequestBuilderGetQueryParameters +} +// NewItemGraphRoomListWorkspacesCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewItemGraphRoomListWorkspacesCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemGraphRoomListWorkspacesCountRequestBuilder) { + m := &ItemGraphRoomListWorkspacesCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/places/{place%2Did}/graph.roomList/workspaces/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewItemGraphRoomListWorkspacesCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewItemGraphRoomListWorkspacesCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemGraphRoomListWorkspacesCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemGraphRoomListWorkspacesCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *ItemGraphRoomListWorkspacesCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemGraphRoomListWorkspacesCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *ItemGraphRoomListWorkspacesCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemGraphRoomListWorkspacesCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemGraphRoomListWorkspacesCountRequestBuilder) WithUrl(rawUrl string)(*ItemGraphRoomListWorkspacesCountRequestBuilder) { + return NewItemGraphRoomListWorkspacesCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/places/item_graph_room_list_workspaces_request_builder.go b/places/item_graph_room_list_workspaces_request_builder.go new file mode 100644 index 00000000000..1109e6164e6 --- /dev/null +++ b/places/item_graph_room_list_workspaces_request_builder.go @@ -0,0 +1,151 @@ +package places + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemGraphRoomListWorkspacesRequestBuilder provides operations to manage the workspaces property of the microsoft.graph.roomList entity. +type ItemGraphRoomListWorkspacesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemGraphRoomListWorkspacesRequestBuilderGetQueryParameters get workspaces from places +type ItemGraphRoomListWorkspacesRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// ItemGraphRoomListWorkspacesRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemGraphRoomListWorkspacesRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemGraphRoomListWorkspacesRequestBuilderGetQueryParameters +} +// ItemGraphRoomListWorkspacesRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemGraphRoomListWorkspacesRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByWorkspaceId provides operations to manage the workspaces property of the microsoft.graph.roomList entity. +func (m *ItemGraphRoomListWorkspacesRequestBuilder) ByWorkspaceId(workspaceId string)(*ItemGraphRoomListWorkspacesWorkspaceItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if workspaceId != "" { + urlTplParams["workspace%2Did"] = workspaceId + } + return NewItemGraphRoomListWorkspacesWorkspaceItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemGraphRoomListWorkspacesRequestBuilderInternal instantiates a new WorkspacesRequestBuilder and sets the default values. +func NewItemGraphRoomListWorkspacesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemGraphRoomListWorkspacesRequestBuilder) { + m := &ItemGraphRoomListWorkspacesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/places/{place%2Did}/graph.roomList/workspaces{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewItemGraphRoomListWorkspacesRequestBuilder instantiates a new WorkspacesRequestBuilder and sets the default values. +func NewItemGraphRoomListWorkspacesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemGraphRoomListWorkspacesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemGraphRoomListWorkspacesRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *ItemGraphRoomListWorkspacesRequestBuilder) Count()(*ItemGraphRoomListWorkspacesCountRequestBuilder) { + return NewItemGraphRoomListWorkspacesCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get get workspaces from places +func (m *ItemGraphRoomListWorkspacesRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemGraphRoomListWorkspacesRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.WorkspaceCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateWorkspaceCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.WorkspaceCollectionResponseable), nil +} +// Post create new navigation property to workspaces for places +func (m *ItemGraphRoomListWorkspacesRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Workspaceable, requestConfiguration *ItemGraphRoomListWorkspacesRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Workspaceable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateWorkspaceFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Workspaceable), nil +} +// ToGetRequestInformation get workspaces from places +func (m *ItemGraphRoomListWorkspacesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemGraphRoomListWorkspacesRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPostRequestInformation create new navigation property to workspaces for places +func (m *ItemGraphRoomListWorkspacesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Workspaceable, requestConfiguration *ItemGraphRoomListWorkspacesRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemGraphRoomListWorkspacesRequestBuilder) WithUrl(rawUrl string)(*ItemGraphRoomListWorkspacesRequestBuilder) { + return NewItemGraphRoomListWorkspacesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/places/item_graph_room_list_workspaces_workspace_item_request_builder.go b/places/item_graph_room_list_workspaces_workspace_item_request_builder.go new file mode 100644 index 00000000000..08db76c6fc7 --- /dev/null +++ b/places/item_graph_room_list_workspaces_workspace_item_request_builder.go @@ -0,0 +1,159 @@ +package places + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemGraphRoomListWorkspacesWorkspaceItemRequestBuilder provides operations to manage the workspaces property of the microsoft.graph.roomList entity. +type ItemGraphRoomListWorkspacesWorkspaceItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemGraphRoomListWorkspacesWorkspaceItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemGraphRoomListWorkspacesWorkspaceItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ItemGraphRoomListWorkspacesWorkspaceItemRequestBuilderGetQueryParameters get workspaces from places +type ItemGraphRoomListWorkspacesWorkspaceItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// ItemGraphRoomListWorkspacesWorkspaceItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemGraphRoomListWorkspacesWorkspaceItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemGraphRoomListWorkspacesWorkspaceItemRequestBuilderGetQueryParameters +} +// ItemGraphRoomListWorkspacesWorkspaceItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemGraphRoomListWorkspacesWorkspaceItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewItemGraphRoomListWorkspacesWorkspaceItemRequestBuilderInternal instantiates a new WorkspaceItemRequestBuilder and sets the default values. +func NewItemGraphRoomListWorkspacesWorkspaceItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemGraphRoomListWorkspacesWorkspaceItemRequestBuilder) { + m := &ItemGraphRoomListWorkspacesWorkspaceItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/places/{place%2Did}/graph.roomList/workspaces/{workspace%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewItemGraphRoomListWorkspacesWorkspaceItemRequestBuilder instantiates a new WorkspaceItemRequestBuilder and sets the default values. +func NewItemGraphRoomListWorkspacesWorkspaceItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemGraphRoomListWorkspacesWorkspaceItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemGraphRoomListWorkspacesWorkspaceItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property workspaces for places +func (m *ItemGraphRoomListWorkspacesWorkspaceItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *ItemGraphRoomListWorkspacesWorkspaceItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get get workspaces from places +func (m *ItemGraphRoomListWorkspacesWorkspaceItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemGraphRoomListWorkspacesWorkspaceItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Workspaceable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateWorkspaceFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Workspaceable), nil +} +// Patch update the navigation property workspaces in places +func (m *ItemGraphRoomListWorkspacesWorkspaceItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Workspaceable, requestConfiguration *ItemGraphRoomListWorkspacesWorkspaceItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Workspaceable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateWorkspaceFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Workspaceable), nil +} +// ToDeleteRequestInformation delete navigation property workspaces for places +func (m *ItemGraphRoomListWorkspacesWorkspaceItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *ItemGraphRoomListWorkspacesWorkspaceItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToGetRequestInformation get workspaces from places +func (m *ItemGraphRoomListWorkspacesWorkspaceItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemGraphRoomListWorkspacesWorkspaceItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property workspaces in places +func (m *ItemGraphRoomListWorkspacesWorkspaceItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Workspaceable, requestConfiguration *ItemGraphRoomListWorkspacesWorkspaceItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH + requestInfo.Headers.Add("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemGraphRoomListWorkspacesWorkspaceItemRequestBuilder) WithUrl(rawUrl string)(*ItemGraphRoomListWorkspacesWorkspaceItemRequestBuilder) { + return NewItemGraphRoomListWorkspacesWorkspaceItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/policies/authentication_strength_policies_item_combination_configurations_authentication_combination_configuration_item_request_builder.go b/policies/authentication_strength_policies_item_combination_configurations_authentication_combination_configuration_item_request_builder.go index 1bbeec1a913..6881274d451 100644 --- a/policies/authentication_strength_policies_item_combination_configurations_authentication_combination_configuration_item_request_builder.go +++ b/policies/authentication_strength_policies_item_combination_configurations_authentication_combination_configuration_item_request_builder.go @@ -95,7 +95,7 @@ func (m *AuthenticationStrengthPoliciesItemCombinationConfigurationsAuthenticati } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AuthenticationCombinationConfigurationable), nil } -// Patch 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. +// Patch 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. // [Find more info here] // // [Find more info here]: https://learn.microsoft.com/graph/api/authenticationcombinationconfiguration-update?view=graph-rest-1.0 @@ -145,7 +145,7 @@ func (m *AuthenticationStrengthPoliciesItemCombinationConfigurationsAuthenticati } return requestInfo, nil } -// ToPatchRequestInformation 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. +// ToPatchRequestInformation 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. func (m *AuthenticationStrengthPoliciesItemCombinationConfigurationsAuthenticationCombinationConfigurationItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AuthenticationCombinationConfigurationable, requestConfiguration *AuthenticationStrengthPoliciesItemCombinationConfigurationsAuthenticationCombinationConfigurationItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/policies/authorization_policy_request_builder.go b/policies/authorization_policy_request_builder.go index c200ab9e035..8ac12621e85 100644 --- a/policies/authorization_policy_request_builder.go +++ b/policies/authorization_policy_request_builder.go @@ -11,7 +11,7 @@ import ( type AuthorizationPolicyRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// AuthorizationPolicyRequestBuilderGetQueryParameters the policy that controls Azure AD authorization settings. +// AuthorizationPolicyRequestBuilderGetQueryParameters retrieve the properties of an authorizationPolicy object. type AuthorizationPolicyRequestBuilderGetQueryParameters struct { // Include count of items Count *bool `uriparametername:"%24count"` @@ -74,7 +74,10 @@ func NewAuthorizationPolicyRequestBuilder(rawUrl string, requestAdapter i2ae4187 func (m *AuthorizationPolicyRequestBuilder) Count()(*AuthorizationPolicyCountRequestBuilder) { return NewAuthorizationPolicyCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Get the policy that controls Azure AD authorization settings. +// Get retrieve the properties of an authorizationPolicy object. +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/authorizationpolicy-get?view=graph-rest-1.0 func (m *AuthorizationPolicyRequestBuilder) Get(ctx context.Context, requestConfiguration *AuthorizationPolicyRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AuthorizationPolicyCollectionResponseable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -112,7 +115,7 @@ func (m *AuthorizationPolicyRequestBuilder) Post(ctx context.Context, body ie233 } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AuthorizationPolicyable), nil } -// ToGetRequestInformation the policy that controls Azure AD authorization settings. +// ToGetRequestInformation retrieve the properties of an authorizationPolicy object. func (m *AuthorizationPolicyRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *AuthorizationPolicyRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/policies/cross_tenant_access_policy_partners_item_identity_synchronization_request_builder.go b/policies/cross_tenant_access_policy_partners_item_identity_synchronization_request_builder.go index 6f8aee90486..4cf397cbf3b 100644 --- a/policies/cross_tenant_access_policy_partners_item_identity_synchronization_request_builder.go +++ b/policies/cross_tenant_access_policy_partners_item_identity_synchronization_request_builder.go @@ -55,7 +55,6 @@ func NewCrossTenantAccessPolicyPartnersItemIdentitySynchronizationRequestBuilder return NewCrossTenantAccessPolicyPartnersItemIdentitySynchronizationRequestBuilderInternal(urlParams, requestAdapter) } // Delete delete the user synchronization policy for a partner-specific configuration. -// Deprecated: as of 2022-04/PrivatePreview:CrossTenantSyncPolicy on 2022-03-24 and will be removed 2023-06-06 // [Find more info here] // // [Find more info here]: https://learn.microsoft.com/graph/api/crosstenantidentitysyncpolicypartner-delete?view=graph-rest-1.0 @@ -75,7 +74,6 @@ func (m *CrossTenantAccessPolicyPartnersItemIdentitySynchronizationRequestBuilde return nil } // Get get the user synchronization policy of a partner-specific configuration. -// Deprecated: as of 2022-04/PrivatePreview:CrossTenantSyncPolicy on 2022-03-24 and will be removed 2023-06-06 // [Find more info here] // // [Find more info here]: https://learn.microsoft.com/graph/api/crosstenantidentitysyncpolicypartner-get?view=graph-rest-1.0 @@ -98,7 +96,6 @@ func (m *CrossTenantAccessPolicyPartnersItemIdentitySynchronizationRequestBuilde return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CrossTenantIdentitySyncPolicyPartnerable), nil } // Put update the navigation property identitySynchronization in policies -// Deprecated: as of 2022-04/PrivatePreview:CrossTenantSyncPolicy on 2022-03-24 and will be removed 2023-06-06 func (m *CrossTenantAccessPolicyPartnersItemIdentitySynchronizationRequestBuilder) Put(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CrossTenantIdentitySyncPolicyPartnerable, requestConfiguration *CrossTenantAccessPolicyPartnersItemIdentitySynchronizationRequestBuilderPutRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CrossTenantIdentitySyncPolicyPartnerable, error) { requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -118,7 +115,6 @@ func (m *CrossTenantAccessPolicyPartnersItemIdentitySynchronizationRequestBuilde return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CrossTenantIdentitySyncPolicyPartnerable), nil } // ToDeleteRequestInformation delete the user synchronization policy for a partner-specific configuration. -// Deprecated: as of 2022-04/PrivatePreview:CrossTenantSyncPolicy on 2022-03-24 and will be removed 2023-06-06 func (m *CrossTenantAccessPolicyPartnersItemIdentitySynchronizationRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *CrossTenantAccessPolicyPartnersItemIdentitySynchronizationRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate @@ -131,7 +127,6 @@ func (m *CrossTenantAccessPolicyPartnersItemIdentitySynchronizationRequestBuilde return requestInfo, nil } // ToGetRequestInformation get the user synchronization policy of a partner-specific configuration. -// Deprecated: as of 2022-04/PrivatePreview:CrossTenantSyncPolicy on 2022-03-24 and will be removed 2023-06-06 func (m *CrossTenantAccessPolicyPartnersItemIdentitySynchronizationRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *CrossTenantAccessPolicyPartnersItemIdentitySynchronizationRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate @@ -148,7 +143,6 @@ func (m *CrossTenantAccessPolicyPartnersItemIdentitySynchronizationRequestBuilde return requestInfo, nil } // ToPutRequestInformation update the navigation property identitySynchronization in policies -// Deprecated: as of 2022-04/PrivatePreview:CrossTenantSyncPolicy on 2022-03-24 and will be removed 2023-06-06 func (m *CrossTenantAccessPolicyPartnersItemIdentitySynchronizationRequestBuilder) ToPutRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CrossTenantIdentitySyncPolicyPartnerable, requestConfiguration *CrossTenantAccessPolicyPartnersItemIdentitySynchronizationRequestBuilderPutRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate @@ -166,7 +160,6 @@ func (m *CrossTenantAccessPolicyPartnersItemIdentitySynchronizationRequestBuilde return requestInfo, nil } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. -// Deprecated: as of 2022-04/PrivatePreview:CrossTenantSyncPolicy on 2022-03-24 and will be removed 2023-06-06 func (m *CrossTenantAccessPolicyPartnersItemIdentitySynchronizationRequestBuilder) WithUrl(rawUrl string)(*CrossTenantAccessPolicyPartnersItemIdentitySynchronizationRequestBuilder) { return NewCrossTenantAccessPolicyPartnersItemIdentitySynchronizationRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); } diff --git a/policies/mobile_app_management_policies_item_included_groups_group_item_request_builder.go b/policies/mobile_app_management_policies_item_included_groups_group_item_request_builder.go index 3a8ee526acb..d89c922b573 100644 --- a/policies/mobile_app_management_policies_item_included_groups_group_item_request_builder.go +++ b/policies/mobile_app_management_policies_item_included_groups_group_item_request_builder.go @@ -25,3 +25,7 @@ func NewMobileAppManagementPoliciesItemIncludedGroupsGroupItemRequestBuilder(raw func (m *MobileAppManagementPoliciesItemIncludedGroupsGroupItemRequestBuilder) Ref()(*MobileAppManagementPoliciesItemIncludedGroupsItemRefRequestBuilder) { return NewMobileAppManagementPoliciesItemIncludedGroupsItemRefRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *MobileAppManagementPoliciesItemIncludedGroupsGroupItemRequestBuilder) ServiceProvisioningErrors()(*MobileAppManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilder) { + return NewMobileAppManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/policies/mobile_app_management_policies_item_included_groups_item_service_provisioning_errors_count_request_builder.go b/policies/mobile_app_management_policies_item_included_groups_item_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..545b66f08c3 --- /dev/null +++ b/policies/mobile_app_management_policies_item_included_groups_item_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package policies + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type MobileAppManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileAppManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileAppManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewMobileAppManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilder) { + m := &MobileAppManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/policies/mobileAppManagementPolicies/{mobilityManagementPolicy%2Did}/includedGroups/{group%2Did}/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileAppManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileAppManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileAppManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileAppManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*MobileAppManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilder) { + return NewMobileAppManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/policies/mobile_app_management_policies_item_included_groups_item_service_provisioning_errors_request_builder.go b/policies/mobile_app_management_policies_item_included_groups_item_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..17e45847581 --- /dev/null +++ b/policies/mobile_app_management_policies_item_included_groups_item_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package policies + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileAppManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \policies\mobileAppManagementPolicies\{mobilityManagementPolicy-id}\includedGroups\{group-id}\serviceProvisioningErrors +type MobileAppManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileAppManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +type MobileAppManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileAppManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileAppManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileAppManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewMobileAppManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewMobileAppManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilder) { + m := &MobileAppManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/policies/mobileAppManagementPolicies/{mobilityManagementPolicy%2Did}/includedGroups/{group%2Did}/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileAppManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewMobileAppManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileAppManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileAppManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileAppManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilder) Count()(*MobileAppManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilder) { + return NewMobileAppManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *MobileAppManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileAppManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *MobileAppManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileAppManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileAppManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*MobileAppManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilder) { + return NewMobileAppManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/policies/mobile_device_management_policies_item_included_groups_group_item_request_builder.go b/policies/mobile_device_management_policies_item_included_groups_group_item_request_builder.go index cacdf8959c3..cd095fb5f91 100644 --- a/policies/mobile_device_management_policies_item_included_groups_group_item_request_builder.go +++ b/policies/mobile_device_management_policies_item_included_groups_group_item_request_builder.go @@ -25,3 +25,7 @@ func NewMobileDeviceManagementPoliciesItemIncludedGroupsGroupItemRequestBuilder( func (m *MobileDeviceManagementPoliciesItemIncludedGroupsGroupItemRequestBuilder) Ref()(*MobileDeviceManagementPoliciesItemIncludedGroupsItemRefRequestBuilder) { return NewMobileDeviceManagementPoliciesItemIncludedGroupsItemRefRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *MobileDeviceManagementPoliciesItemIncludedGroupsGroupItemRequestBuilder) ServiceProvisioningErrors()(*MobileDeviceManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilder) { + return NewMobileDeviceManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/policies/mobile_device_management_policies_item_included_groups_item_service_provisioning_errors_count_request_builder.go b/policies/mobile_device_management_policies_item_included_groups_item_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..500bfe4347f --- /dev/null +++ b/policies/mobile_device_management_policies_item_included_groups_item_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package policies + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileDeviceManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type MobileDeviceManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileDeviceManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type MobileDeviceManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MobileDeviceManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileDeviceManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileDeviceManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewMobileDeviceManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewMobileDeviceManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileDeviceManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilder) { + m := &MobileDeviceManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/policies/mobileDeviceManagementPolicies/{mobilityManagementPolicy%2Did}/includedGroups/{group%2Did}/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewMobileDeviceManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewMobileDeviceManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileDeviceManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileDeviceManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *MobileDeviceManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileDeviceManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *MobileDeviceManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileDeviceManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileDeviceManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*MobileDeviceManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilder) { + return NewMobileDeviceManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/policies/mobile_device_management_policies_item_included_groups_item_service_provisioning_errors_request_builder.go b/policies/mobile_device_management_policies_item_included_groups_item_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..77e305f2126 --- /dev/null +++ b/policies/mobile_device_management_policies_item_included_groups_item_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package policies + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// MobileDeviceManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \policies\mobileDeviceManagementPolicies\{mobilityManagementPolicy-id}\includedGroups\{group-id}\serviceProvisioningErrors +type MobileDeviceManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MobileDeviceManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +type MobileDeviceManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// MobileDeviceManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MobileDeviceManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MobileDeviceManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewMobileDeviceManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewMobileDeviceManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileDeviceManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilder) { + m := &MobileDeviceManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/policies/mobileDeviceManagementPolicies/{mobilityManagementPolicy%2Did}/includedGroups/{group%2Did}/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewMobileDeviceManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewMobileDeviceManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MobileDeviceManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMobileDeviceManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *MobileDeviceManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilder) Count()(*MobileDeviceManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilder) { + return NewMobileDeviceManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *MobileDeviceManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *MobileDeviceManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *MobileDeviceManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MobileDeviceManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *MobileDeviceManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*MobileDeviceManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilder) { + return NewMobileDeviceManagementPoliciesItemIncludedGroupsItemServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/print/printer_shares_item_allowed_groups_group_item_request_builder.go b/print/printer_shares_item_allowed_groups_group_item_request_builder.go index cc09116740d..dfcaf78fde1 100644 --- a/print/printer_shares_item_allowed_groups_group_item_request_builder.go +++ b/print/printer_shares_item_allowed_groups_group_item_request_builder.go @@ -25,3 +25,7 @@ func NewPrinterSharesItemAllowedGroupsGroupItemRequestBuilder(rawUrl string, req func (m *PrinterSharesItemAllowedGroupsGroupItemRequestBuilder) Ref()(*PrinterSharesItemAllowedGroupsItemRefRequestBuilder) { return NewPrinterSharesItemAllowedGroupsItemRefRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *PrinterSharesItemAllowedGroupsGroupItemRequestBuilder) ServiceProvisioningErrors()(*PrinterSharesItemAllowedGroupsItemServiceProvisioningErrorsRequestBuilder) { + return NewPrinterSharesItemAllowedGroupsItemServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/print/printer_shares_item_allowed_groups_item_service_provisioning_errors_count_request_builder.go b/print/printer_shares_item_allowed_groups_item_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..f9fc9738c83 --- /dev/null +++ b/print/printer_shares_item_allowed_groups_item_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,83 @@ +package print + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// PrinterSharesItemAllowedGroupsItemServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type PrinterSharesItemAllowedGroupsItemServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// PrinterSharesItemAllowedGroupsItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type PrinterSharesItemAllowedGroupsItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// PrinterSharesItemAllowedGroupsItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type PrinterSharesItemAllowedGroupsItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *PrinterSharesItemAllowedGroupsItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewPrinterSharesItemAllowedGroupsItemServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewPrinterSharesItemAllowedGroupsItemServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PrinterSharesItemAllowedGroupsItemServiceProvisioningErrorsCountRequestBuilder) { + m := &PrinterSharesItemAllowedGroupsItemServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/print/printerShares/{printerShare%2Did}/allowedGroups/{group%2Did}/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewPrinterSharesItemAllowedGroupsItemServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewPrinterSharesItemAllowedGroupsItemServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PrinterSharesItemAllowedGroupsItemServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewPrinterSharesItemAllowedGroupsItemServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +// Deprecated: The printerShares navigation property is deprecated and will stop returning data on July 31, 2023. Please use the shares navigation property instead of this. as of 2023-06/Tasks_And_Plans on 2023-06-13 and will be removed 2023-07-31 +func (m *PrinterSharesItemAllowedGroupsItemServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *PrinterSharesItemAllowedGroupsItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +// Deprecated: The printerShares navigation property is deprecated and will stop returning data on July 31, 2023. Please use the shares navigation property instead of this. as of 2023-06/Tasks_And_Plans on 2023-06-13 and will be removed 2023-07-31 +func (m *PrinterSharesItemAllowedGroupsItemServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *PrinterSharesItemAllowedGroupsItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: The printerShares navigation property is deprecated and will stop returning data on July 31, 2023. Please use the shares navigation property instead of this. as of 2023-06/Tasks_And_Plans on 2023-06-13 and will be removed 2023-07-31 +func (m *PrinterSharesItemAllowedGroupsItemServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*PrinterSharesItemAllowedGroupsItemServiceProvisioningErrorsCountRequestBuilder) { + return NewPrinterSharesItemAllowedGroupsItemServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/print/printer_shares_item_allowed_groups_item_service_provisioning_errors_request_builder.go b/print/printer_shares_item_allowed_groups_item_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..d3730072132 --- /dev/null +++ b/print/printer_shares_item_allowed_groups_item_service_provisioning_errors_request_builder.go @@ -0,0 +1,100 @@ +package print + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// PrinterSharesItemAllowedGroupsItemServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \print\printerShares\{printerShare-id}\allowedGroups\{group-id}\serviceProvisioningErrors +type PrinterSharesItemAllowedGroupsItemServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// PrinterSharesItemAllowedGroupsItemServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +type PrinterSharesItemAllowedGroupsItemServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// PrinterSharesItemAllowedGroupsItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type PrinterSharesItemAllowedGroupsItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *PrinterSharesItemAllowedGroupsItemServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewPrinterSharesItemAllowedGroupsItemServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewPrinterSharesItemAllowedGroupsItemServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PrinterSharesItemAllowedGroupsItemServiceProvisioningErrorsRequestBuilder) { + m := &PrinterSharesItemAllowedGroupsItemServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/print/printerShares/{printerShare%2Did}/allowedGroups/{group%2Did}/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewPrinterSharesItemAllowedGroupsItemServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewPrinterSharesItemAllowedGroupsItemServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PrinterSharesItemAllowedGroupsItemServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewPrinterSharesItemAllowedGroupsItemServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *PrinterSharesItemAllowedGroupsItemServiceProvisioningErrorsRequestBuilder) Count()(*PrinterSharesItemAllowedGroupsItemServiceProvisioningErrorsCountRequestBuilder) { + return NewPrinterSharesItemAllowedGroupsItemServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +// Deprecated: The printerShares navigation property is deprecated and will stop returning data on July 31, 2023. Please use the shares navigation property instead of this. as of 2023-06/Tasks_And_Plans on 2023-06-13 and will be removed 2023-07-31 +func (m *PrinterSharesItemAllowedGroupsItemServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *PrinterSharesItemAllowedGroupsItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +// Deprecated: The printerShares navigation property is deprecated and will stop returning data on July 31, 2023. Please use the shares navigation property instead of this. as of 2023-06/Tasks_And_Plans on 2023-06-13 and will be removed 2023-07-31 +func (m *PrinterSharesItemAllowedGroupsItemServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *PrinterSharesItemAllowedGroupsItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: The printerShares navigation property is deprecated and will stop returning data on July 31, 2023. Please use the shares navigation property instead of this. as of 2023-06/Tasks_And_Plans on 2023-06-13 and will be removed 2023-07-31 +func (m *PrinterSharesItemAllowedGroupsItemServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*PrinterSharesItemAllowedGroupsItemServiceProvisioningErrorsRequestBuilder) { + return NewPrinterSharesItemAllowedGroupsItemServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/print/printer_shares_item_allowed_users_item_service_provisioning_errors_count_request_builder.go b/print/printer_shares_item_allowed_users_item_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..5e4866efa69 --- /dev/null +++ b/print/printer_shares_item_allowed_users_item_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,83 @@ +package print + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// PrinterSharesItemAllowedUsersItemServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type PrinterSharesItemAllowedUsersItemServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// PrinterSharesItemAllowedUsersItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type PrinterSharesItemAllowedUsersItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// PrinterSharesItemAllowedUsersItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type PrinterSharesItemAllowedUsersItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *PrinterSharesItemAllowedUsersItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewPrinterSharesItemAllowedUsersItemServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewPrinterSharesItemAllowedUsersItemServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PrinterSharesItemAllowedUsersItemServiceProvisioningErrorsCountRequestBuilder) { + m := &PrinterSharesItemAllowedUsersItemServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/print/printerShares/{printerShare%2Did}/allowedUsers/{user%2Did}/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewPrinterSharesItemAllowedUsersItemServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewPrinterSharesItemAllowedUsersItemServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PrinterSharesItemAllowedUsersItemServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewPrinterSharesItemAllowedUsersItemServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +// Deprecated: The printerShares navigation property is deprecated and will stop returning data on July 31, 2023. Please use the shares navigation property instead of this. as of 2023-06/Tasks_And_Plans on 2023-06-13 and will be removed 2023-07-31 +func (m *PrinterSharesItemAllowedUsersItemServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *PrinterSharesItemAllowedUsersItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +// Deprecated: The printerShares navigation property is deprecated and will stop returning data on July 31, 2023. Please use the shares navigation property instead of this. as of 2023-06/Tasks_And_Plans on 2023-06-13 and will be removed 2023-07-31 +func (m *PrinterSharesItemAllowedUsersItemServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *PrinterSharesItemAllowedUsersItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: The printerShares navigation property is deprecated and will stop returning data on July 31, 2023. Please use the shares navigation property instead of this. as of 2023-06/Tasks_And_Plans on 2023-06-13 and will be removed 2023-07-31 +func (m *PrinterSharesItemAllowedUsersItemServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*PrinterSharesItemAllowedUsersItemServiceProvisioningErrorsCountRequestBuilder) { + return NewPrinterSharesItemAllowedUsersItemServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/print/printer_shares_item_allowed_users_item_service_provisioning_errors_request_builder.go b/print/printer_shares_item_allowed_users_item_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..7681364b5bb --- /dev/null +++ b/print/printer_shares_item_allowed_users_item_service_provisioning_errors_request_builder.go @@ -0,0 +1,100 @@ +package print + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// PrinterSharesItemAllowedUsersItemServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \print\printerShares\{printerShare-id}\allowedUsers\{user-id}\serviceProvisioningErrors +type PrinterSharesItemAllowedUsersItemServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// PrinterSharesItemAllowedUsersItemServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type PrinterSharesItemAllowedUsersItemServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// PrinterSharesItemAllowedUsersItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type PrinterSharesItemAllowedUsersItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *PrinterSharesItemAllowedUsersItemServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewPrinterSharesItemAllowedUsersItemServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewPrinterSharesItemAllowedUsersItemServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PrinterSharesItemAllowedUsersItemServiceProvisioningErrorsRequestBuilder) { + m := &PrinterSharesItemAllowedUsersItemServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/print/printerShares/{printerShare%2Did}/allowedUsers/{user%2Did}/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewPrinterSharesItemAllowedUsersItemServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewPrinterSharesItemAllowedUsersItemServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PrinterSharesItemAllowedUsersItemServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewPrinterSharesItemAllowedUsersItemServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *PrinterSharesItemAllowedUsersItemServiceProvisioningErrorsRequestBuilder) Count()(*PrinterSharesItemAllowedUsersItemServiceProvisioningErrorsCountRequestBuilder) { + return NewPrinterSharesItemAllowedUsersItemServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +// Deprecated: The printerShares navigation property is deprecated and will stop returning data on July 31, 2023. Please use the shares navigation property instead of this. as of 2023-06/Tasks_And_Plans on 2023-06-13 and will be removed 2023-07-31 +func (m *PrinterSharesItemAllowedUsersItemServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *PrinterSharesItemAllowedUsersItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +// Deprecated: The printerShares navigation property is deprecated and will stop returning data on July 31, 2023. Please use the shares navigation property instead of this. as of 2023-06/Tasks_And_Plans on 2023-06-13 and will be removed 2023-07-31 +func (m *PrinterSharesItemAllowedUsersItemServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *PrinterSharesItemAllowedUsersItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: The printerShares navigation property is deprecated and will stop returning data on July 31, 2023. Please use the shares navigation property instead of this. as of 2023-06/Tasks_And_Plans on 2023-06-13 and will be removed 2023-07-31 +func (m *PrinterSharesItemAllowedUsersItemServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*PrinterSharesItemAllowedUsersItemServiceProvisioningErrorsRequestBuilder) { + return NewPrinterSharesItemAllowedUsersItemServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/print/printer_shares_item_allowed_users_user_item_request_builder.go b/print/printer_shares_item_allowed_users_user_item_request_builder.go index 88eac7bd020..fec529a3415 100644 --- a/print/printer_shares_item_allowed_users_user_item_request_builder.go +++ b/print/printer_shares_item_allowed_users_user_item_request_builder.go @@ -29,3 +29,7 @@ func (m *PrinterSharesItemAllowedUsersUserItemRequestBuilder) MailboxSettings()( func (m *PrinterSharesItemAllowedUsersUserItemRequestBuilder) Ref()(*PrinterSharesItemAllowedUsersItemRefRequestBuilder) { return NewPrinterSharesItemAllowedUsersItemRefRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *PrinterSharesItemAllowedUsersUserItemRequestBuilder) ServiceProvisioningErrors()(*PrinterSharesItemAllowedUsersItemServiceProvisioningErrorsRequestBuilder) { + return NewPrinterSharesItemAllowedUsersItemServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/print/printers_item_task_triggers_item_definition_request_builder.go b/print/printers_item_task_triggers_item_definition_request_builder.go index 0d0c5542181..825c930b722 100644 --- a/print/printers_item_task_triggers_item_definition_request_builder.go +++ b/print/printers_item_task_triggers_item_definition_request_builder.go @@ -11,7 +11,7 @@ import ( type PrintersItemTaskTriggersItemDefinitionRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// PrintersItemTaskTriggersItemDefinitionRequestBuilderGetQueryParameters an abstract definition that will be used to create a printTask when triggered by a print event. Read-only. +// PrintersItemTaskTriggersItemDefinitionRequestBuilderGetQueryParameters an abstract definition that is used to create a printTask when triggered by a print event. Read-only. type PrintersItemTaskTriggersItemDefinitionRequestBuilderGetQueryParameters struct { // Expand related entities Expand []string `uriparametername:"%24expand"` @@ -40,7 +40,7 @@ func NewPrintersItemTaskTriggersItemDefinitionRequestBuilder(rawUrl string, requ urlParams["request-raw-url"] = rawUrl return NewPrintersItemTaskTriggersItemDefinitionRequestBuilderInternal(urlParams, requestAdapter) } -// Get an abstract definition that will be used to create a printTask when triggered by a print event. Read-only. +// Get an abstract definition that is used to create a printTask when triggered by a print event. Read-only. func (m *PrintersItemTaskTriggersItemDefinitionRequestBuilder) Get(ctx context.Context, requestConfiguration *PrintersItemTaskTriggersItemDefinitionRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PrintTaskDefinitionable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -59,7 +59,7 @@ func (m *PrintersItemTaskTriggersItemDefinitionRequestBuilder) Get(ctx context.C } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PrintTaskDefinitionable), nil } -// ToGetRequestInformation an abstract definition that will be used to create a printTask when triggered by a print event. Read-only. +// ToGetRequestInformation an abstract definition that is used to create a printTask when triggered by a print event. Read-only. func (m *PrintersItemTaskTriggersItemDefinitionRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *PrintersItemTaskTriggersItemDefinitionRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/print/shares_item_allowed_groups_group_item_request_builder.go b/print/shares_item_allowed_groups_group_item_request_builder.go index 0cd9b3a26c1..82a919b6a28 100644 --- a/print/shares_item_allowed_groups_group_item_request_builder.go +++ b/print/shares_item_allowed_groups_group_item_request_builder.go @@ -25,3 +25,7 @@ func NewSharesItemAllowedGroupsGroupItemRequestBuilder(rawUrl string, requestAda func (m *SharesItemAllowedGroupsGroupItemRequestBuilder) Ref()(*SharesItemAllowedGroupsItemRefRequestBuilder) { return NewSharesItemAllowedGroupsItemRefRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *SharesItemAllowedGroupsGroupItemRequestBuilder) ServiceProvisioningErrors()(*SharesItemAllowedGroupsItemServiceProvisioningErrorsRequestBuilder) { + return NewSharesItemAllowedGroupsItemServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/print/shares_item_allowed_groups_item_service_provisioning_errors_count_request_builder.go b/print/shares_item_allowed_groups_item_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..ca0978df700 --- /dev/null +++ b/print/shares_item_allowed_groups_item_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package print + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// SharesItemAllowedGroupsItemServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type SharesItemAllowedGroupsItemServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// SharesItemAllowedGroupsItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type SharesItemAllowedGroupsItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// SharesItemAllowedGroupsItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type SharesItemAllowedGroupsItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *SharesItemAllowedGroupsItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewSharesItemAllowedGroupsItemServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewSharesItemAllowedGroupsItemServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*SharesItemAllowedGroupsItemServiceProvisioningErrorsCountRequestBuilder) { + m := &SharesItemAllowedGroupsItemServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/print/shares/{printerShare%2Did}/allowedGroups/{group%2Did}/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewSharesItemAllowedGroupsItemServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewSharesItemAllowedGroupsItemServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*SharesItemAllowedGroupsItemServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewSharesItemAllowedGroupsItemServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *SharesItemAllowedGroupsItemServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *SharesItemAllowedGroupsItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *SharesItemAllowedGroupsItemServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *SharesItemAllowedGroupsItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *SharesItemAllowedGroupsItemServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*SharesItemAllowedGroupsItemServiceProvisioningErrorsCountRequestBuilder) { + return NewSharesItemAllowedGroupsItemServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/print/shares_item_allowed_groups_item_service_provisioning_errors_request_builder.go b/print/shares_item_allowed_groups_item_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..1a6e4131e2c --- /dev/null +++ b/print/shares_item_allowed_groups_item_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package print + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// SharesItemAllowedGroupsItemServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \print\shares\{printerShare-id}\allowedGroups\{group-id}\serviceProvisioningErrors +type SharesItemAllowedGroupsItemServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// SharesItemAllowedGroupsItemServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +type SharesItemAllowedGroupsItemServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// SharesItemAllowedGroupsItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type SharesItemAllowedGroupsItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *SharesItemAllowedGroupsItemServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewSharesItemAllowedGroupsItemServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewSharesItemAllowedGroupsItemServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*SharesItemAllowedGroupsItemServiceProvisioningErrorsRequestBuilder) { + m := &SharesItemAllowedGroupsItemServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/print/shares/{printerShare%2Did}/allowedGroups/{group%2Did}/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewSharesItemAllowedGroupsItemServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewSharesItemAllowedGroupsItemServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*SharesItemAllowedGroupsItemServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewSharesItemAllowedGroupsItemServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *SharesItemAllowedGroupsItemServiceProvisioningErrorsRequestBuilder) Count()(*SharesItemAllowedGroupsItemServiceProvisioningErrorsCountRequestBuilder) { + return NewSharesItemAllowedGroupsItemServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *SharesItemAllowedGroupsItemServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *SharesItemAllowedGroupsItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *SharesItemAllowedGroupsItemServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *SharesItemAllowedGroupsItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *SharesItemAllowedGroupsItemServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*SharesItemAllowedGroupsItemServiceProvisioningErrorsRequestBuilder) { + return NewSharesItemAllowedGroupsItemServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/print/shares_item_allowed_users_item_service_provisioning_errors_count_request_builder.go b/print/shares_item_allowed_users_item_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..bef3b59a550 --- /dev/null +++ b/print/shares_item_allowed_users_item_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package print + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// SharesItemAllowedUsersItemServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type SharesItemAllowedUsersItemServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// SharesItemAllowedUsersItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type SharesItemAllowedUsersItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// SharesItemAllowedUsersItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type SharesItemAllowedUsersItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *SharesItemAllowedUsersItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewSharesItemAllowedUsersItemServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewSharesItemAllowedUsersItemServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*SharesItemAllowedUsersItemServiceProvisioningErrorsCountRequestBuilder) { + m := &SharesItemAllowedUsersItemServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/print/shares/{printerShare%2Did}/allowedUsers/{user%2Did}/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewSharesItemAllowedUsersItemServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewSharesItemAllowedUsersItemServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*SharesItemAllowedUsersItemServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewSharesItemAllowedUsersItemServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *SharesItemAllowedUsersItemServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *SharesItemAllowedUsersItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *SharesItemAllowedUsersItemServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *SharesItemAllowedUsersItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *SharesItemAllowedUsersItemServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*SharesItemAllowedUsersItemServiceProvisioningErrorsCountRequestBuilder) { + return NewSharesItemAllowedUsersItemServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/print/shares_item_allowed_users_item_service_provisioning_errors_request_builder.go b/print/shares_item_allowed_users_item_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..9830bcef084 --- /dev/null +++ b/print/shares_item_allowed_users_item_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package print + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// SharesItemAllowedUsersItemServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \print\shares\{printerShare-id}\allowedUsers\{user-id}\serviceProvisioningErrors +type SharesItemAllowedUsersItemServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// SharesItemAllowedUsersItemServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type SharesItemAllowedUsersItemServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// SharesItemAllowedUsersItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type SharesItemAllowedUsersItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *SharesItemAllowedUsersItemServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewSharesItemAllowedUsersItemServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewSharesItemAllowedUsersItemServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*SharesItemAllowedUsersItemServiceProvisioningErrorsRequestBuilder) { + m := &SharesItemAllowedUsersItemServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/print/shares/{printerShare%2Did}/allowedUsers/{user%2Did}/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewSharesItemAllowedUsersItemServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewSharesItemAllowedUsersItemServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*SharesItemAllowedUsersItemServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewSharesItemAllowedUsersItemServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *SharesItemAllowedUsersItemServiceProvisioningErrorsRequestBuilder) Count()(*SharesItemAllowedUsersItemServiceProvisioningErrorsCountRequestBuilder) { + return NewSharesItemAllowedUsersItemServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *SharesItemAllowedUsersItemServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *SharesItemAllowedUsersItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *SharesItemAllowedUsersItemServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *SharesItemAllowedUsersItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *SharesItemAllowedUsersItemServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*SharesItemAllowedUsersItemServiceProvisioningErrorsRequestBuilder) { + return NewSharesItemAllowedUsersItemServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/print/shares_item_allowed_users_user_item_request_builder.go b/print/shares_item_allowed_users_user_item_request_builder.go index a750d2ae70d..11ed0128e41 100644 --- a/print/shares_item_allowed_users_user_item_request_builder.go +++ b/print/shares_item_allowed_users_user_item_request_builder.go @@ -29,3 +29,7 @@ func (m *SharesItemAllowedUsersUserItemRequestBuilder) MailboxSettings()(*Shares func (m *SharesItemAllowedUsersUserItemRequestBuilder) Ref()(*SharesItemAllowedUsersItemRefRequestBuilder) { return NewSharesItemAllowedUsersItemRefRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *SharesItemAllowedUsersUserItemRequestBuilder) ServiceProvisioningErrors()(*SharesItemAllowedUsersItemServiceProvisioningErrorsRequestBuilder) { + return NewSharesItemAllowedUsersItemServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/privacy/subject_rights_requests_item_approvers_item_service_provisioning_errors_count_request_builder.go b/privacy/subject_rights_requests_item_approvers_item_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..0aeb4db1550 --- /dev/null +++ b/privacy/subject_rights_requests_item_approvers_item_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,83 @@ +package privacy + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewSubjectRightsRequestsItemApproversItemServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewSubjectRightsRequestsItemApproversItemServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsCountRequestBuilder) { + m := &SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/privacy/subjectRightsRequests/{subjectRightsRequest%2Did}/approvers/{user%2Did}/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewSubjectRightsRequestsItemApproversItemServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewSubjectRightsRequestsItemApproversItemServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewSubjectRightsRequestsItemApproversItemServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +// Deprecated: The subject rights request API under Privacy is deprecated and will stop working on March 22, 2025. Please use the new API under Security. as of 2022-02/PrivacyDeprecate on 2022-03-22 and will be removed 2025-03-20 +func (m *SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +// Deprecated: The subject rights request API under Privacy is deprecated and will stop working on March 22, 2025. Please use the new API under Security. as of 2022-02/PrivacyDeprecate on 2022-03-22 and will be removed 2025-03-20 +func (m *SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: The subject rights request API under Privacy is deprecated and will stop working on March 22, 2025. Please use the new API under Security. as of 2022-02/PrivacyDeprecate on 2022-03-22 and will be removed 2025-03-20 +func (m *SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsCountRequestBuilder) { + return NewSubjectRightsRequestsItemApproversItemServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/privacy/subject_rights_requests_item_approvers_item_service_provisioning_errors_request_builder.go b/privacy/subject_rights_requests_item_approvers_item_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..29ecd6c2d0e --- /dev/null +++ b/privacy/subject_rights_requests_item_approvers_item_service_provisioning_errors_request_builder.go @@ -0,0 +1,100 @@ +package privacy + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \privacy\subjectRightsRequests\{subjectRightsRequest-id}\approvers\{user-id}\serviceProvisioningErrors +type SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewSubjectRightsRequestsItemApproversItemServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewSubjectRightsRequestsItemApproversItemServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsRequestBuilder) { + m := &SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/privacy/subjectRightsRequests/{subjectRightsRequest%2Did}/approvers/{user%2Did}/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewSubjectRightsRequestsItemApproversItemServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewSubjectRightsRequestsItemApproversItemServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewSubjectRightsRequestsItemApproversItemServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsRequestBuilder) Count()(*SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsCountRequestBuilder) { + return NewSubjectRightsRequestsItemApproversItemServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +// Deprecated: The subject rights request API under Privacy is deprecated and will stop working on March 22, 2025. Please use the new API under Security. as of 2022-02/PrivacyDeprecate on 2022-03-22 and will be removed 2025-03-20 +func (m *SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +// Deprecated: The subject rights request API under Privacy is deprecated and will stop working on March 22, 2025. Please use the new API under Security. as of 2022-02/PrivacyDeprecate on 2022-03-22 and will be removed 2025-03-20 +func (m *SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: The subject rights request API under Privacy is deprecated and will stop working on March 22, 2025. Please use the new API under Security. as of 2022-02/PrivacyDeprecate on 2022-03-22 and will be removed 2025-03-20 +func (m *SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsRequestBuilder) { + return NewSubjectRightsRequestsItemApproversItemServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/privacy/subject_rights_requests_item_approvers_user_item_request_builder.go b/privacy/subject_rights_requests_item_approvers_user_item_request_builder.go index 2d1884e469f..a1327893e38 100644 --- a/privacy/subject_rights_requests_item_approvers_user_item_request_builder.go +++ b/privacy/subject_rights_requests_item_approvers_user_item_request_builder.go @@ -64,6 +64,10 @@ func (m *SubjectRightsRequestsItemApproversUserItemRequestBuilder) Get(ctx conte func (m *SubjectRightsRequestsItemApproversUserItemRequestBuilder) MailboxSettings()(*SubjectRightsRequestsItemApproversItemMailboxSettingsRequestBuilder) { return NewSubjectRightsRequestsItemApproversItemMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *SubjectRightsRequestsItemApproversUserItemRequestBuilder) ServiceProvisioningErrors()(*SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsRequestBuilder) { + return NewSubjectRightsRequestsItemApproversItemServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation get approvers from privacy // Deprecated: The subject rights request API under Privacy is deprecated and will stop working on March 22, 2025. Please use the new API under Security. as of 2022-02/PrivacyDeprecate on 2022-03-22 and will be removed 2025-03-20 func (m *SubjectRightsRequestsItemApproversUserItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *SubjectRightsRequestsItemApproversUserItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { diff --git a/privacy/subject_rights_requests_item_collaborators_item_service_provisioning_errors_count_request_builder.go b/privacy/subject_rights_requests_item_collaborators_item_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..2b494034b56 --- /dev/null +++ b/privacy/subject_rights_requests_item_collaborators_item_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,83 @@ +package privacy + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewSubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewSubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsCountRequestBuilder) { + m := &SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/privacy/subjectRightsRequests/{subjectRightsRequest%2Did}/collaborators/{user%2Did}/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewSubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewSubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewSubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +// Deprecated: The subject rights request API under Privacy is deprecated and will stop working on March 22, 2025. Please use the new API under Security. as of 2022-02/PrivacyDeprecate on 2022-03-22 and will be removed 2025-03-20 +func (m *SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +// Deprecated: The subject rights request API under Privacy is deprecated and will stop working on March 22, 2025. Please use the new API under Security. as of 2022-02/PrivacyDeprecate on 2022-03-22 and will be removed 2025-03-20 +func (m *SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: The subject rights request API under Privacy is deprecated and will stop working on March 22, 2025. Please use the new API under Security. as of 2022-02/PrivacyDeprecate on 2022-03-22 and will be removed 2025-03-20 +func (m *SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsCountRequestBuilder) { + return NewSubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/privacy/subject_rights_requests_item_collaborators_item_service_provisioning_errors_request_builder.go b/privacy/subject_rights_requests_item_collaborators_item_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..a54de5e3fbc --- /dev/null +++ b/privacy/subject_rights_requests_item_collaborators_item_service_provisioning_errors_request_builder.go @@ -0,0 +1,100 @@ +package privacy + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \privacy\subjectRightsRequests\{subjectRightsRequest-id}\collaborators\{user-id}\serviceProvisioningErrors +type SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewSubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewSubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsRequestBuilder) { + m := &SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/privacy/subjectRightsRequests/{subjectRightsRequest%2Did}/collaborators/{user%2Did}/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewSubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewSubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewSubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsRequestBuilder) Count()(*SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsCountRequestBuilder) { + return NewSubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +// Deprecated: The subject rights request API under Privacy is deprecated and will stop working on March 22, 2025. Please use the new API under Security. as of 2022-02/PrivacyDeprecate on 2022-03-22 and will be removed 2025-03-20 +func (m *SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +// Deprecated: The subject rights request API under Privacy is deprecated and will stop working on March 22, 2025. Please use the new API under Security. as of 2022-02/PrivacyDeprecate on 2022-03-22 and will be removed 2025-03-20 +func (m *SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: The subject rights request API under Privacy is deprecated and will stop working on March 22, 2025. Please use the new API under Security. as of 2022-02/PrivacyDeprecate on 2022-03-22 and will be removed 2025-03-20 +func (m *SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsRequestBuilder) { + return NewSubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/privacy/subject_rights_requests_item_collaborators_user_item_request_builder.go b/privacy/subject_rights_requests_item_collaborators_user_item_request_builder.go index f92a5898b51..00b8debc786 100644 --- a/privacy/subject_rights_requests_item_collaborators_user_item_request_builder.go +++ b/privacy/subject_rights_requests_item_collaborators_user_item_request_builder.go @@ -64,6 +64,10 @@ func (m *SubjectRightsRequestsItemCollaboratorsUserItemRequestBuilder) Get(ctx c func (m *SubjectRightsRequestsItemCollaboratorsUserItemRequestBuilder) MailboxSettings()(*SubjectRightsRequestsItemCollaboratorsItemMailboxSettingsRequestBuilder) { return NewSubjectRightsRequestsItemCollaboratorsItemMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *SubjectRightsRequestsItemCollaboratorsUserItemRequestBuilder) ServiceProvisioningErrors()(*SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsRequestBuilder) { + return NewSubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation get collaborators from privacy // Deprecated: The subject rights request API under Privacy is deprecated and will stop working on March 22, 2025. Please use the new API under Security. as of 2022-02/PrivacyDeprecate on 2022-03-22 and will be removed 2025-03-20 func (m *SubjectRightsRequestsItemCollaboratorsUserItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *SubjectRightsRequestsItemCollaboratorsUserItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { diff --git a/riskdetections/risk_detections_request_builder.go b/riskdetections/risk_detections_request_builder.go index dfa7c1c674a..cfcca57aaf2 100644 --- a/riskdetections/risk_detections_request_builder.go +++ b/riskdetections/risk_detections_request_builder.go @@ -11,7 +11,7 @@ import ( type RiskDetectionsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// RiskDetectionsRequestBuilderGetQueryParameters retrieve the properties of a riskDetection object. +// RiskDetectionsRequestBuilderGetQueryParameters retrieve the properties of a collection of riskDetection objects. type RiskDetectionsRequestBuilderGetQueryParameters struct { // Expand related entities Expand []string `uriparametername:"%24expand"` @@ -66,10 +66,10 @@ func NewRiskDetectionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7dae urlParams["request-raw-url"] = rawUrl return NewRiskDetectionsRequestBuilderInternal(urlParams, requestAdapter) } -// Get retrieve the properties of a riskDetection object. +// Get retrieve the properties of a collection of riskDetection objects. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/riskdetection-get?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/riskdetection-list?view=graph-rest-1.0 func (m *RiskDetectionsRequestBuilder) Get(ctx context.Context, requestConfiguration *RiskDetectionsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.RiskDetectionCollectionResponseable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -107,7 +107,7 @@ func (m *RiskDetectionsRequestBuilder) Post(ctx context.Context, body ie233ee762 } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.RiskDetectionable), nil } -// ToGetRequestInformation retrieve the properties of a riskDetection object. +// ToGetRequestInformation retrieve the properties of a collection of riskDetection objects. func (m *RiskDetectionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *RiskDetectionsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/security/cases_ediscovery_cases_item_custodians_item_unified_group_sources_item_group_request_builder.go b/security/cases_ediscovery_cases_item_custodians_item_unified_group_sources_item_group_request_builder.go index e6abe7336a0..d7faa38a2a6 100644 --- a/security/cases_ediscovery_cases_item_custodians_item_unified_group_sources_item_group_request_builder.go +++ b/security/cases_ediscovery_cases_item_custodians_item_unified_group_sources_item_group_request_builder.go @@ -59,6 +59,10 @@ func (m *CasesEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupReque } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Groupable), nil } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *CasesEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupRequestBuilder) ServiceProvisioningErrors()(*CasesEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilder) { + return NewCasesEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation represents a group. func (m *CasesEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *CasesEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/security/cases_ediscovery_cases_item_custodians_item_unified_group_sources_item_group_service_provisioning_errors_count_request_builder.go b/security/cases_ediscovery_cases_item_custodians_item_unified_group_sources_item_group_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..6febfdaca57 --- /dev/null +++ b/security/cases_ediscovery_cases_item_custodians_item_unified_group_sources_item_group_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package security + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// CasesEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type CasesEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// CasesEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type CasesEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// CasesEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CasesEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *CasesEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewCasesEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewCasesEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CasesEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilder) { + m := &CasesEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/custodians/{ediscoveryCustodian%2Did}/unifiedGroupSources/{unifiedGroupSource%2Did}/group/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewCasesEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewCasesEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CasesEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewCasesEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *CasesEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *CasesEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *CasesEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *CasesEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *CasesEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*CasesEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilder) { + return NewCasesEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/security/cases_ediscovery_cases_item_custodians_item_unified_group_sources_item_group_service_provisioning_errors_request_builder.go b/security/cases_ediscovery_cases_item_custodians_item_unified_group_sources_item_group_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..39a31c5cd68 --- /dev/null +++ b/security/cases_ediscovery_cases_item_custodians_item_unified_group_sources_item_group_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package security + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// CasesEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \security\cases\ediscoveryCases\{ediscoveryCase-id}\custodians\{ediscoveryCustodian-id}\unifiedGroupSources\{unifiedGroupSource-id}\group\serviceProvisioningErrors +type CasesEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// CasesEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +type CasesEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// CasesEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CasesEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *CasesEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewCasesEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewCasesEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CasesEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilder) { + m := &CasesEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/custodians/{ediscoveryCustodian%2Did}/unifiedGroupSources/{unifiedGroupSource%2Did}/group/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewCasesEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewCasesEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CasesEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewCasesEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *CasesEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilder) Count()(*CasesEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilder) { + return NewCasesEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *CasesEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *CasesEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *CasesEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *CasesEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *CasesEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*CasesEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilder) { + return NewCasesEdiscoveryCasesItemCustodiansItemUnifiedGroupSourcesItemGroupServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/security/subject_rights_requests_item_approvers_item_service_provisioning_errors_count_request_builder.go b/security/subject_rights_requests_item_approvers_item_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..1cac3b64db8 --- /dev/null +++ b/security/subject_rights_requests_item_approvers_item_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package security + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewSubjectRightsRequestsItemApproversItemServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewSubjectRightsRequestsItemApproversItemServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsCountRequestBuilder) { + m := &SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/security/subjectRightsRequests/{subjectRightsRequest%2Did}/approvers/{user%2Did}/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewSubjectRightsRequestsItemApproversItemServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewSubjectRightsRequestsItemApproversItemServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewSubjectRightsRequestsItemApproversItemServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsCountRequestBuilder) { + return NewSubjectRightsRequestsItemApproversItemServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/security/subject_rights_requests_item_approvers_item_service_provisioning_errors_request_builder.go b/security/subject_rights_requests_item_approvers_item_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..1d6bc68dc7a --- /dev/null +++ b/security/subject_rights_requests_item_approvers_item_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package security + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \security\subjectRightsRequests\{subjectRightsRequest-id}\approvers\{user-id}\serviceProvisioningErrors +type SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewSubjectRightsRequestsItemApproversItemServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewSubjectRightsRequestsItemApproversItemServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsRequestBuilder) { + m := &SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/security/subjectRightsRequests/{subjectRightsRequest%2Did}/approvers/{user%2Did}/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewSubjectRightsRequestsItemApproversItemServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewSubjectRightsRequestsItemApproversItemServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewSubjectRightsRequestsItemApproversItemServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsRequestBuilder) Count()(*SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsCountRequestBuilder) { + return NewSubjectRightsRequestsItemApproversItemServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsRequestBuilder) { + return NewSubjectRightsRequestsItemApproversItemServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/security/subject_rights_requests_item_approvers_user_item_request_builder.go b/security/subject_rights_requests_item_approvers_user_item_request_builder.go index 2dab5d8c868..6956c44da2f 100644 --- a/security/subject_rights_requests_item_approvers_user_item_request_builder.go +++ b/security/subject_rights_requests_item_approvers_user_item_request_builder.go @@ -63,6 +63,10 @@ func (m *SubjectRightsRequestsItemApproversUserItemRequestBuilder) Get(ctx conte func (m *SubjectRightsRequestsItemApproversUserItemRequestBuilder) MailboxSettings()(*SubjectRightsRequestsItemApproversItemMailboxSettingsRequestBuilder) { return NewSubjectRightsRequestsItemApproversItemMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *SubjectRightsRequestsItemApproversUserItemRequestBuilder) ServiceProvisioningErrors()(*SubjectRightsRequestsItemApproversItemServiceProvisioningErrorsRequestBuilder) { + return NewSubjectRightsRequestsItemApproversItemServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation get approvers from security func (m *SubjectRightsRequestsItemApproversUserItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *SubjectRightsRequestsItemApproversUserItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/security/subject_rights_requests_item_collaborators_item_service_provisioning_errors_count_request_builder.go b/security/subject_rights_requests_item_collaborators_item_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..a5ac395f9f3 --- /dev/null +++ b/security/subject_rights_requests_item_collaborators_item_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package security + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewSubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewSubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsCountRequestBuilder) { + m := &SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/security/subjectRightsRequests/{subjectRightsRequest%2Did}/collaborators/{user%2Did}/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewSubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewSubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewSubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsCountRequestBuilder) { + return NewSubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/security/subject_rights_requests_item_collaborators_item_service_provisioning_errors_request_builder.go b/security/subject_rights_requests_item_collaborators_item_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..6687326eb93 --- /dev/null +++ b/security/subject_rights_requests_item_collaborators_item_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package security + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \security\subjectRightsRequests\{subjectRightsRequest-id}\collaborators\{user-id}\serviceProvisioningErrors +type SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewSubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewSubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsRequestBuilder) { + m := &SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/security/subjectRightsRequests/{subjectRightsRequest%2Did}/collaborators/{user%2Did}/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewSubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewSubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewSubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsRequestBuilder) Count()(*SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsCountRequestBuilder) { + return NewSubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsRequestBuilder) { + return NewSubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/security/subject_rights_requests_item_collaborators_user_item_request_builder.go b/security/subject_rights_requests_item_collaborators_user_item_request_builder.go index 1c8d378aed4..7c26deccf51 100644 --- a/security/subject_rights_requests_item_collaborators_user_item_request_builder.go +++ b/security/subject_rights_requests_item_collaborators_user_item_request_builder.go @@ -63,6 +63,10 @@ func (m *SubjectRightsRequestsItemCollaboratorsUserItemRequestBuilder) Get(ctx c func (m *SubjectRightsRequestsItemCollaboratorsUserItemRequestBuilder) MailboxSettings()(*SubjectRightsRequestsItemCollaboratorsItemMailboxSettingsRequestBuilder) { return NewSubjectRightsRequestsItemCollaboratorsItemMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *SubjectRightsRequestsItemCollaboratorsUserItemRequestBuilder) ServiceProvisioningErrors()(*SubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsRequestBuilder) { + return NewSubjectRightsRequestsItemCollaboratorsItemServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation get collaborators from security func (m *SubjectRightsRequestsItemCollaboratorsUserItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *SubjectRightsRequestsItemCollaboratorsUserItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/security/threat_intelligence_hosts_item_child_host_pairs_request_builder.go b/security/threat_intelligence_hosts_item_child_host_pairs_request_builder.go index dadd735a27a..6ddaff91d30 100644 --- a/security/threat_intelligence_hosts_item_child_host_pairs_request_builder.go +++ b/security/threat_intelligence_hosts_item_child_host_pairs_request_builder.go @@ -11,7 +11,7 @@ import ( type ThreatIntelligenceHostsItemChildHostPairsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ThreatIntelligenceHostsItemChildHostPairsRequestBuilderGetQueryParameters get the list of hostPair resources associated with a host, where that host is the *parent* and has an outgoing pairing to a *child*. +// ThreatIntelligenceHostsItemChildHostPairsRequestBuilderGetQueryParameters get the list of hostPair resources associated with a specified host, where that host is the *parent* and has an outgoing pairing to a *child*. type ThreatIntelligenceHostsItemChildHostPairsRequestBuilderGetQueryParameters struct { // Include count of items Count *bool `uriparametername:"%24count"` @@ -67,7 +67,7 @@ func NewThreatIntelligenceHostsItemChildHostPairsRequestBuilder(rawUrl string, r func (m *ThreatIntelligenceHostsItemChildHostPairsRequestBuilder) Count()(*ThreatIntelligenceHostsItemChildHostPairsCountRequestBuilder) { return NewThreatIntelligenceHostsItemChildHostPairsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Get get the list of hostPair resources associated with a host, where that host is the *parent* and has an outgoing pairing to a *child*. +// Get get the list of hostPair resources associated with a specified host, where that host is the *parent* and has an outgoing pairing to a *child*. // [Find more info here] // // [Find more info here]: https://learn.microsoft.com/graph/api/security-host-list-childhostpairs?view=graph-rest-1.0 @@ -89,7 +89,7 @@ func (m *ThreatIntelligenceHostsItemChildHostPairsRequestBuilder) Get(ctx contex } return res.(i084fa7ab3bba802bf5cc3b408e230cc64c167a57976e0d42c37e17154afd5b78.HostPairCollectionResponseable), nil } -// ToGetRequestInformation get the list of hostPair resources associated with a host, where that host is the *parent* and has an outgoing pairing to a *child*. +// ToGetRequestInformation get the list of hostPair resources associated with a specified host, where that host is the *parent* and has an outgoing pairing to a *child*. func (m *ThreatIntelligenceHostsItemChildHostPairsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ThreatIntelligenceHostsItemChildHostPairsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/security/threat_intelligence_hosts_item_host_pairs_request_builder.go b/security/threat_intelligence_hosts_item_host_pairs_request_builder.go index be17bb3233d..f71af5e0a54 100644 --- a/security/threat_intelligence_hosts_item_host_pairs_request_builder.go +++ b/security/threat_intelligence_hosts_item_host_pairs_request_builder.go @@ -11,7 +11,7 @@ import ( type ThreatIntelligenceHostsItemHostPairsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ThreatIntelligenceHostsItemHostPairsRequestBuilderGetQueryParameters get the list of hostPair resources associated with a host, where that host is *either* the *parent* or the *child*. +// ThreatIntelligenceHostsItemHostPairsRequestBuilderGetQueryParameters get the list of hostPair resources associated with a specified host, where that host is *either* the *parent* or the *child*. type ThreatIntelligenceHostsItemHostPairsRequestBuilderGetQueryParameters struct { // Include count of items Count *bool `uriparametername:"%24count"` @@ -67,7 +67,7 @@ func NewThreatIntelligenceHostsItemHostPairsRequestBuilder(rawUrl string, reques func (m *ThreatIntelligenceHostsItemHostPairsRequestBuilder) Count()(*ThreatIntelligenceHostsItemHostPairsCountRequestBuilder) { return NewThreatIntelligenceHostsItemHostPairsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Get get the list of hostPair resources associated with a host, where that host is *either* the *parent* or the *child*. +// Get get the list of hostPair resources associated with a specified host, where that host is *either* the *parent* or the *child*. // [Find more info here] // // [Find more info here]: https://learn.microsoft.com/graph/api/security-host-list-hostpairs?view=graph-rest-1.0 @@ -89,7 +89,7 @@ func (m *ThreatIntelligenceHostsItemHostPairsRequestBuilder) Get(ctx context.Con } return res.(i084fa7ab3bba802bf5cc3b408e230cc64c167a57976e0d42c37e17154afd5b78.HostPairCollectionResponseable), nil } -// ToGetRequestInformation get the list of hostPair resources associated with a host, where that host is *either* the *parent* or the *child*. +// ToGetRequestInformation get the list of hostPair resources associated with a specified host, where that host is *either* the *parent* or the *child*. func (m *ThreatIntelligenceHostsItemHostPairsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ThreatIntelligenceHostsItemHostPairsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/security/threat_intelligence_hosts_item_parent_host_pairs_request_builder.go b/security/threat_intelligence_hosts_item_parent_host_pairs_request_builder.go index 9f66d15493a..301f24a0b80 100644 --- a/security/threat_intelligence_hosts_item_parent_host_pairs_request_builder.go +++ b/security/threat_intelligence_hosts_item_parent_host_pairs_request_builder.go @@ -11,7 +11,7 @@ import ( type ThreatIntelligenceHostsItemParentHostPairsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ThreatIntelligenceHostsItemParentHostPairsRequestBuilderGetQueryParameters get the list of hostPair resources associated with a host, where that host is the *child* and has an incoming pairing with a *parent*. +// ThreatIntelligenceHostsItemParentHostPairsRequestBuilderGetQueryParameters get the list of hostPair resources associated with a specified host, where that host is the *child* and has an incoming pairing with a *parent*. type ThreatIntelligenceHostsItemParentHostPairsRequestBuilderGetQueryParameters struct { // Include count of items Count *bool `uriparametername:"%24count"` @@ -67,7 +67,7 @@ func NewThreatIntelligenceHostsItemParentHostPairsRequestBuilder(rawUrl string, func (m *ThreatIntelligenceHostsItemParentHostPairsRequestBuilder) Count()(*ThreatIntelligenceHostsItemParentHostPairsCountRequestBuilder) { return NewThreatIntelligenceHostsItemParentHostPairsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Get get the list of hostPair resources associated with a host, where that host is the *child* and has an incoming pairing with a *parent*. +// Get get the list of hostPair resources associated with a specified host, where that host is the *child* and has an incoming pairing with a *parent*. // [Find more info here] // // [Find more info here]: https://learn.microsoft.com/graph/api/security-host-list-parenthostpairs?view=graph-rest-1.0 @@ -89,7 +89,7 @@ func (m *ThreatIntelligenceHostsItemParentHostPairsRequestBuilder) Get(ctx conte } return res.(i084fa7ab3bba802bf5cc3b408e230cc64c167a57976e0d42c37e17154afd5b78.HostPairCollectionResponseable), nil } -// ToGetRequestInformation get the list of hostPair resources associated with a host, where that host is the *child* and has an incoming pairing with a *parent*. +// ToGetRequestInformation get the list of hostPair resources associated with a specified host, where that host is the *child* and has an incoming pairing with a *parent*. func (m *ThreatIntelligenceHostsItemParentHostPairsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ThreatIntelligenceHostsItemParentHostPairsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/shares/item_created_by_user_request_builder.go b/shares/item_created_by_user_request_builder.go index 81d0b5caa4f..479cfce5bfa 100644 --- a/shares/item_created_by_user_request_builder.go +++ b/shares/item_created_by_user_request_builder.go @@ -63,6 +63,10 @@ func (m *ItemCreatedByUserRequestBuilder) Get(ctx context.Context, requestConfig func (m *ItemCreatedByUserRequestBuilder) MailboxSettings()(*ItemCreatedByUserMailboxSettingsRequestBuilder) { return NewItemCreatedByUserMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *ItemCreatedByUserRequestBuilder) ServiceProvisioningErrors()(*ItemCreatedByUserServiceProvisioningErrorsRequestBuilder) { + return NewItemCreatedByUserServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation get createdByUser from shares func (m *ItemCreatedByUserRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemCreatedByUserRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/shares/item_created_by_user_service_provisioning_errors_count_request_builder.go b/shares/item_created_by_user_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..67eaa65bd03 --- /dev/null +++ b/shares/item_created_by_user_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,78 @@ +package shares + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type ItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type ItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// ItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) { + m := &ItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/createdByUser/serviceProvisioningErrors/$count{?%24search}", pathParameters), + } + return m +} +// NewItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *ItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *ItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*ItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/shares/item_created_by_user_service_provisioning_errors_request_builder.go b/shares/item_created_by_user_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..0dfbcdcf845 --- /dev/null +++ b/shares/item_created_by_user_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package shares + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemCreatedByUserServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \shares\{sharedDriveItem-id}\createdByUser\serviceProvisioningErrors +type ItemCreatedByUserServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type ItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// ItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewItemCreatedByUserServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemCreatedByUserServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCreatedByUserServiceProvisioningErrorsRequestBuilder) { + m := &ItemCreatedByUserServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/createdByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewItemCreatedByUserServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemCreatedByUserServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCreatedByUserServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemCreatedByUserServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *ItemCreatedByUserServiceProvisioningErrorsRequestBuilder) Count()(*ItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemCreatedByUserServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemCreatedByUserServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemCreatedByUserServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*ItemCreatedByUserServiceProvisioningErrorsRequestBuilder) { + return NewItemCreatedByUserServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/shares/item_last_modified_by_user_request_builder.go b/shares/item_last_modified_by_user_request_builder.go index 5c4de057418..2b5d85f4621 100644 --- a/shares/item_last_modified_by_user_request_builder.go +++ b/shares/item_last_modified_by_user_request_builder.go @@ -63,6 +63,10 @@ func (m *ItemLastModifiedByUserRequestBuilder) Get(ctx context.Context, requestC func (m *ItemLastModifiedByUserRequestBuilder) MailboxSettings()(*ItemLastModifiedByUserMailboxSettingsRequestBuilder) { return NewItemLastModifiedByUserMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *ItemLastModifiedByUserRequestBuilder) ServiceProvisioningErrors()(*ItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) { + return NewItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation get lastModifiedByUser from shares func (m *ItemLastModifiedByUserRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemLastModifiedByUserRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/shares/item_last_modified_by_user_service_provisioning_errors_count_request_builder.go b/shares/item_last_modified_by_user_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..46c1bc1b4b4 --- /dev/null +++ b/shares/item_last_modified_by_user_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package shares + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type ItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type ItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// ItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) { + m := &ItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/lastModifiedByUser/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *ItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *ItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*ItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/shares/item_last_modified_by_user_service_provisioning_errors_request_builder.go b/shares/item_last_modified_by_user_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..2d04145b18f --- /dev/null +++ b/shares/item_last_modified_by_user_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package shares + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \shares\{sharedDriveItem-id}\lastModifiedByUser\serviceProvisioningErrors +type ItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type ItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// ItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) { + m := &ItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/lastModifiedByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *ItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) Count()(*ItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*ItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) { + return NewItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/shares/item_list_created_by_user_request_builder.go b/shares/item_list_created_by_user_request_builder.go index 8857a02a426..e12908a4318 100644 --- a/shares/item_list_created_by_user_request_builder.go +++ b/shares/item_list_created_by_user_request_builder.go @@ -63,6 +63,10 @@ func (m *ItemListCreatedByUserRequestBuilder) Get(ctx context.Context, requestCo func (m *ItemListCreatedByUserRequestBuilder) MailboxSettings()(*ItemListCreatedByUserMailboxSettingsRequestBuilder) { return NewItemListCreatedByUserMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *ItemListCreatedByUserRequestBuilder) ServiceProvisioningErrors()(*ItemListCreatedByUserServiceProvisioningErrorsRequestBuilder) { + return NewItemListCreatedByUserServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation get createdByUser from shares func (m *ItemListCreatedByUserRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemListCreatedByUserRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/shares/item_list_created_by_user_service_provisioning_errors_count_request_builder.go b/shares/item_list_created_by_user_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..4a6d36002a4 --- /dev/null +++ b/shares/item_list_created_by_user_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package shares + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemListCreatedByUserServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type ItemListCreatedByUserServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemListCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type ItemListCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// ItemListCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemListCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemListCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewItemListCreatedByUserServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewItemListCreatedByUserServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemListCreatedByUserServiceProvisioningErrorsCountRequestBuilder) { + m := &ItemListCreatedByUserServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/list/createdByUser/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewItemListCreatedByUserServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewItemListCreatedByUserServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemListCreatedByUserServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemListCreatedByUserServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *ItemListCreatedByUserServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemListCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *ItemListCreatedByUserServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemListCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemListCreatedByUserServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*ItemListCreatedByUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemListCreatedByUserServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/shares/item_list_created_by_user_service_provisioning_errors_request_builder.go b/shares/item_list_created_by_user_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..93028bffe0c --- /dev/null +++ b/shares/item_list_created_by_user_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package shares + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemListCreatedByUserServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \shares\{sharedDriveItem-id}\list\createdByUser\serviceProvisioningErrors +type ItemListCreatedByUserServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemListCreatedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type ItemListCreatedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// ItemListCreatedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemListCreatedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemListCreatedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewItemListCreatedByUserServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemListCreatedByUserServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemListCreatedByUserServiceProvisioningErrorsRequestBuilder) { + m := &ItemListCreatedByUserServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/list/createdByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewItemListCreatedByUserServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemListCreatedByUserServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemListCreatedByUserServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemListCreatedByUserServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *ItemListCreatedByUserServiceProvisioningErrorsRequestBuilder) Count()(*ItemListCreatedByUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemListCreatedByUserServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemListCreatedByUserServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemListCreatedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemListCreatedByUserServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemListCreatedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemListCreatedByUserServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*ItemListCreatedByUserServiceProvisioningErrorsRequestBuilder) { + return NewItemListCreatedByUserServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/shares/item_list_items_item_created_by_user_request_builder.go b/shares/item_list_items_item_created_by_user_request_builder.go index 5d833c41676..488911013d3 100644 --- a/shares/item_list_items_item_created_by_user_request_builder.go +++ b/shares/item_list_items_item_created_by_user_request_builder.go @@ -63,6 +63,10 @@ func (m *ItemListItemsItemCreatedByUserRequestBuilder) Get(ctx context.Context, func (m *ItemListItemsItemCreatedByUserRequestBuilder) MailboxSettings()(*ItemListItemsItemCreatedByUserMailboxSettingsRequestBuilder) { return NewItemListItemsItemCreatedByUserMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *ItemListItemsItemCreatedByUserRequestBuilder) ServiceProvisioningErrors()(*ItemListItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder) { + return NewItemListItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation get createdByUser from shares func (m *ItemListItemsItemCreatedByUserRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemListItemsItemCreatedByUserRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/shares/item_list_items_item_created_by_user_service_provisioning_errors_count_request_builder.go b/shares/item_list_items_item_created_by_user_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..a01239a017e --- /dev/null +++ b/shares/item_list_items_item_created_by_user_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package shares + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemListItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type ItemListItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemListItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type ItemListItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// ItemListItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemListItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemListItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewItemListItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewItemListItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemListItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) { + m := &ItemListItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/list/items/{listItem%2Did}/createdByUser/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewItemListItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewItemListItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemListItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemListItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *ItemListItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemListItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *ItemListItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemListItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemListItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*ItemListItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemListItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/shares/item_list_items_item_created_by_user_service_provisioning_errors_request_builder.go b/shares/item_list_items_item_created_by_user_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..a45323794c1 --- /dev/null +++ b/shares/item_list_items_item_created_by_user_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package shares + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemListItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \shares\{sharedDriveItem-id}\list\items\{listItem-id}\createdByUser\serviceProvisioningErrors +type ItemListItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemListItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type ItemListItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// ItemListItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemListItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemListItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewItemListItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemListItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemListItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder) { + m := &ItemListItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/list/items/{listItem%2Did}/createdByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewItemListItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemListItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemListItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemListItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *ItemListItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder) Count()(*ItemListItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemListItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemListItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemListItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemListItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemListItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemListItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*ItemListItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder) { + return NewItemListItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/shares/item_list_items_item_last_modified_by_user_request_builder.go b/shares/item_list_items_item_last_modified_by_user_request_builder.go index a38ed03fc37..750ef877170 100644 --- a/shares/item_list_items_item_last_modified_by_user_request_builder.go +++ b/shares/item_list_items_item_last_modified_by_user_request_builder.go @@ -63,6 +63,10 @@ func (m *ItemListItemsItemLastModifiedByUserRequestBuilder) Get(ctx context.Cont func (m *ItemListItemsItemLastModifiedByUserRequestBuilder) MailboxSettings()(*ItemListItemsItemLastModifiedByUserMailboxSettingsRequestBuilder) { return NewItemListItemsItemLastModifiedByUserMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *ItemListItemsItemLastModifiedByUserRequestBuilder) ServiceProvisioningErrors()(*ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) { + return NewItemListItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation get lastModifiedByUser from shares func (m *ItemListItemsItemLastModifiedByUserRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemListItemsItemLastModifiedByUserRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/shares/item_list_items_item_last_modified_by_user_service_provisioning_errors_count_request_builder.go b/shares/item_list_items_item_last_modified_by_user_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..94f8a53e37d --- /dev/null +++ b/shares/item_list_items_item_last_modified_by_user_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package shares + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewItemListItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewItemListItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) { + m := &ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/list/items/{listItem%2Did}/lastModifiedByUser/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewItemListItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewItemListItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemListItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemListItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/shares/item_list_items_item_last_modified_by_user_service_provisioning_errors_request_builder.go b/shares/item_list_items_item_last_modified_by_user_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..a3cb6f5aa7a --- /dev/null +++ b/shares/item_list_items_item_last_modified_by_user_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package shares + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \shares\{sharedDriveItem-id}\list\items\{listItem-id}\lastModifiedByUser\serviceProvisioningErrors +type ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewItemListItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemListItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) { + m := &ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/list/items/{listItem%2Did}/lastModifiedByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewItemListItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemListItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemListItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) Count()(*ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemListItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*ItemListItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) { + return NewItemListItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/shares/item_list_last_modified_by_user_request_builder.go b/shares/item_list_last_modified_by_user_request_builder.go index a0d2ccf1d7a..8c930f68b25 100644 --- a/shares/item_list_last_modified_by_user_request_builder.go +++ b/shares/item_list_last_modified_by_user_request_builder.go @@ -63,6 +63,10 @@ func (m *ItemListLastModifiedByUserRequestBuilder) Get(ctx context.Context, requ func (m *ItemListLastModifiedByUserRequestBuilder) MailboxSettings()(*ItemListLastModifiedByUserMailboxSettingsRequestBuilder) { return NewItemListLastModifiedByUserMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *ItemListLastModifiedByUserRequestBuilder) ServiceProvisioningErrors()(*ItemListLastModifiedByUserServiceProvisioningErrorsRequestBuilder) { + return NewItemListLastModifiedByUserServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation get lastModifiedByUser from shares func (m *ItemListLastModifiedByUserRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemListLastModifiedByUserRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/shares/item_list_last_modified_by_user_service_provisioning_errors_count_request_builder.go b/shares/item_list_last_modified_by_user_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..a59ef3e8670 --- /dev/null +++ b/shares/item_list_last_modified_by_user_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package shares + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemListLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type ItemListLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemListLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type ItemListLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// ItemListLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemListLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemListLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewItemListLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewItemListLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemListLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) { + m := &ItemListLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/list/lastModifiedByUser/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewItemListLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewItemListLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemListLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemListLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *ItemListLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemListLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *ItemListLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemListLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemListLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*ItemListLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemListLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/shares/item_list_last_modified_by_user_service_provisioning_errors_request_builder.go b/shares/item_list_last_modified_by_user_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..f6554ab0936 --- /dev/null +++ b/shares/item_list_last_modified_by_user_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package shares + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemListLastModifiedByUserServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \shares\{sharedDriveItem-id}\list\lastModifiedByUser\serviceProvisioningErrors +type ItemListLastModifiedByUserServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemListLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type ItemListLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// ItemListLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemListLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemListLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewItemListLastModifiedByUserServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemListLastModifiedByUserServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemListLastModifiedByUserServiceProvisioningErrorsRequestBuilder) { + m := &ItemListLastModifiedByUserServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/shares/{sharedDriveItem%2Did}/list/lastModifiedByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewItemListLastModifiedByUserServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemListLastModifiedByUserServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemListLastModifiedByUserServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemListLastModifiedByUserServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *ItemListLastModifiedByUserServiceProvisioningErrorsRequestBuilder) Count()(*ItemListLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemListLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemListLastModifiedByUserServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemListLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemListLastModifiedByUserServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemListLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemListLastModifiedByUserServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*ItemListLastModifiedByUserServiceProvisioningErrorsRequestBuilder) { + return NewItemListLastModifiedByUserServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/sites/item_created_by_user_request_builder.go b/sites/item_created_by_user_request_builder.go index 623d4629081..807e4929494 100644 --- a/sites/item_created_by_user_request_builder.go +++ b/sites/item_created_by_user_request_builder.go @@ -63,6 +63,10 @@ func (m *ItemCreatedByUserRequestBuilder) Get(ctx context.Context, requestConfig func (m *ItemCreatedByUserRequestBuilder) MailboxSettings()(*ItemCreatedByUserMailboxSettingsRequestBuilder) { return NewItemCreatedByUserMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *ItemCreatedByUserRequestBuilder) ServiceProvisioningErrors()(*ItemCreatedByUserServiceProvisioningErrorsRequestBuilder) { + return NewItemCreatedByUserServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation get createdByUser from sites func (m *ItemCreatedByUserRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemCreatedByUserRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/sites/item_created_by_user_service_provisioning_errors_count_request_builder.go b/sites/item_created_by_user_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..ce71a905b1b --- /dev/null +++ b/sites/item_created_by_user_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package sites + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type ItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type ItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// ItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) { + m := &ItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/sites/{site%2Did}/createdByUser/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *ItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *ItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*ItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/sites/item_created_by_user_service_provisioning_errors_request_builder.go b/sites/item_created_by_user_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..c2d0f15fd97 --- /dev/null +++ b/sites/item_created_by_user_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package sites + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemCreatedByUserServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \sites\{site-id}\createdByUser\serviceProvisioningErrors +type ItemCreatedByUserServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type ItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// ItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewItemCreatedByUserServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemCreatedByUserServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCreatedByUserServiceProvisioningErrorsRequestBuilder) { + m := &ItemCreatedByUserServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/sites/{site%2Did}/createdByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewItemCreatedByUserServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemCreatedByUserServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemCreatedByUserServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemCreatedByUserServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *ItemCreatedByUserServiceProvisioningErrorsRequestBuilder) Count()(*ItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemCreatedByUserServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemCreatedByUserServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemCreatedByUserServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*ItemCreatedByUserServiceProvisioningErrorsRequestBuilder) { + return NewItemCreatedByUserServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/sites/item_last_modified_by_user_request_builder.go b/sites/item_last_modified_by_user_request_builder.go index d8a485e801e..36db846eb71 100644 --- a/sites/item_last_modified_by_user_request_builder.go +++ b/sites/item_last_modified_by_user_request_builder.go @@ -63,6 +63,10 @@ func (m *ItemLastModifiedByUserRequestBuilder) Get(ctx context.Context, requestC func (m *ItemLastModifiedByUserRequestBuilder) MailboxSettings()(*ItemLastModifiedByUserMailboxSettingsRequestBuilder) { return NewItemLastModifiedByUserMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *ItemLastModifiedByUserRequestBuilder) ServiceProvisioningErrors()(*ItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) { + return NewItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation get lastModifiedByUser from sites func (m *ItemLastModifiedByUserRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemLastModifiedByUserRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/sites/item_last_modified_by_user_service_provisioning_errors_count_request_builder.go b/sites/item_last_modified_by_user_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..b8ed6f7b1eb --- /dev/null +++ b/sites/item_last_modified_by_user_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package sites + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type ItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type ItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// ItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) { + m := &ItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/sites/{site%2Did}/lastModifiedByUser/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *ItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *ItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*ItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/sites/item_last_modified_by_user_service_provisioning_errors_request_builder.go b/sites/item_last_modified_by_user_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..1717dcd7ac3 --- /dev/null +++ b/sites/item_last_modified_by_user_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package sites + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \sites\{site-id}\lastModifiedByUser\serviceProvisioningErrors +type ItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type ItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// ItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) { + m := &ItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/sites/{site%2Did}/lastModifiedByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *ItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) Count()(*ItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*ItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) { + return NewItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/sites/item_lists_item_created_by_user_request_builder.go b/sites/item_lists_item_created_by_user_request_builder.go index 37b9df60a73..87162efee11 100644 --- a/sites/item_lists_item_created_by_user_request_builder.go +++ b/sites/item_lists_item_created_by_user_request_builder.go @@ -63,6 +63,10 @@ func (m *ItemListsItemCreatedByUserRequestBuilder) Get(ctx context.Context, requ func (m *ItemListsItemCreatedByUserRequestBuilder) MailboxSettings()(*ItemListsItemCreatedByUserMailboxSettingsRequestBuilder) { return NewItemListsItemCreatedByUserMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *ItemListsItemCreatedByUserRequestBuilder) ServiceProvisioningErrors()(*ItemListsItemCreatedByUserServiceProvisioningErrorsRequestBuilder) { + return NewItemListsItemCreatedByUserServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation get createdByUser from sites func (m *ItemListsItemCreatedByUserRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemListsItemCreatedByUserRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/sites/item_lists_item_created_by_user_service_provisioning_errors_count_request_builder.go b/sites/item_lists_item_created_by_user_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..147e37daecb --- /dev/null +++ b/sites/item_lists_item_created_by_user_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package sites + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemListsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type ItemListsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemListsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type ItemListsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// ItemListsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemListsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemListsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewItemListsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewItemListsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemListsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) { + m := &ItemListsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/sites/{site%2Did}/lists/{list%2Did}/createdByUser/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewItemListsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewItemListsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemListsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemListsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *ItemListsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemListsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *ItemListsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemListsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemListsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*ItemListsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemListsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/sites/item_lists_item_created_by_user_service_provisioning_errors_request_builder.go b/sites/item_lists_item_created_by_user_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..128c577c68f --- /dev/null +++ b/sites/item_lists_item_created_by_user_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package sites + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemListsItemCreatedByUserServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \sites\{site-id}\lists\{list-id}\createdByUser\serviceProvisioningErrors +type ItemListsItemCreatedByUserServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemListsItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type ItemListsItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// ItemListsItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemListsItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemListsItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewItemListsItemCreatedByUserServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemListsItemCreatedByUserServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemListsItemCreatedByUserServiceProvisioningErrorsRequestBuilder) { + m := &ItemListsItemCreatedByUserServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/sites/{site%2Did}/lists/{list%2Did}/createdByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewItemListsItemCreatedByUserServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemListsItemCreatedByUserServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemListsItemCreatedByUserServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemListsItemCreatedByUserServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *ItemListsItemCreatedByUserServiceProvisioningErrorsRequestBuilder) Count()(*ItemListsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemListsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemListsItemCreatedByUserServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemListsItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemListsItemCreatedByUserServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemListsItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemListsItemCreatedByUserServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*ItemListsItemCreatedByUserServiceProvisioningErrorsRequestBuilder) { + return NewItemListsItemCreatedByUserServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/sites/item_lists_item_items_item_created_by_user_request_builder.go b/sites/item_lists_item_items_item_created_by_user_request_builder.go index 416949abea4..ee550cb3ced 100644 --- a/sites/item_lists_item_items_item_created_by_user_request_builder.go +++ b/sites/item_lists_item_items_item_created_by_user_request_builder.go @@ -63,6 +63,10 @@ func (m *ItemListsItemItemsItemCreatedByUserRequestBuilder) Get(ctx context.Cont func (m *ItemListsItemItemsItemCreatedByUserRequestBuilder) MailboxSettings()(*ItemListsItemItemsItemCreatedByUserMailboxSettingsRequestBuilder) { return NewItemListsItemItemsItemCreatedByUserMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *ItemListsItemItemsItemCreatedByUserRequestBuilder) ServiceProvisioningErrors()(*ItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder) { + return NewItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation get createdByUser from sites func (m *ItemListsItemItemsItemCreatedByUserRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemListsItemItemsItemCreatedByUserRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/sites/item_lists_item_items_item_created_by_user_service_provisioning_errors_count_request_builder.go b/sites/item_lists_item_items_item_created_by_user_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..ad234f8f30f --- /dev/null +++ b/sites/item_lists_item_items_item_created_by_user_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package sites + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type ItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type ItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// ItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) { + m := &ItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/sites/{site%2Did}/lists/{list%2Did}/items/{listItem%2Did}/createdByUser/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *ItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *ItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*ItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/sites/item_lists_item_items_item_created_by_user_service_provisioning_errors_request_builder.go b/sites/item_lists_item_items_item_created_by_user_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..2f0743ddcc4 --- /dev/null +++ b/sites/item_lists_item_items_item_created_by_user_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package sites + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \sites\{site-id}\lists\{list-id}\items\{listItem-id}\createdByUser\serviceProvisioningErrors +type ItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type ItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// ItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder) { + m := &ItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/sites/{site%2Did}/lists/{list%2Did}/items/{listItem%2Did}/createdByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *ItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder) Count()(*ItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*ItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder) { + return NewItemListsItemItemsItemCreatedByUserServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/sites/item_lists_item_items_item_last_modified_by_user_request_builder.go b/sites/item_lists_item_items_item_last_modified_by_user_request_builder.go index b7a81d01999..d50e23f85c1 100644 --- a/sites/item_lists_item_items_item_last_modified_by_user_request_builder.go +++ b/sites/item_lists_item_items_item_last_modified_by_user_request_builder.go @@ -63,6 +63,10 @@ func (m *ItemListsItemItemsItemLastModifiedByUserRequestBuilder) Get(ctx context func (m *ItemListsItemItemsItemLastModifiedByUserRequestBuilder) MailboxSettings()(*ItemListsItemItemsItemLastModifiedByUserMailboxSettingsRequestBuilder) { return NewItemListsItemItemsItemLastModifiedByUserMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *ItemListsItemItemsItemLastModifiedByUserRequestBuilder) ServiceProvisioningErrors()(*ItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) { + return NewItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation get lastModifiedByUser from sites func (m *ItemListsItemItemsItemLastModifiedByUserRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemListsItemItemsItemLastModifiedByUserRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/sites/item_lists_item_items_item_last_modified_by_user_service_provisioning_errors_count_request_builder.go b/sites/item_lists_item_items_item_last_modified_by_user_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..2a2c3c6991c --- /dev/null +++ b/sites/item_lists_item_items_item_last_modified_by_user_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package sites + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type ItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type ItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// ItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) { + m := &ItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/sites/{site%2Did}/lists/{list%2Did}/items/{listItem%2Did}/lastModifiedByUser/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *ItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *ItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*ItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/sites/item_lists_item_items_item_last_modified_by_user_service_provisioning_errors_request_builder.go b/sites/item_lists_item_items_item_last_modified_by_user_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..36937065a62 --- /dev/null +++ b/sites/item_lists_item_items_item_last_modified_by_user_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package sites + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \sites\{site-id}\lists\{list-id}\items\{listItem-id}\lastModifiedByUser\serviceProvisioningErrors +type ItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type ItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// ItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) { + m := &ItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/sites/{site%2Did}/lists/{list%2Did}/items/{listItem%2Did}/lastModifiedByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *ItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) Count()(*ItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*ItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) { + return NewItemListsItemItemsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/sites/item_lists_item_last_modified_by_user_request_builder.go b/sites/item_lists_item_last_modified_by_user_request_builder.go index cf4b3e580fd..af6781397ec 100644 --- a/sites/item_lists_item_last_modified_by_user_request_builder.go +++ b/sites/item_lists_item_last_modified_by_user_request_builder.go @@ -63,6 +63,10 @@ func (m *ItemListsItemLastModifiedByUserRequestBuilder) Get(ctx context.Context, func (m *ItemListsItemLastModifiedByUserRequestBuilder) MailboxSettings()(*ItemListsItemLastModifiedByUserMailboxSettingsRequestBuilder) { return NewItemListsItemLastModifiedByUserMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *ItemListsItemLastModifiedByUserRequestBuilder) ServiceProvisioningErrors()(*ItemListsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) { + return NewItemListsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation get lastModifiedByUser from sites func (m *ItemListsItemLastModifiedByUserRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemListsItemLastModifiedByUserRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/sites/item_lists_item_last_modified_by_user_service_provisioning_errors_count_request_builder.go b/sites/item_lists_item_last_modified_by_user_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..b7fd03ee31d --- /dev/null +++ b/sites/item_lists_item_last_modified_by_user_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package sites + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemListsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type ItemListsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemListsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type ItemListsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// ItemListsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemListsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemListsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewItemListsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewItemListsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemListsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) { + m := &ItemListsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/sites/{site%2Did}/lists/{list%2Did}/lastModifiedByUser/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewItemListsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewItemListsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemListsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemListsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *ItemListsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemListsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *ItemListsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemListsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemListsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*ItemListsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemListsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/sites/item_lists_item_last_modified_by_user_service_provisioning_errors_request_builder.go b/sites/item_lists_item_last_modified_by_user_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..b0c276f927e --- /dev/null +++ b/sites/item_lists_item_last_modified_by_user_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package sites + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemListsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \sites\{site-id}\lists\{list-id}\lastModifiedByUser\serviceProvisioningErrors +type ItemListsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemListsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type ItemListsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// ItemListsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemListsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemListsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewItemListsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemListsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemListsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) { + m := &ItemListsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/sites/{site%2Did}/lists/{list%2Did}/lastModifiedByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewItemListsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemListsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemListsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemListsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *ItemListsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) Count()(*ItemListsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemListsItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemListsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemListsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemListsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemListsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemListsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*ItemListsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) { + return NewItemListsItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/sites/item_lists_list_item_request_builder.go b/sites/item_lists_list_item_request_builder.go index 5b08bbaa6e0..25ba0b8858f 100644 --- a/sites/item_lists_list_item_request_builder.go +++ b/sites/item_lists_list_item_request_builder.go @@ -18,7 +18,7 @@ type ItemListsListItemRequestBuilderDeleteRequestConfiguration struct { // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// ItemListsListItemRequestBuilderGetQueryParameters get the list of richLongRunningOperations associated with a list. +// ItemListsListItemRequestBuilderGetQueryParameters return the metadata for a [list][]. type ItemListsListItemRequestBuilderGetQueryParameters struct { // Expand related entities Expand []string `uriparametername:"%24expand"` @@ -90,10 +90,10 @@ func (m *ItemListsListItemRequestBuilder) Delete(ctx context.Context, requestCon func (m *ItemListsListItemRequestBuilder) Drive()(*ItemListsItemDriveRequestBuilder) { return NewItemListsItemDriveRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Get get the list of richLongRunningOperations associated with a list. +// Get return the metadata for a [list][]. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/list-list-operations?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/list-get?view=graph-rest-1.0 func (m *ItemListsListItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemListsListItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Listable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -159,7 +159,7 @@ func (m *ItemListsListItemRequestBuilder) ToDeleteRequestInformation(ctx context } return requestInfo, nil } -// ToGetRequestInformation get the list of richLongRunningOperations associated with a list. +// ToGetRequestInformation return the metadata for a [list][]. func (m *ItemListsListItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemListsListItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/sites/item_pages_item_created_by_user_request_builder.go b/sites/item_pages_item_created_by_user_request_builder.go index 2d1df4a2265..b7359d166be 100644 --- a/sites/item_pages_item_created_by_user_request_builder.go +++ b/sites/item_pages_item_created_by_user_request_builder.go @@ -63,6 +63,10 @@ func (m *ItemPagesItemCreatedByUserRequestBuilder) Get(ctx context.Context, requ func (m *ItemPagesItemCreatedByUserRequestBuilder) MailboxSettings()(*ItemPagesItemCreatedByUserMailboxSettingsRequestBuilder) { return NewItemPagesItemCreatedByUserMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *ItemPagesItemCreatedByUserRequestBuilder) ServiceProvisioningErrors()(*ItemPagesItemCreatedByUserServiceProvisioningErrorsRequestBuilder) { + return NewItemPagesItemCreatedByUserServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation get createdByUser from sites func (m *ItemPagesItemCreatedByUserRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemPagesItemCreatedByUserRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/sites/item_pages_item_created_by_user_service_provisioning_errors_count_request_builder.go b/sites/item_pages_item_created_by_user_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..04e44d23d44 --- /dev/null +++ b/sites/item_pages_item_created_by_user_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package sites + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemPagesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type ItemPagesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemPagesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type ItemPagesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// ItemPagesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemPagesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemPagesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewItemPagesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewItemPagesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPagesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) { + m := &ItemPagesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/sites/{site%2Did}/pages/{baseSitePage%2Did}/createdByUser/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewItemPagesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewItemPagesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPagesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemPagesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *ItemPagesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemPagesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *ItemPagesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemPagesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemPagesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*ItemPagesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemPagesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/sites/item_pages_item_created_by_user_service_provisioning_errors_request_builder.go b/sites/item_pages_item_created_by_user_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..76c4fe1d277 --- /dev/null +++ b/sites/item_pages_item_created_by_user_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package sites + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemPagesItemCreatedByUserServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \sites\{site-id}\pages\{baseSitePage-id}\createdByUser\serviceProvisioningErrors +type ItemPagesItemCreatedByUserServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemPagesItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type ItemPagesItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// ItemPagesItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemPagesItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemPagesItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewItemPagesItemCreatedByUserServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemPagesItemCreatedByUserServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPagesItemCreatedByUserServiceProvisioningErrorsRequestBuilder) { + m := &ItemPagesItemCreatedByUserServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/sites/{site%2Did}/pages/{baseSitePage%2Did}/createdByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewItemPagesItemCreatedByUserServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemPagesItemCreatedByUserServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPagesItemCreatedByUserServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemPagesItemCreatedByUserServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *ItemPagesItemCreatedByUserServiceProvisioningErrorsRequestBuilder) Count()(*ItemPagesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemPagesItemCreatedByUserServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemPagesItemCreatedByUserServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemPagesItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemPagesItemCreatedByUserServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemPagesItemCreatedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemPagesItemCreatedByUserServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*ItemPagesItemCreatedByUserServiceProvisioningErrorsRequestBuilder) { + return NewItemPagesItemCreatedByUserServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/sites/item_pages_item_last_modified_by_user_request_builder.go b/sites/item_pages_item_last_modified_by_user_request_builder.go index 155934c66ba..f901080c4cf 100644 --- a/sites/item_pages_item_last_modified_by_user_request_builder.go +++ b/sites/item_pages_item_last_modified_by_user_request_builder.go @@ -63,6 +63,10 @@ func (m *ItemPagesItemLastModifiedByUserRequestBuilder) Get(ctx context.Context, func (m *ItemPagesItemLastModifiedByUserRequestBuilder) MailboxSettings()(*ItemPagesItemLastModifiedByUserMailboxSettingsRequestBuilder) { return NewItemPagesItemLastModifiedByUserMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *ItemPagesItemLastModifiedByUserRequestBuilder) ServiceProvisioningErrors()(*ItemPagesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) { + return NewItemPagesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation get lastModifiedByUser from sites func (m *ItemPagesItemLastModifiedByUserRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemPagesItemLastModifiedByUserRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/sites/item_pages_item_last_modified_by_user_service_provisioning_errors_count_request_builder.go b/sites/item_pages_item_last_modified_by_user_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..55680a07dea --- /dev/null +++ b/sites/item_pages_item_last_modified_by_user_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package sites + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemPagesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type ItemPagesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemPagesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type ItemPagesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// ItemPagesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemPagesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemPagesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewItemPagesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewItemPagesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPagesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) { + m := &ItemPagesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/sites/{site%2Did}/pages/{baseSitePage%2Did}/lastModifiedByUser/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewItemPagesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewItemPagesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPagesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemPagesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *ItemPagesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemPagesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *ItemPagesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemPagesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemPagesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*ItemPagesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemPagesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/sites/item_pages_item_last_modified_by_user_service_provisioning_errors_request_builder.go b/sites/item_pages_item_last_modified_by_user_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..ad38433cf95 --- /dev/null +++ b/sites/item_pages_item_last_modified_by_user_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package sites + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemPagesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \sites\{site-id}\pages\{baseSitePage-id}\lastModifiedByUser\serviceProvisioningErrors +type ItemPagesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemPagesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type ItemPagesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// ItemPagesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemPagesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemPagesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewItemPagesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemPagesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPagesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) { + m := &ItemPagesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/sites/{site%2Did}/pages/{baseSitePage%2Did}/lastModifiedByUser/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewItemPagesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemPagesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPagesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemPagesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *ItemPagesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) Count()(*ItemPagesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilder) { + return NewItemPagesItemLastModifiedByUserServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemPagesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemPagesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemPagesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemPagesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemPagesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*ItemPagesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder) { + return NewItemPagesItemLastModifiedByUserServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/sites/sites_request_builder.go b/sites/sites_request_builder.go index 1e37c79c06a..018f199ecac 100644 --- a/sites/sites_request_builder.go +++ b/sites/sites_request_builder.go @@ -11,7 +11,7 @@ import ( type SitesRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// 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. +// SitesRequestBuilderGetQueryParameters 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. type SitesRequestBuilderGetQueryParameters struct { // Include count of items Count *bool `uriparametername:"%24count"` @@ -75,10 +75,10 @@ func (m *SitesRequestBuilder) Count()(*CountRequestBuilder) { func (m *SitesRequestBuilder) Delta()(*DeltaRequestBuilder) { return NewDeltaRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Get 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. +// Get 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. // [Find more info here] // -// [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 func (m *SitesRequestBuilder) Get(ctx context.Context, requestConfiguration *SitesRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.SiteCollectionResponseable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -105,7 +105,7 @@ func (m *SitesRequestBuilder) GetAllSites()(*GetAllSitesRequestBuilder) { func (m *SitesRequestBuilder) Remove()(*RemoveRequestBuilder) { return NewRemoveRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// ToGetRequestInformation 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. +// ToGetRequestInformation 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. func (m *SitesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *SitesRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/solutions/virtual_events_events_item_sessions_item_registration_request_builder.go b/solutions/virtual_events_events_item_sessions_item_registration_request_builder.go index 58a1e56a064..5a381fe32b8 100644 --- a/solutions/virtual_events_events_item_sessions_item_registration_request_builder.go +++ b/solutions/virtual_events_events_item_sessions_item_registration_request_builder.go @@ -58,10 +58,10 @@ func NewVirtualEventsEventsItemSessionsItemRegistrationRequestBuilder(rawUrl str func (m *VirtualEventsEventsItemSessionsItemRegistrationRequestBuilder) CustomQuestions()(*VirtualEventsEventsItemSessionsItemRegistrationCustomQuestionsRequestBuilder) { return NewVirtualEventsEventsItemSessionsItemRegistrationCustomQuestionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Delete disable and delete the meetingRegistration of an onlineMeeting on behalf of the organizer. +// Delete disable and delete the externalMeetingRegistration of an onlineMeeting. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/meetingregistration-delete?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/externalmeetingregistration-delete?view=graph-rest-1.0 func (m *VirtualEventsEventsItemSessionsItemRegistrationRequestBuilder) Delete(ctx context.Context, requestConfiguration *VirtualEventsEventsItemSessionsItemRegistrationRequestBuilderDeleteRequestConfiguration)(error) { requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); if err != nil { @@ -125,7 +125,7 @@ func (m *VirtualEventsEventsItemSessionsItemRegistrationRequestBuilder) Patch(ct func (m *VirtualEventsEventsItemSessionsItemRegistrationRequestBuilder) Registrants()(*VirtualEventsEventsItemSessionsItemRegistrationRegistrantsRequestBuilder) { return NewVirtualEventsEventsItemSessionsItemRegistrationRegistrantsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// ToDeleteRequestInformation disable and delete the meetingRegistration of an onlineMeeting on behalf of the organizer. +// ToDeleteRequestInformation disable and delete the externalMeetingRegistration of an onlineMeeting. func (m *VirtualEventsEventsItemSessionsItemRegistrationRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *VirtualEventsEventsItemSessionsItemRegistrationRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/solutions/virtual_events_events_item_sessions_item_registrations_request_builder.go b/solutions/virtual_events_events_item_sessions_item_registrations_request_builder.go index 456c2da07a7..5491aee1bdf 100644 --- a/solutions/virtual_events_events_item_sessions_item_registrations_request_builder.go +++ b/solutions/virtual_events_events_item_sessions_item_registrations_request_builder.go @@ -11,7 +11,7 @@ import ( type VirtualEventsEventsItemSessionsItemRegistrationsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// VirtualEventsEventsItemSessionsItemRegistrationsRequestBuilderGetQueryParameters get registrations from solutions +// VirtualEventsEventsItemSessionsItemRegistrationsRequestBuilderGetQueryParameters registration records of this virtual event session. type VirtualEventsEventsItemSessionsItemRegistrationsRequestBuilderGetQueryParameters struct { // Include count of items Count *bool `uriparametername:"%24count"` @@ -67,7 +67,7 @@ func NewVirtualEventsEventsItemSessionsItemRegistrationsRequestBuilder(rawUrl st func (m *VirtualEventsEventsItemSessionsItemRegistrationsRequestBuilder) Count()(*VirtualEventsEventsItemSessionsItemRegistrationsCountRequestBuilder) { return NewVirtualEventsEventsItemSessionsItemRegistrationsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Get get registrations from solutions +// Get registration records of this virtual event session. func (m *VirtualEventsEventsItemSessionsItemRegistrationsRequestBuilder) Get(ctx context.Context, requestConfiguration *VirtualEventsEventsItemSessionsItemRegistrationsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualEventRegistrationCollectionResponseable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -86,7 +86,7 @@ func (m *VirtualEventsEventsItemSessionsItemRegistrationsRequestBuilder) Get(ctx } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualEventRegistrationCollectionResponseable), nil } -// ToGetRequestInformation get registrations from solutions +// ToGetRequestInformation registration records of this virtual event session. func (m *VirtualEventsEventsItemSessionsItemRegistrationsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *VirtualEventsEventsItemSessionsItemRegistrationsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/solutions/virtual_events_events_item_sessions_item_registrations_virtual_event_registration_item_request_builder.go b/solutions/virtual_events_events_item_sessions_item_registrations_virtual_event_registration_item_request_builder.go index 3af85f91f02..388bf7ad810 100644 --- a/solutions/virtual_events_events_item_sessions_item_registrations_virtual_event_registration_item_request_builder.go +++ b/solutions/virtual_events_events_item_sessions_item_registrations_virtual_event_registration_item_request_builder.go @@ -11,7 +11,7 @@ import ( type VirtualEventsEventsItemSessionsItemRegistrationsVirtualEventRegistrationItemRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// VirtualEventsEventsItemSessionsItemRegistrationsVirtualEventRegistrationItemRequestBuilderGetQueryParameters get registrations from solutions +// VirtualEventsEventsItemSessionsItemRegistrationsVirtualEventRegistrationItemRequestBuilderGetQueryParameters registration records of this virtual event session. type VirtualEventsEventsItemSessionsItemRegistrationsVirtualEventRegistrationItemRequestBuilderGetQueryParameters struct { // Expand related entities Expand []string `uriparametername:"%24expand"` @@ -40,7 +40,7 @@ func NewVirtualEventsEventsItemSessionsItemRegistrationsVirtualEventRegistration urlParams["request-raw-url"] = rawUrl return NewVirtualEventsEventsItemSessionsItemRegistrationsVirtualEventRegistrationItemRequestBuilderInternal(urlParams, requestAdapter) } -// Get get registrations from solutions +// Get registration records of this virtual event session. func (m *VirtualEventsEventsItemSessionsItemRegistrationsVirtualEventRegistrationItemRequestBuilder) Get(ctx context.Context, requestConfiguration *VirtualEventsEventsItemSessionsItemRegistrationsVirtualEventRegistrationItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualEventRegistrationable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -59,7 +59,7 @@ func (m *VirtualEventsEventsItemSessionsItemRegistrationsVirtualEventRegistratio } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualEventRegistrationable), nil } -// ToGetRequestInformation get registrations from solutions +// ToGetRequestInformation registration records of this virtual event session. func (m *VirtualEventsEventsItemSessionsItemRegistrationsVirtualEventRegistrationItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *VirtualEventsEventsItemSessionsItemRegistrationsVirtualEventRegistrationItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/solutions/virtual_events_webinars_item_registration_configuration_request_builder.go b/solutions/virtual_events_webinars_item_registration_configuration_request_builder.go index 2e516bdee84..abd527090c6 100644 --- a/solutions/virtual_events_webinars_item_registration_configuration_request_builder.go +++ b/solutions/virtual_events_webinars_item_registration_configuration_request_builder.go @@ -11,7 +11,7 @@ import ( type VirtualEventsWebinarsItemRegistrationConfigurationRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// VirtualEventsWebinarsItemRegistrationConfigurationRequestBuilderGetQueryParameters get registrationConfiguration from solutions +// VirtualEventsWebinarsItemRegistrationConfigurationRequestBuilderGetQueryParameters registration configuration of the webinar. type VirtualEventsWebinarsItemRegistrationConfigurationRequestBuilderGetQueryParameters struct { // Expand related entities Expand []string `uriparametername:"%24expand"` @@ -40,7 +40,7 @@ func NewVirtualEventsWebinarsItemRegistrationConfigurationRequestBuilder(rawUrl urlParams["request-raw-url"] = rawUrl return NewVirtualEventsWebinarsItemRegistrationConfigurationRequestBuilderInternal(urlParams, requestAdapter) } -// Get get registrationConfiguration from solutions +// Get registration configuration of the webinar. func (m *VirtualEventsWebinarsItemRegistrationConfigurationRequestBuilder) Get(ctx context.Context, requestConfiguration *VirtualEventsWebinarsItemRegistrationConfigurationRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualEventRegistrationConfigurationable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -59,7 +59,7 @@ func (m *VirtualEventsWebinarsItemRegistrationConfigurationRequestBuilder) Get(c } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualEventRegistrationConfigurationable), nil } -// ToGetRequestInformation get registrationConfiguration from solutions +// ToGetRequestInformation registration configuration of the webinar. func (m *VirtualEventsWebinarsItemRegistrationConfigurationRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *VirtualEventsWebinarsItemRegistrationConfigurationRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/solutions/virtual_events_webinars_item_registrations_item_sessions_request_builder.go b/solutions/virtual_events_webinars_item_registrations_item_sessions_request_builder.go index 8d09931d9bd..cfd581637b4 100644 --- a/solutions/virtual_events_webinars_item_registrations_item_sessions_request_builder.go +++ b/solutions/virtual_events_webinars_item_registrations_item_sessions_request_builder.go @@ -11,7 +11,7 @@ import ( type VirtualEventsWebinarsItemRegistrationsItemSessionsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// VirtualEventsWebinarsItemRegistrationsItemSessionsRequestBuilderGetQueryParameters get sessions from solutions +// VirtualEventsWebinarsItemRegistrationsItemSessionsRequestBuilderGetQueryParameters sessions of the webinar. type VirtualEventsWebinarsItemRegistrationsItemSessionsRequestBuilderGetQueryParameters struct { // Include count of items Count *bool `uriparametername:"%24count"` @@ -67,7 +67,7 @@ func NewVirtualEventsWebinarsItemRegistrationsItemSessionsRequestBuilder(rawUrl func (m *VirtualEventsWebinarsItemRegistrationsItemSessionsRequestBuilder) Count()(*VirtualEventsWebinarsItemRegistrationsItemSessionsCountRequestBuilder) { return NewVirtualEventsWebinarsItemRegistrationsItemSessionsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Get get sessions from solutions +// Get sessions of the webinar. func (m *VirtualEventsWebinarsItemRegistrationsItemSessionsRequestBuilder) Get(ctx context.Context, requestConfiguration *VirtualEventsWebinarsItemRegistrationsItemSessionsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualEventSessionCollectionResponseable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -86,7 +86,7 @@ func (m *VirtualEventsWebinarsItemRegistrationsItemSessionsRequestBuilder) Get(c } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualEventSessionCollectionResponseable), nil } -// ToGetRequestInformation get sessions from solutions +// ToGetRequestInformation sessions of the webinar. func (m *VirtualEventsWebinarsItemRegistrationsItemSessionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *VirtualEventsWebinarsItemRegistrationsItemSessionsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/solutions/virtual_events_webinars_item_registrations_item_sessions_virtual_event_session_item_request_builder.go b/solutions/virtual_events_webinars_item_registrations_item_sessions_virtual_event_session_item_request_builder.go index fbea134d800..07febcd6607 100644 --- a/solutions/virtual_events_webinars_item_registrations_item_sessions_virtual_event_session_item_request_builder.go +++ b/solutions/virtual_events_webinars_item_registrations_item_sessions_virtual_event_session_item_request_builder.go @@ -11,7 +11,7 @@ import ( type VirtualEventsWebinarsItemRegistrationsItemSessionsVirtualEventSessionItemRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// VirtualEventsWebinarsItemRegistrationsItemSessionsVirtualEventSessionItemRequestBuilderGetQueryParameters get sessions from solutions +// VirtualEventsWebinarsItemRegistrationsItemSessionsVirtualEventSessionItemRequestBuilderGetQueryParameters sessions of the webinar. type VirtualEventsWebinarsItemRegistrationsItemSessionsVirtualEventSessionItemRequestBuilderGetQueryParameters struct { // Expand related entities Expand []string `uriparametername:"%24expand"` @@ -52,7 +52,7 @@ func NewVirtualEventsWebinarsItemRegistrationsItemSessionsVirtualEventSessionIte urlParams["request-raw-url"] = rawUrl return NewVirtualEventsWebinarsItemRegistrationsItemSessionsVirtualEventSessionItemRequestBuilderInternal(urlParams, requestAdapter) } -// Get get sessions from solutions +// Get sessions of the webinar. func (m *VirtualEventsWebinarsItemRegistrationsItemSessionsVirtualEventSessionItemRequestBuilder) Get(ctx context.Context, requestConfiguration *VirtualEventsWebinarsItemRegistrationsItemSessionsVirtualEventSessionItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualEventSessionable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -75,7 +75,7 @@ func (m *VirtualEventsWebinarsItemRegistrationsItemSessionsVirtualEventSessionIt func (m *VirtualEventsWebinarsItemRegistrationsItemSessionsVirtualEventSessionItemRequestBuilder) Recording()(*VirtualEventsWebinarsItemRegistrationsItemSessionsItemRecordingRequestBuilder) { return NewVirtualEventsWebinarsItemRegistrationsItemSessionsItemRecordingRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// ToGetRequestInformation get sessions from solutions +// ToGetRequestInformation sessions of the webinar. func (m *VirtualEventsWebinarsItemRegistrationsItemSessionsVirtualEventSessionItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *VirtualEventsWebinarsItemRegistrationsItemSessionsVirtualEventSessionItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/solutions/virtual_events_webinars_item_registrations_request_builder.go b/solutions/virtual_events_webinars_item_registrations_request_builder.go index 7e727bf7189..3181e94e6da 100644 --- a/solutions/virtual_events_webinars_item_registrations_request_builder.go +++ b/solutions/virtual_events_webinars_item_registrations_request_builder.go @@ -11,7 +11,7 @@ import ( type VirtualEventsWebinarsItemRegistrationsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// VirtualEventsWebinarsItemRegistrationsRequestBuilderGetQueryParameters get registrations from solutions +// VirtualEventsWebinarsItemRegistrationsRequestBuilderGetQueryParameters get a list of all registration records of a webinar. type VirtualEventsWebinarsItemRegistrationsRequestBuilderGetQueryParameters struct { // Include count of items Count *bool `uriparametername:"%24count"` @@ -74,7 +74,10 @@ func NewVirtualEventsWebinarsItemRegistrationsRequestBuilder(rawUrl string, requ func (m *VirtualEventsWebinarsItemRegistrationsRequestBuilder) Count()(*VirtualEventsWebinarsItemRegistrationsCountRequestBuilder) { return NewVirtualEventsWebinarsItemRegistrationsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Get get registrations from solutions +// Get get a list of all registration records of a webinar. +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/virtualeventregistration-list?view=graph-rest-1.0 func (m *VirtualEventsWebinarsItemRegistrationsRequestBuilder) Get(ctx context.Context, requestConfiguration *VirtualEventsWebinarsItemRegistrationsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualEventRegistrationCollectionResponseable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -112,7 +115,7 @@ func (m *VirtualEventsWebinarsItemRegistrationsRequestBuilder) Post(ctx context. } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualEventRegistrationable), nil } -// ToGetRequestInformation get registrations from solutions +// ToGetRequestInformation get a list of all registration records of a webinar. func (m *VirtualEventsWebinarsItemRegistrationsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *VirtualEventsWebinarsItemRegistrationsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/solutions/virtual_events_webinars_item_registrations_virtual_event_registration_item_request_builder.go b/solutions/virtual_events_webinars_item_registrations_virtual_event_registration_item_request_builder.go index eced4d306f2..d50a4c0da73 100644 --- a/solutions/virtual_events_webinars_item_registrations_virtual_event_registration_item_request_builder.go +++ b/solutions/virtual_events_webinars_item_registrations_virtual_event_registration_item_request_builder.go @@ -18,7 +18,7 @@ type VirtualEventsWebinarsItemRegistrationsVirtualEventRegistrationItemRequestBu // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// VirtualEventsWebinarsItemRegistrationsVirtualEventRegistrationItemRequestBuilderGetQueryParameters get registrations from solutions +// VirtualEventsWebinarsItemRegistrationsVirtualEventRegistrationItemRequestBuilderGetQueryParameters get the properties and relationships of a virtualEventRegistration object. type VirtualEventsWebinarsItemRegistrationsVirtualEventRegistrationItemRequestBuilderGetQueryParameters struct { // Expand related entities Expand []string `uriparametername:"%24expand"` @@ -70,7 +70,10 @@ func (m *VirtualEventsWebinarsItemRegistrationsVirtualEventRegistrationItemReque } return nil } -// Get get registrations from solutions +// Get get the properties and relationships of a virtualEventRegistration object. +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/virtualeventregistration-get?view=graph-rest-1.0 func (m *VirtualEventsWebinarsItemRegistrationsVirtualEventRegistrationItemRequestBuilder) Get(ctx context.Context, requestConfiguration *VirtualEventsWebinarsItemRegistrationsVirtualEventRegistrationItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualEventRegistrationable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -124,7 +127,7 @@ func (m *VirtualEventsWebinarsItemRegistrationsVirtualEventRegistrationItemReque } return requestInfo, nil } -// ToGetRequestInformation get registrations from solutions +// ToGetRequestInformation get the properties and relationships of a virtualEventRegistration object. func (m *VirtualEventsWebinarsItemRegistrationsVirtualEventRegistrationItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *VirtualEventsWebinarsItemRegistrationsVirtualEventRegistrationItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/solutions/virtual_events_webinars_item_sessions_item_registration_request_builder.go b/solutions/virtual_events_webinars_item_sessions_item_registration_request_builder.go index 821c396dca2..11815a43129 100644 --- a/solutions/virtual_events_webinars_item_sessions_item_registration_request_builder.go +++ b/solutions/virtual_events_webinars_item_sessions_item_registration_request_builder.go @@ -58,10 +58,10 @@ func NewVirtualEventsWebinarsItemSessionsItemRegistrationRequestBuilder(rawUrl s func (m *VirtualEventsWebinarsItemSessionsItemRegistrationRequestBuilder) CustomQuestions()(*VirtualEventsWebinarsItemSessionsItemRegistrationCustomQuestionsRequestBuilder) { return NewVirtualEventsWebinarsItemSessionsItemRegistrationCustomQuestionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Delete disable and delete the meetingRegistration of an onlineMeeting on behalf of the organizer. +// Delete disable and delete the externalMeetingRegistration of an onlineMeeting. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/meetingregistration-delete?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/externalmeetingregistration-delete?view=graph-rest-1.0 func (m *VirtualEventsWebinarsItemSessionsItemRegistrationRequestBuilder) Delete(ctx context.Context, requestConfiguration *VirtualEventsWebinarsItemSessionsItemRegistrationRequestBuilderDeleteRequestConfiguration)(error) { requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); if err != nil { @@ -125,7 +125,7 @@ func (m *VirtualEventsWebinarsItemSessionsItemRegistrationRequestBuilder) Patch( func (m *VirtualEventsWebinarsItemSessionsItemRegistrationRequestBuilder) Registrants()(*VirtualEventsWebinarsItemSessionsItemRegistrationRegistrantsRequestBuilder) { return NewVirtualEventsWebinarsItemSessionsItemRegistrationRegistrantsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// ToDeleteRequestInformation disable and delete the meetingRegistration of an onlineMeeting on behalf of the organizer. +// ToDeleteRequestInformation disable and delete the externalMeetingRegistration of an onlineMeeting. func (m *VirtualEventsWebinarsItemSessionsItemRegistrationRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *VirtualEventsWebinarsItemSessionsItemRegistrationRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/solutions/virtual_events_webinars_item_sessions_item_registrations_request_builder.go b/solutions/virtual_events_webinars_item_sessions_item_registrations_request_builder.go index ce59cb9eea5..79104dc8092 100644 --- a/solutions/virtual_events_webinars_item_sessions_item_registrations_request_builder.go +++ b/solutions/virtual_events_webinars_item_sessions_item_registrations_request_builder.go @@ -11,7 +11,7 @@ import ( type VirtualEventsWebinarsItemSessionsItemRegistrationsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// VirtualEventsWebinarsItemSessionsItemRegistrationsRequestBuilderGetQueryParameters get registrations from solutions +// VirtualEventsWebinarsItemSessionsItemRegistrationsRequestBuilderGetQueryParameters registration records of this virtual event session. type VirtualEventsWebinarsItemSessionsItemRegistrationsRequestBuilderGetQueryParameters struct { // Include count of items Count *bool `uriparametername:"%24count"` @@ -67,7 +67,7 @@ func NewVirtualEventsWebinarsItemSessionsItemRegistrationsRequestBuilder(rawUrl func (m *VirtualEventsWebinarsItemSessionsItemRegistrationsRequestBuilder) Count()(*VirtualEventsWebinarsItemSessionsItemRegistrationsCountRequestBuilder) { return NewVirtualEventsWebinarsItemSessionsItemRegistrationsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Get get registrations from solutions +// Get registration records of this virtual event session. func (m *VirtualEventsWebinarsItemSessionsItemRegistrationsRequestBuilder) Get(ctx context.Context, requestConfiguration *VirtualEventsWebinarsItemSessionsItemRegistrationsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualEventRegistrationCollectionResponseable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -86,7 +86,7 @@ func (m *VirtualEventsWebinarsItemSessionsItemRegistrationsRequestBuilder) Get(c } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualEventRegistrationCollectionResponseable), nil } -// ToGetRequestInformation get registrations from solutions +// ToGetRequestInformation registration records of this virtual event session. func (m *VirtualEventsWebinarsItemSessionsItemRegistrationsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *VirtualEventsWebinarsItemSessionsItemRegistrationsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/solutions/virtual_events_webinars_item_sessions_item_registrations_virtual_event_registration_item_request_builder.go b/solutions/virtual_events_webinars_item_sessions_item_registrations_virtual_event_registration_item_request_builder.go index 50715cf4ed1..74326b9dd93 100644 --- a/solutions/virtual_events_webinars_item_sessions_item_registrations_virtual_event_registration_item_request_builder.go +++ b/solutions/virtual_events_webinars_item_sessions_item_registrations_virtual_event_registration_item_request_builder.go @@ -11,7 +11,7 @@ import ( type VirtualEventsWebinarsItemSessionsItemRegistrationsVirtualEventRegistrationItemRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// VirtualEventsWebinarsItemSessionsItemRegistrationsVirtualEventRegistrationItemRequestBuilderGetQueryParameters get registrations from solutions +// VirtualEventsWebinarsItemSessionsItemRegistrationsVirtualEventRegistrationItemRequestBuilderGetQueryParameters registration records of this virtual event session. type VirtualEventsWebinarsItemSessionsItemRegistrationsVirtualEventRegistrationItemRequestBuilderGetQueryParameters struct { // Expand related entities Expand []string `uriparametername:"%24expand"` @@ -40,7 +40,7 @@ func NewVirtualEventsWebinarsItemSessionsItemRegistrationsVirtualEventRegistrati urlParams["request-raw-url"] = rawUrl return NewVirtualEventsWebinarsItemSessionsItemRegistrationsVirtualEventRegistrationItemRequestBuilderInternal(urlParams, requestAdapter) } -// Get get registrations from solutions +// Get registration records of this virtual event session. func (m *VirtualEventsWebinarsItemSessionsItemRegistrationsVirtualEventRegistrationItemRequestBuilder) Get(ctx context.Context, requestConfiguration *VirtualEventsWebinarsItemSessionsItemRegistrationsVirtualEventRegistrationItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualEventRegistrationable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -59,7 +59,7 @@ func (m *VirtualEventsWebinarsItemSessionsItemRegistrationsVirtualEventRegistrat } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualEventRegistrationable), nil } -// ToGetRequestInformation get registrations from solutions +// ToGetRequestInformation registration records of this virtual event session. func (m *VirtualEventsWebinarsItemSessionsItemRegistrationsVirtualEventRegistrationItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *VirtualEventsWebinarsItemSessionsItemRegistrationsVirtualEventRegistrationItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/subscribedskus/subscribed_skus_request_builder.go b/subscribedskus/subscribed_skus_request_builder.go index 8902505912f..4df9a9dece9 100644 --- a/subscribedskus/subscribed_skus_request_builder.go +++ b/subscribedskus/subscribed_skus_request_builder.go @@ -11,7 +11,7 @@ import ( type SubscribedSkusRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// 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. +// SubscribedSkusRequestBuilderGetQueryParameters 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. type SubscribedSkusRequestBuilderGetQueryParameters struct { // Order items by property values Orderby []string `uriparametername:"%24orderby"` @@ -60,7 +60,7 @@ func NewSubscribedSkusRequestBuilder(rawUrl string, requestAdapter i2ae4187f7dae urlParams["request-raw-url"] = rawUrl return NewSubscribedSkusRequestBuilderInternal(urlParams, requestAdapter) } -// Get 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 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. // [Find more info here] // // [Find more info here]: https://learn.microsoft.com/graph/api/subscribedsku-list?view=graph-rest-1.0 @@ -101,7 +101,7 @@ func (m *SubscribedSkusRequestBuilder) Post(ctx context.Context, body ie233ee762 } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.SubscribedSkuable), nil } -// ToGetRequestInformation 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. +// ToGetRequestInformation 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. func (m *SubscribedSkusRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *SubscribedSkusRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/teams/item_channels_item_members_conversation_member_item_request_builder.go b/teams/item_channels_item_members_conversation_member_item_request_builder.go index fbb912caaee..c8c9fd351a0 100644 --- a/teams/item_channels_item_members_conversation_member_item_request_builder.go +++ b/teams/item_channels_item_members_conversation_member_item_request_builder.go @@ -95,10 +95,10 @@ func (m *ItemChannelsItemMembersConversationMemberItemRequestBuilder) Get(ctx co } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable), nil } -// Patch update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. +// Patch update the role of a conversationMember in a team.or channel. // [Find more info here] // -// [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 func (m *ItemChannelsItemMembersConversationMemberItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable, requestConfiguration *ItemChannelsItemMembersConversationMemberItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable, error) { requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -145,7 +145,7 @@ func (m *ItemChannelsItemMembersConversationMemberItemRequestBuilder) ToGetReque } return requestInfo, nil } -// ToPatchRequestInformation update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. +// ToPatchRequestInformation update the role of a conversationMember in a team.or channel. func (m *ItemChannelsItemMembersConversationMemberItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable, requestConfiguration *ItemChannelsItemMembersConversationMemberItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/teams/item_channels_item_messages_request_builder.go b/teams/item_channels_item_messages_request_builder.go index c22a345259c..529c9db8d93 100644 --- a/teams/item_channels_item_messages_request_builder.go +++ b/teams/item_channels_item_messages_request_builder.go @@ -100,10 +100,10 @@ func (m *ItemChannelsItemMessagesRequestBuilder) Get(ctx context.Context, reques } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageCollectionResponseable), nil } -// Post send a new chatMessage in the specified channel. +// Post send a new chatMessage in the specified channel or a chat. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/channel-post-messages?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/chatmessage-post?view=graph-rest-1.0 func (m *ItemChannelsItemMessagesRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, requestConfiguration *ItemChannelsItemMessagesRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -138,7 +138,7 @@ func (m *ItemChannelsItemMessagesRequestBuilder) ToGetRequestInformation(ctx con } return requestInfo, nil } -// ToPostRequestInformation send a new chatMessage in the specified channel. +// ToPostRequestInformation send a new chatMessage in the specified channel or a chat. func (m *ItemChannelsItemMessagesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, requestConfiguration *ItemChannelsItemMessagesRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/teams/item_group_request_builder.go b/teams/item_group_request_builder.go index ac080b5046f..b51f2ca3a42 100644 --- a/teams/item_group_request_builder.go +++ b/teams/item_group_request_builder.go @@ -59,6 +59,10 @@ func (m *ItemGroupRequestBuilder) Get(ctx context.Context, requestConfiguration } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Groupable), nil } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *ItemGroupRequestBuilder) ServiceProvisioningErrors()(*ItemGroupServiceProvisioningErrorsRequestBuilder) { + return NewItemGroupServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation get group from teams func (m *ItemGroupRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemGroupRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/teams/item_group_service_provisioning_errors_count_request_builder.go b/teams/item_group_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..93c769e0f27 --- /dev/null +++ b/teams/item_group_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package teams + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemGroupServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type ItemGroupServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemGroupServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type ItemGroupServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// ItemGroupServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemGroupServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemGroupServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewItemGroupServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewItemGroupServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemGroupServiceProvisioningErrorsCountRequestBuilder) { + m := &ItemGroupServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teams/{team%2Did}/group/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewItemGroupServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewItemGroupServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemGroupServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemGroupServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *ItemGroupServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemGroupServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *ItemGroupServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemGroupServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemGroupServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*ItemGroupServiceProvisioningErrorsCountRequestBuilder) { + return NewItemGroupServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/teams/item_group_service_provisioning_errors_request_builder.go b/teams/item_group_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..7e9af104cf7 --- /dev/null +++ b/teams/item_group_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package teams + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemGroupServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \teams\{team-id}\group\serviceProvisioningErrors +type ItemGroupServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemGroupServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +type ItemGroupServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// ItemGroupServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemGroupServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemGroupServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewItemGroupServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemGroupServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemGroupServiceProvisioningErrorsRequestBuilder) { + m := &ItemGroupServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teams/{team%2Did}/group/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewItemGroupServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemGroupServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemGroupServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemGroupServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *ItemGroupServiceProvisioningErrorsRequestBuilder) Count()(*ItemGroupServiceProvisioningErrorsCountRequestBuilder) { + return NewItemGroupServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemGroupServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemGroupServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemGroupServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemGroupServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemGroupServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*ItemGroupServiceProvisioningErrorsRequestBuilder) { + return NewItemGroupServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/teams/item_owners_item_service_provisioning_errors_count_request_builder.go b/teams/item_owners_item_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..aa80b151532 --- /dev/null +++ b/teams/item_owners_item_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package teams + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemOwnersItemServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type ItemOwnersItemServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemOwnersItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type ItemOwnersItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// ItemOwnersItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemOwnersItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemOwnersItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewItemOwnersItemServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewItemOwnersItemServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemOwnersItemServiceProvisioningErrorsCountRequestBuilder) { + m := &ItemOwnersItemServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teams/{team%2Did}/owners/{user%2Did}/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewItemOwnersItemServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewItemOwnersItemServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemOwnersItemServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemOwnersItemServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *ItemOwnersItemServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemOwnersItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *ItemOwnersItemServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemOwnersItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemOwnersItemServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*ItemOwnersItemServiceProvisioningErrorsCountRequestBuilder) { + return NewItemOwnersItemServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/teams/item_owners_item_service_provisioning_errors_request_builder.go b/teams/item_owners_item_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..95e060b84f5 --- /dev/null +++ b/teams/item_owners_item_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package teams + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemOwnersItemServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \teams\{team-id}\owners\{user-id}\serviceProvisioningErrors +type ItemOwnersItemServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemOwnersItemServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type ItemOwnersItemServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// ItemOwnersItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemOwnersItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemOwnersItemServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewItemOwnersItemServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemOwnersItemServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemOwnersItemServiceProvisioningErrorsRequestBuilder) { + m := &ItemOwnersItemServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teams/{team%2Did}/owners/{user%2Did}/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewItemOwnersItemServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemOwnersItemServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemOwnersItemServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemOwnersItemServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *ItemOwnersItemServiceProvisioningErrorsRequestBuilder) Count()(*ItemOwnersItemServiceProvisioningErrorsCountRequestBuilder) { + return NewItemOwnersItemServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemOwnersItemServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemOwnersItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemOwnersItemServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemOwnersItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemOwnersItemServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*ItemOwnersItemServiceProvisioningErrorsRequestBuilder) { + return NewItemOwnersItemServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/teams/item_owners_user_item_request_builder.go b/teams/item_owners_user_item_request_builder.go index 60b97e11cb6..57cb7db149f 100644 --- a/teams/item_owners_user_item_request_builder.go +++ b/teams/item_owners_user_item_request_builder.go @@ -63,6 +63,10 @@ func (m *ItemOwnersUserItemRequestBuilder) Get(ctx context.Context, requestConfi func (m *ItemOwnersUserItemRequestBuilder) MailboxSettings()(*ItemOwnersItemMailboxSettingsRequestBuilder) { return NewItemOwnersItemMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *ItemOwnersUserItemRequestBuilder) ServiceProvisioningErrors()(*ItemOwnersItemServiceProvisioningErrorsRequestBuilder) { + return NewItemOwnersItemServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation the list of this team's owners. Currently, when creating a team using application permissions, exactly one owner must be specified. When using user delegated permissions, no owner can be specified (the current user is the owner). Owner must be specified as an object ID (GUID), not a UPN. func (m *ItemOwnersUserItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemOwnersUserItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/teams/item_primary_channel_members_conversation_member_item_request_builder.go b/teams/item_primary_channel_members_conversation_member_item_request_builder.go index adb6e2c3323..7031e32da0e 100644 --- a/teams/item_primary_channel_members_conversation_member_item_request_builder.go +++ b/teams/item_primary_channel_members_conversation_member_item_request_builder.go @@ -95,10 +95,10 @@ func (m *ItemPrimaryChannelMembersConversationMemberItemRequestBuilder) Get(ctx } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable), nil } -// Patch update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. +// Patch update the role of a conversationMember in a team.or channel. // [Find more info here] // -// [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 func (m *ItemPrimaryChannelMembersConversationMemberItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable, requestConfiguration *ItemPrimaryChannelMembersConversationMemberItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable, error) { requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -145,7 +145,7 @@ func (m *ItemPrimaryChannelMembersConversationMemberItemRequestBuilder) ToGetReq } return requestInfo, nil } -// ToPatchRequestInformation update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. +// ToPatchRequestInformation update the role of a conversationMember in a team.or channel. func (m *ItemPrimaryChannelMembersConversationMemberItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable, requestConfiguration *ItemPrimaryChannelMembersConversationMemberItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/teams/item_primary_channel_messages_request_builder.go b/teams/item_primary_channel_messages_request_builder.go index 88e6219ba12..bb4732b558f 100644 --- a/teams/item_primary_channel_messages_request_builder.go +++ b/teams/item_primary_channel_messages_request_builder.go @@ -100,10 +100,10 @@ func (m *ItemPrimaryChannelMessagesRequestBuilder) Get(ctx context.Context, requ } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageCollectionResponseable), nil } -// Post send a new chatMessage in the specified channel. +// Post send a new chatMessage in the specified channel or a chat. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/channel-post-messages?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/chatmessage-post?view=graph-rest-1.0 func (m *ItemPrimaryChannelMessagesRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, requestConfiguration *ItemPrimaryChannelMessagesRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -138,7 +138,7 @@ func (m *ItemPrimaryChannelMessagesRequestBuilder) ToGetRequestInformation(ctx c } return requestInfo, nil } -// ToPostRequestInformation send a new chatMessage in the specified channel. +// ToPostRequestInformation send a new chatMessage in the specified channel or a chat. func (m *ItemPrimaryChannelMessagesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, requestConfiguration *ItemPrimaryChannelMessagesRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/teamtemplatedefinition/item_team_definition_channels_item_members_conversation_member_item_request_builder.go b/teamtemplatedefinition/item_team_definition_channels_item_members_conversation_member_item_request_builder.go index d666b929e7e..074dcc9da01 100644 --- a/teamtemplatedefinition/item_team_definition_channels_item_members_conversation_member_item_request_builder.go +++ b/teamtemplatedefinition/item_team_definition_channels_item_members_conversation_member_item_request_builder.go @@ -95,10 +95,10 @@ func (m *ItemTeamDefinitionChannelsItemMembersConversationMemberItemRequestBuild } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable), nil } -// Patch update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. +// Patch update the role of a conversationMember in a team.or channel. // [Find more info here] // -// [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 func (m *ItemTeamDefinitionChannelsItemMembersConversationMemberItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable, requestConfiguration *ItemTeamDefinitionChannelsItemMembersConversationMemberItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable, error) { requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -145,7 +145,7 @@ func (m *ItemTeamDefinitionChannelsItemMembersConversationMemberItemRequestBuild } return requestInfo, nil } -// ToPatchRequestInformation update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. +// ToPatchRequestInformation update the role of a conversationMember in a team.or channel. func (m *ItemTeamDefinitionChannelsItemMembersConversationMemberItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable, requestConfiguration *ItemTeamDefinitionChannelsItemMembersConversationMemberItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/teamtemplatedefinition/item_team_definition_channels_item_messages_request_builder.go b/teamtemplatedefinition/item_team_definition_channels_item_messages_request_builder.go index 616f94b32f5..4a0a2cb1b7f 100644 --- a/teamtemplatedefinition/item_team_definition_channels_item_messages_request_builder.go +++ b/teamtemplatedefinition/item_team_definition_channels_item_messages_request_builder.go @@ -100,10 +100,10 @@ func (m *ItemTeamDefinitionChannelsItemMessagesRequestBuilder) Get(ctx context.C } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageCollectionResponseable), nil } -// Post send a new chatMessage in the specified channel. +// Post send a new chatMessage in the specified channel or a chat. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/channel-post-messages?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/chatmessage-post?view=graph-rest-1.0 func (m *ItemTeamDefinitionChannelsItemMessagesRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, requestConfiguration *ItemTeamDefinitionChannelsItemMessagesRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -138,7 +138,7 @@ func (m *ItemTeamDefinitionChannelsItemMessagesRequestBuilder) ToGetRequestInfor } return requestInfo, nil } -// ToPostRequestInformation send a new chatMessage in the specified channel. +// ToPostRequestInformation send a new chatMessage in the specified channel or a chat. func (m *ItemTeamDefinitionChannelsItemMessagesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, requestConfiguration *ItemTeamDefinitionChannelsItemMessagesRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/teamtemplatedefinition/item_team_definition_group_request_builder.go b/teamtemplatedefinition/item_team_definition_group_request_builder.go index 14a5f8ce8cb..99761413bd5 100644 --- a/teamtemplatedefinition/item_team_definition_group_request_builder.go +++ b/teamtemplatedefinition/item_team_definition_group_request_builder.go @@ -59,6 +59,10 @@ func (m *ItemTeamDefinitionGroupRequestBuilder) Get(ctx context.Context, request } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Groupable), nil } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *ItemTeamDefinitionGroupRequestBuilder) ServiceProvisioningErrors()(*ItemTeamDefinitionGroupServiceProvisioningErrorsRequestBuilder) { + return NewItemTeamDefinitionGroupServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation get group from teamTemplateDefinition func (m *ItemTeamDefinitionGroupRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemTeamDefinitionGroupRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/teamtemplatedefinition/item_team_definition_group_service_provisioning_errors_count_request_builder.go b/teamtemplatedefinition/item_team_definition_group_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..f0c53ad015d --- /dev/null +++ b/teamtemplatedefinition/item_team_definition_group_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package teamtemplatedefinition + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemTeamDefinitionGroupServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type ItemTeamDefinitionGroupServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemTeamDefinitionGroupServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type ItemTeamDefinitionGroupServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// ItemTeamDefinitionGroupServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemTeamDefinitionGroupServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemTeamDefinitionGroupServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewItemTeamDefinitionGroupServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewItemTeamDefinitionGroupServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamDefinitionGroupServiceProvisioningErrorsCountRequestBuilder) { + m := &ItemTeamDefinitionGroupServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teamTemplateDefinition/{teamTemplateDefinition%2Did}/teamDefinition/group/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewItemTeamDefinitionGroupServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewItemTeamDefinitionGroupServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamDefinitionGroupServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamDefinitionGroupServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *ItemTeamDefinitionGroupServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemTeamDefinitionGroupServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *ItemTeamDefinitionGroupServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemTeamDefinitionGroupServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemTeamDefinitionGroupServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*ItemTeamDefinitionGroupServiceProvisioningErrorsCountRequestBuilder) { + return NewItemTeamDefinitionGroupServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/teamtemplatedefinition/item_team_definition_group_service_provisioning_errors_request_builder.go b/teamtemplatedefinition/item_team_definition_group_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..f6b74ca25b4 --- /dev/null +++ b/teamtemplatedefinition/item_team_definition_group_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package teamtemplatedefinition + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemTeamDefinitionGroupServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \teamTemplateDefinition\{teamTemplateDefinition-id}\teamDefinition\group\serviceProvisioningErrors +type ItemTeamDefinitionGroupServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemTeamDefinitionGroupServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +type ItemTeamDefinitionGroupServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// ItemTeamDefinitionGroupServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemTeamDefinitionGroupServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemTeamDefinitionGroupServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewItemTeamDefinitionGroupServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemTeamDefinitionGroupServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamDefinitionGroupServiceProvisioningErrorsRequestBuilder) { + m := &ItemTeamDefinitionGroupServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teamTemplateDefinition/{teamTemplateDefinition%2Did}/teamDefinition/group/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewItemTeamDefinitionGroupServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemTeamDefinitionGroupServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamDefinitionGroupServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamDefinitionGroupServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *ItemTeamDefinitionGroupServiceProvisioningErrorsRequestBuilder) Count()(*ItemTeamDefinitionGroupServiceProvisioningErrorsCountRequestBuilder) { + return NewItemTeamDefinitionGroupServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemTeamDefinitionGroupServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemTeamDefinitionGroupServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemTeamDefinitionGroupServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemTeamDefinitionGroupServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemTeamDefinitionGroupServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*ItemTeamDefinitionGroupServiceProvisioningErrorsRequestBuilder) { + return NewItemTeamDefinitionGroupServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/teamtemplatedefinition/item_team_definition_owners_item_service_provisioning_errors_count_request_builder.go b/teamtemplatedefinition/item_team_definition_owners_item_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..b07298d3cd0 --- /dev/null +++ b/teamtemplatedefinition/item_team_definition_owners_item_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package teamtemplatedefinition + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemTeamDefinitionOwnersItemServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type ItemTeamDefinitionOwnersItemServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemTeamDefinitionOwnersItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type ItemTeamDefinitionOwnersItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// ItemTeamDefinitionOwnersItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemTeamDefinitionOwnersItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemTeamDefinitionOwnersItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewItemTeamDefinitionOwnersItemServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewItemTeamDefinitionOwnersItemServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamDefinitionOwnersItemServiceProvisioningErrorsCountRequestBuilder) { + m := &ItemTeamDefinitionOwnersItemServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teamTemplateDefinition/{teamTemplateDefinition%2Did}/teamDefinition/owners/{user%2Did}/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewItemTeamDefinitionOwnersItemServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewItemTeamDefinitionOwnersItemServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamDefinitionOwnersItemServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamDefinitionOwnersItemServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *ItemTeamDefinitionOwnersItemServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemTeamDefinitionOwnersItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *ItemTeamDefinitionOwnersItemServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemTeamDefinitionOwnersItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemTeamDefinitionOwnersItemServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*ItemTeamDefinitionOwnersItemServiceProvisioningErrorsCountRequestBuilder) { + return NewItemTeamDefinitionOwnersItemServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/teamtemplatedefinition/item_team_definition_owners_item_service_provisioning_errors_request_builder.go b/teamtemplatedefinition/item_team_definition_owners_item_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..823bb82e848 --- /dev/null +++ b/teamtemplatedefinition/item_team_definition_owners_item_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package teamtemplatedefinition + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemTeamDefinitionOwnersItemServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \teamTemplateDefinition\{teamTemplateDefinition-id}\teamDefinition\owners\{user-id}\serviceProvisioningErrors +type ItemTeamDefinitionOwnersItemServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemTeamDefinitionOwnersItemServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type ItemTeamDefinitionOwnersItemServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// ItemTeamDefinitionOwnersItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemTeamDefinitionOwnersItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemTeamDefinitionOwnersItemServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewItemTeamDefinitionOwnersItemServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemTeamDefinitionOwnersItemServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamDefinitionOwnersItemServiceProvisioningErrorsRequestBuilder) { + m := &ItemTeamDefinitionOwnersItemServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teamTemplateDefinition/{teamTemplateDefinition%2Did}/teamDefinition/owners/{user%2Did}/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewItemTeamDefinitionOwnersItemServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemTeamDefinitionOwnersItemServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamDefinitionOwnersItemServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamDefinitionOwnersItemServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *ItemTeamDefinitionOwnersItemServiceProvisioningErrorsRequestBuilder) Count()(*ItemTeamDefinitionOwnersItemServiceProvisioningErrorsCountRequestBuilder) { + return NewItemTeamDefinitionOwnersItemServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemTeamDefinitionOwnersItemServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemTeamDefinitionOwnersItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemTeamDefinitionOwnersItemServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemTeamDefinitionOwnersItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemTeamDefinitionOwnersItemServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*ItemTeamDefinitionOwnersItemServiceProvisioningErrorsRequestBuilder) { + return NewItemTeamDefinitionOwnersItemServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/teamtemplatedefinition/item_team_definition_owners_user_item_request_builder.go b/teamtemplatedefinition/item_team_definition_owners_user_item_request_builder.go index 9628c4c99ea..f660dd41b37 100644 --- a/teamtemplatedefinition/item_team_definition_owners_user_item_request_builder.go +++ b/teamtemplatedefinition/item_team_definition_owners_user_item_request_builder.go @@ -63,6 +63,10 @@ func (m *ItemTeamDefinitionOwnersUserItemRequestBuilder) Get(ctx context.Context func (m *ItemTeamDefinitionOwnersUserItemRequestBuilder) MailboxSettings()(*ItemTeamDefinitionOwnersItemMailboxSettingsRequestBuilder) { return NewItemTeamDefinitionOwnersItemMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *ItemTeamDefinitionOwnersUserItemRequestBuilder) ServiceProvisioningErrors()(*ItemTeamDefinitionOwnersItemServiceProvisioningErrorsRequestBuilder) { + return NewItemTeamDefinitionOwnersItemServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation the list of this team's owners. Currently, when creating a team using application permissions, exactly one owner must be specified. When using user delegated permissions, no owner can be specified (the current user is the owner). Owner must be specified as an object ID (GUID), not a UPN. func (m *ItemTeamDefinitionOwnersUserItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemTeamDefinitionOwnersUserItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/teamtemplatedefinition/item_team_definition_primary_channel_members_conversation_member_item_request_builder.go b/teamtemplatedefinition/item_team_definition_primary_channel_members_conversation_member_item_request_builder.go index bbc5e62f01f..489995deff9 100644 --- a/teamtemplatedefinition/item_team_definition_primary_channel_members_conversation_member_item_request_builder.go +++ b/teamtemplatedefinition/item_team_definition_primary_channel_members_conversation_member_item_request_builder.go @@ -95,10 +95,10 @@ func (m *ItemTeamDefinitionPrimaryChannelMembersConversationMemberItemRequestBui } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable), nil } -// Patch update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. +// Patch update the role of a conversationMember in a team.or channel. // [Find more info here] // -// [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 func (m *ItemTeamDefinitionPrimaryChannelMembersConversationMemberItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable, requestConfiguration *ItemTeamDefinitionPrimaryChannelMembersConversationMemberItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable, error) { requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -145,7 +145,7 @@ func (m *ItemTeamDefinitionPrimaryChannelMembersConversationMemberItemRequestBui } return requestInfo, nil } -// ToPatchRequestInformation update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. +// ToPatchRequestInformation update the role of a conversationMember in a team.or channel. func (m *ItemTeamDefinitionPrimaryChannelMembersConversationMemberItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable, requestConfiguration *ItemTeamDefinitionPrimaryChannelMembersConversationMemberItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/teamtemplatedefinition/item_team_definition_primary_channel_messages_request_builder.go b/teamtemplatedefinition/item_team_definition_primary_channel_messages_request_builder.go index 9054aca244c..aad18cb5e7f 100644 --- a/teamtemplatedefinition/item_team_definition_primary_channel_messages_request_builder.go +++ b/teamtemplatedefinition/item_team_definition_primary_channel_messages_request_builder.go @@ -100,10 +100,10 @@ func (m *ItemTeamDefinitionPrimaryChannelMessagesRequestBuilder) Get(ctx context } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageCollectionResponseable), nil } -// Post send a new chatMessage in the specified channel. +// Post send a new chatMessage in the specified channel or a chat. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/channel-post-messages?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/chatmessage-post?view=graph-rest-1.0 func (m *ItemTeamDefinitionPrimaryChannelMessagesRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, requestConfiguration *ItemTeamDefinitionPrimaryChannelMessagesRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -138,7 +138,7 @@ func (m *ItemTeamDefinitionPrimaryChannelMessagesRequestBuilder) ToGetRequestInf } return requestInfo, nil } -// ToPostRequestInformation send a new chatMessage in the specified channel. +// ToPostRequestInformation send a new chatMessage in the specified channel or a chat. func (m *ItemTeamDefinitionPrimaryChannelMessagesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, requestConfiguration *ItemTeamDefinitionPrimaryChannelMessagesRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/teamwork/deleted_teams_item_channels_item_members_conversation_member_item_request_builder.go b/teamwork/deleted_teams_item_channels_item_members_conversation_member_item_request_builder.go index 4ba42a52d9f..15a19fe16e4 100644 --- a/teamwork/deleted_teams_item_channels_item_members_conversation_member_item_request_builder.go +++ b/teamwork/deleted_teams_item_channels_item_members_conversation_member_item_request_builder.go @@ -95,10 +95,10 @@ func (m *DeletedTeamsItemChannelsItemMembersConversationMemberItemRequestBuilder } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable), nil } -// Patch update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. +// Patch update the role of a conversationMember in a team.or channel. // [Find more info here] // -// [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 func (m *DeletedTeamsItemChannelsItemMembersConversationMemberItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable, requestConfiguration *DeletedTeamsItemChannelsItemMembersConversationMemberItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable, error) { requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -145,7 +145,7 @@ func (m *DeletedTeamsItemChannelsItemMembersConversationMemberItemRequestBuilder } return requestInfo, nil } -// ToPatchRequestInformation update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. +// ToPatchRequestInformation update the role of a conversationMember in a team.or channel. func (m *DeletedTeamsItemChannelsItemMembersConversationMemberItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable, requestConfiguration *DeletedTeamsItemChannelsItemMembersConversationMemberItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/teamwork/deleted_teams_item_channels_item_messages_request_builder.go b/teamwork/deleted_teams_item_channels_item_messages_request_builder.go index 7269c4fe9d0..270228377eb 100644 --- a/teamwork/deleted_teams_item_channels_item_messages_request_builder.go +++ b/teamwork/deleted_teams_item_channels_item_messages_request_builder.go @@ -100,10 +100,10 @@ func (m *DeletedTeamsItemChannelsItemMessagesRequestBuilder) Get(ctx context.Con } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageCollectionResponseable), nil } -// Post send a new chatMessage in the specified channel. +// Post send a new chatMessage in the specified channel or a chat. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/channel-post-messages?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/chatmessage-post?view=graph-rest-1.0 func (m *DeletedTeamsItemChannelsItemMessagesRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, requestConfiguration *DeletedTeamsItemChannelsItemMessagesRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -138,7 +138,7 @@ func (m *DeletedTeamsItemChannelsItemMessagesRequestBuilder) ToGetRequestInforma } return requestInfo, nil } -// ToPostRequestInformation send a new chatMessage in the specified channel. +// ToPostRequestInformation send a new chatMessage in the specified channel or a chat. func (m *DeletedTeamsItemChannelsItemMessagesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, requestConfiguration *DeletedTeamsItemChannelsItemMessagesRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/teamwork/team_templates_item_definitions_item_team_definition_channels_item_members_conversation_member_item_request_builder.go b/teamwork/team_templates_item_definitions_item_team_definition_channels_item_members_conversation_member_item_request_builder.go index 0ee740f7bc2..5215454abf3 100644 --- a/teamwork/team_templates_item_definitions_item_team_definition_channels_item_members_conversation_member_item_request_builder.go +++ b/teamwork/team_templates_item_definitions_item_team_definition_channels_item_members_conversation_member_item_request_builder.go @@ -95,10 +95,10 @@ func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemMembersConver } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable), nil } -// Patch update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. +// Patch update the role of a conversationMember in a team.or channel. // [Find more info here] // -// [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 func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemMembersConversationMemberItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable, requestConfiguration *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemMembersConversationMemberItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable, error) { requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -145,7 +145,7 @@ func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemMembersConver } return requestInfo, nil } -// ToPatchRequestInformation update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. +// ToPatchRequestInformation update the role of a conversationMember in a team.or channel. func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemMembersConversationMemberItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable, requestConfiguration *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemMembersConversationMemberItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/teamwork/team_templates_item_definitions_item_team_definition_channels_item_messages_request_builder.go b/teamwork/team_templates_item_definitions_item_team_definition_channels_item_messages_request_builder.go index aca2dfc5a8f..f3f0f48db37 100644 --- a/teamwork/team_templates_item_definitions_item_team_definition_channels_item_messages_request_builder.go +++ b/teamwork/team_templates_item_definitions_item_team_definition_channels_item_messages_request_builder.go @@ -100,10 +100,10 @@ func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemMessagesReque } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageCollectionResponseable), nil } -// Post send a new chatMessage in the specified channel. +// Post send a new chatMessage in the specified channel or a chat. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/channel-post-messages?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/chatmessage-post?view=graph-rest-1.0 func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemMessagesRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, requestConfiguration *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemMessagesRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -138,7 +138,7 @@ func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemMessagesReque } return requestInfo, nil } -// ToPostRequestInformation send a new chatMessage in the specified channel. +// ToPostRequestInformation send a new chatMessage in the specified channel or a chat. func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemMessagesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, requestConfiguration *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemMessagesRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/teamwork/team_templates_item_definitions_item_team_definition_group_request_builder.go b/teamwork/team_templates_item_definitions_item_team_definition_group_request_builder.go index 5a70bfca411..74f7aa9c95f 100644 --- a/teamwork/team_templates_item_definitions_item_team_definition_group_request_builder.go +++ b/teamwork/team_templates_item_definitions_item_team_definition_group_request_builder.go @@ -59,6 +59,10 @@ func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionGroupRequestBuilder) Get( } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Groupable), nil } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionGroupRequestBuilder) ServiceProvisioningErrors()(*TeamTemplatesItemDefinitionsItemTeamDefinitionGroupServiceProvisioningErrorsRequestBuilder) { + return NewTeamTemplatesItemDefinitionsItemTeamDefinitionGroupServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation get group from teamwork func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionGroupRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *TeamTemplatesItemDefinitionsItemTeamDefinitionGroupRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/teamwork/team_templates_item_definitions_item_team_definition_group_service_provisioning_errors_count_request_builder.go b/teamwork/team_templates_item_definitions_item_team_definition_group_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..05218abf994 --- /dev/null +++ b/teamwork/team_templates_item_definitions_item_team_definition_group_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package teamwork + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// TeamTemplatesItemDefinitionsItemTeamDefinitionGroupServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type TeamTemplatesItemDefinitionsItemTeamDefinitionGroupServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// TeamTemplatesItemDefinitionsItemTeamDefinitionGroupServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type TeamTemplatesItemDefinitionsItemTeamDefinitionGroupServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// TeamTemplatesItemDefinitionsItemTeamDefinitionGroupServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type TeamTemplatesItemDefinitionsItemTeamDefinitionGroupServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *TeamTemplatesItemDefinitionsItemTeamDefinitionGroupServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewTeamTemplatesItemDefinitionsItemTeamDefinitionGroupServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewTeamTemplatesItemDefinitionsItemTeamDefinitionGroupServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*TeamTemplatesItemDefinitionsItemTeamDefinitionGroupServiceProvisioningErrorsCountRequestBuilder) { + m := &TeamTemplatesItemDefinitionsItemTeamDefinitionGroupServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teamwork/teamTemplates/{teamTemplate%2Did}/definitions/{teamTemplateDefinition%2Did}/teamDefinition/group/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewTeamTemplatesItemDefinitionsItemTeamDefinitionGroupServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewTeamTemplatesItemDefinitionsItemTeamDefinitionGroupServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*TeamTemplatesItemDefinitionsItemTeamDefinitionGroupServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewTeamTemplatesItemDefinitionsItemTeamDefinitionGroupServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionGroupServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *TeamTemplatesItemDefinitionsItemTeamDefinitionGroupServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionGroupServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *TeamTemplatesItemDefinitionsItemTeamDefinitionGroupServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionGroupServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*TeamTemplatesItemDefinitionsItemTeamDefinitionGroupServiceProvisioningErrorsCountRequestBuilder) { + return NewTeamTemplatesItemDefinitionsItemTeamDefinitionGroupServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/teamwork/team_templates_item_definitions_item_team_definition_group_service_provisioning_errors_request_builder.go b/teamwork/team_templates_item_definitions_item_team_definition_group_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..18c645142f8 --- /dev/null +++ b/teamwork/team_templates_item_definitions_item_team_definition_group_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package teamwork + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// TeamTemplatesItemDefinitionsItemTeamDefinitionGroupServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \teamwork\teamTemplates\{teamTemplate-id}\definitions\{teamTemplateDefinition-id}\teamDefinition\group\serviceProvisioningErrors +type TeamTemplatesItemDefinitionsItemTeamDefinitionGroupServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// TeamTemplatesItemDefinitionsItemTeamDefinitionGroupServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +type TeamTemplatesItemDefinitionsItemTeamDefinitionGroupServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// TeamTemplatesItemDefinitionsItemTeamDefinitionGroupServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type TeamTemplatesItemDefinitionsItemTeamDefinitionGroupServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *TeamTemplatesItemDefinitionsItemTeamDefinitionGroupServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewTeamTemplatesItemDefinitionsItemTeamDefinitionGroupServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewTeamTemplatesItemDefinitionsItemTeamDefinitionGroupServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*TeamTemplatesItemDefinitionsItemTeamDefinitionGroupServiceProvisioningErrorsRequestBuilder) { + m := &TeamTemplatesItemDefinitionsItemTeamDefinitionGroupServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teamwork/teamTemplates/{teamTemplate%2Did}/definitions/{teamTemplateDefinition%2Did}/teamDefinition/group/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewTeamTemplatesItemDefinitionsItemTeamDefinitionGroupServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewTeamTemplatesItemDefinitionsItemTeamDefinitionGroupServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*TeamTemplatesItemDefinitionsItemTeamDefinitionGroupServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewTeamTemplatesItemDefinitionsItemTeamDefinitionGroupServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionGroupServiceProvisioningErrorsRequestBuilder) Count()(*TeamTemplatesItemDefinitionsItemTeamDefinitionGroupServiceProvisioningErrorsCountRequestBuilder) { + return NewTeamTemplatesItemDefinitionsItemTeamDefinitionGroupServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionGroupServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *TeamTemplatesItemDefinitionsItemTeamDefinitionGroupServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object . Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionGroupServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *TeamTemplatesItemDefinitionsItemTeamDefinitionGroupServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionGroupServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*TeamTemplatesItemDefinitionsItemTeamDefinitionGroupServiceProvisioningErrorsRequestBuilder) { + return NewTeamTemplatesItemDefinitionsItemTeamDefinitionGroupServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/teamwork/team_templates_item_definitions_item_team_definition_owners_item_service_provisioning_errors_count_request_builder.go b/teamwork/team_templates_item_definitions_item_team_definition_owners_item_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..7626c4910c2 --- /dev/null +++ b/teamwork/team_templates_item_definitions_item_team_definition_owners_item_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package teamwork + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// TeamTemplatesItemDefinitionsItemTeamDefinitionOwnersItemServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type TeamTemplatesItemDefinitionsItemTeamDefinitionOwnersItemServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// TeamTemplatesItemDefinitionsItemTeamDefinitionOwnersItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type TeamTemplatesItemDefinitionsItemTeamDefinitionOwnersItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// TeamTemplatesItemDefinitionsItemTeamDefinitionOwnersItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type TeamTemplatesItemDefinitionsItemTeamDefinitionOwnersItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *TeamTemplatesItemDefinitionsItemTeamDefinitionOwnersItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewTeamTemplatesItemDefinitionsItemTeamDefinitionOwnersItemServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewTeamTemplatesItemDefinitionsItemTeamDefinitionOwnersItemServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*TeamTemplatesItemDefinitionsItemTeamDefinitionOwnersItemServiceProvisioningErrorsCountRequestBuilder) { + m := &TeamTemplatesItemDefinitionsItemTeamDefinitionOwnersItemServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teamwork/teamTemplates/{teamTemplate%2Did}/definitions/{teamTemplateDefinition%2Did}/teamDefinition/owners/{user%2Did}/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewTeamTemplatesItemDefinitionsItemTeamDefinitionOwnersItemServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewTeamTemplatesItemDefinitionsItemTeamDefinitionOwnersItemServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*TeamTemplatesItemDefinitionsItemTeamDefinitionOwnersItemServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewTeamTemplatesItemDefinitionsItemTeamDefinitionOwnersItemServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionOwnersItemServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *TeamTemplatesItemDefinitionsItemTeamDefinitionOwnersItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionOwnersItemServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *TeamTemplatesItemDefinitionsItemTeamDefinitionOwnersItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionOwnersItemServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*TeamTemplatesItemDefinitionsItemTeamDefinitionOwnersItemServiceProvisioningErrorsCountRequestBuilder) { + return NewTeamTemplatesItemDefinitionsItemTeamDefinitionOwnersItemServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/teamwork/team_templates_item_definitions_item_team_definition_owners_item_service_provisioning_errors_request_builder.go b/teamwork/team_templates_item_definitions_item_team_definition_owners_item_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..6ce2b22a26b --- /dev/null +++ b/teamwork/team_templates_item_definitions_item_team_definition_owners_item_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package teamwork + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// TeamTemplatesItemDefinitionsItemTeamDefinitionOwnersItemServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \teamwork\teamTemplates\{teamTemplate-id}\definitions\{teamTemplateDefinition-id}\teamDefinition\owners\{user-id}\serviceProvisioningErrors +type TeamTemplatesItemDefinitionsItemTeamDefinitionOwnersItemServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// TeamTemplatesItemDefinitionsItemTeamDefinitionOwnersItemServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type TeamTemplatesItemDefinitionsItemTeamDefinitionOwnersItemServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// TeamTemplatesItemDefinitionsItemTeamDefinitionOwnersItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type TeamTemplatesItemDefinitionsItemTeamDefinitionOwnersItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *TeamTemplatesItemDefinitionsItemTeamDefinitionOwnersItemServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewTeamTemplatesItemDefinitionsItemTeamDefinitionOwnersItemServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewTeamTemplatesItemDefinitionsItemTeamDefinitionOwnersItemServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*TeamTemplatesItemDefinitionsItemTeamDefinitionOwnersItemServiceProvisioningErrorsRequestBuilder) { + m := &TeamTemplatesItemDefinitionsItemTeamDefinitionOwnersItemServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teamwork/teamTemplates/{teamTemplate%2Did}/definitions/{teamTemplateDefinition%2Did}/teamDefinition/owners/{user%2Did}/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewTeamTemplatesItemDefinitionsItemTeamDefinitionOwnersItemServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewTeamTemplatesItemDefinitionsItemTeamDefinitionOwnersItemServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*TeamTemplatesItemDefinitionsItemTeamDefinitionOwnersItemServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewTeamTemplatesItemDefinitionsItemTeamDefinitionOwnersItemServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionOwnersItemServiceProvisioningErrorsRequestBuilder) Count()(*TeamTemplatesItemDefinitionsItemTeamDefinitionOwnersItemServiceProvisioningErrorsCountRequestBuilder) { + return NewTeamTemplatesItemDefinitionsItemTeamDefinitionOwnersItemServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionOwnersItemServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *TeamTemplatesItemDefinitionsItemTeamDefinitionOwnersItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionOwnersItemServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *TeamTemplatesItemDefinitionsItemTeamDefinitionOwnersItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionOwnersItemServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*TeamTemplatesItemDefinitionsItemTeamDefinitionOwnersItemServiceProvisioningErrorsRequestBuilder) { + return NewTeamTemplatesItemDefinitionsItemTeamDefinitionOwnersItemServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/teamwork/team_templates_item_definitions_item_team_definition_owners_user_item_request_builder.go b/teamwork/team_templates_item_definitions_item_team_definition_owners_user_item_request_builder.go index 19228ce0f55..aec5212e29d 100644 --- a/teamwork/team_templates_item_definitions_item_team_definition_owners_user_item_request_builder.go +++ b/teamwork/team_templates_item_definitions_item_team_definition_owners_user_item_request_builder.go @@ -63,6 +63,10 @@ func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionOwnersUserItemRequestBuil func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionOwnersUserItemRequestBuilder) MailboxSettings()(*TeamTemplatesItemDefinitionsItemTeamDefinitionOwnersItemMailboxSettingsRequestBuilder) { return NewTeamTemplatesItemDefinitionsItemTeamDefinitionOwnersItemMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionOwnersUserItemRequestBuilder) ServiceProvisioningErrors()(*TeamTemplatesItemDefinitionsItemTeamDefinitionOwnersItemServiceProvisioningErrorsRequestBuilder) { + return NewTeamTemplatesItemDefinitionsItemTeamDefinitionOwnersItemServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToGetRequestInformation the list of this team's owners. Currently, when creating a team using application permissions, exactly one owner must be specified. When using user delegated permissions, no owner can be specified (the current user is the owner). Owner must be specified as an object ID (GUID), not a UPN. func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionOwnersUserItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *TeamTemplatesItemDefinitionsItemTeamDefinitionOwnersUserItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() diff --git a/teamwork/team_templates_item_definitions_item_team_definition_primary_channel_members_conversation_member_item_request_builder.go b/teamwork/team_templates_item_definitions_item_team_definition_primary_channel_members_conversation_member_item_request_builder.go index 578bd343256..8afc8360b92 100644 --- a/teamwork/team_templates_item_definitions_item_team_definition_primary_channel_members_conversation_member_item_request_builder.go +++ b/teamwork/team_templates_item_definitions_item_team_definition_primary_channel_members_conversation_member_item_request_builder.go @@ -95,10 +95,10 @@ func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelMembersConv } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable), nil } -// Patch update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. +// Patch update the role of a conversationMember in a team.or channel. // [Find more info here] // -// [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 func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelMembersConversationMemberItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable, requestConfiguration *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelMembersConversationMemberItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable, error) { requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -145,7 +145,7 @@ func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelMembersConv } return requestInfo, nil } -// ToPatchRequestInformation update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. +// ToPatchRequestInformation update the role of a conversationMember in a team.or channel. func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelMembersConversationMemberItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable, requestConfiguration *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelMembersConversationMemberItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/teamwork/team_templates_item_definitions_item_team_definition_primary_channel_messages_request_builder.go b/teamwork/team_templates_item_definitions_item_team_definition_primary_channel_messages_request_builder.go index 5ac7265f45c..cdf06eed6e7 100644 --- a/teamwork/team_templates_item_definitions_item_team_definition_primary_channel_messages_request_builder.go +++ b/teamwork/team_templates_item_definitions_item_team_definition_primary_channel_messages_request_builder.go @@ -100,10 +100,10 @@ func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelMessagesReq } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageCollectionResponseable), nil } -// Post send a new chatMessage in the specified channel. +// Post send a new chatMessage in the specified channel or a chat. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/channel-post-messages?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/chatmessage-post?view=graph-rest-1.0 func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelMessagesRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, requestConfiguration *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelMessagesRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -138,7 +138,7 @@ func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelMessagesReq } return requestInfo, nil } -// ToPostRequestInformation send a new chatMessage in the specified channel. +// ToPostRequestInformation send a new chatMessage in the specified channel or a chat. func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelMessagesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, requestConfiguration *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelMessagesRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/teamwork/team_templates_request_builder.go b/teamwork/team_templates_request_builder.go index c4af8383021..039e4ebc2e4 100644 --- a/teamwork/team_templates_request_builder.go +++ b/teamwork/team_templates_request_builder.go @@ -11,7 +11,7 @@ import ( type TeamTemplatesRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// TeamTemplatesRequestBuilderGetQueryParameters list the teamTemplateDefinition objects associated with a teamTemplate. +// TeamTemplatesRequestBuilderGetQueryParameters get the list of teamTemplate objects that are available for a tenant. type TeamTemplatesRequestBuilderGetQueryParameters struct { // Include count of items Count *bool `uriparametername:"%24count"` @@ -74,10 +74,10 @@ func NewTeamTemplatesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee func (m *TeamTemplatesRequestBuilder) Count()(*TeamTemplatesCountRequestBuilder) { return NewTeamTemplatesCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Get list the teamTemplateDefinition objects associated with a teamTemplate. +// Get get the list of teamTemplate objects that are available for a tenant. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/teamtemplate-list-definitions?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/teamwork-list-teamtemplates?view=graph-rest-1.0 func (m *TeamTemplatesRequestBuilder) Get(ctx context.Context, requestConfiguration *TeamTemplatesRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.TeamTemplateCollectionResponseable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -115,7 +115,7 @@ func (m *TeamTemplatesRequestBuilder) Post(ctx context.Context, body ie233ee762e } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.TeamTemplateable), nil } -// ToGetRequestInformation list the teamTemplateDefinition objects associated with a teamTemplate. +// ToGetRequestInformation get the list of teamTemplate objects that are available for a tenant. func (m *TeamTemplatesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *TeamTemplatesRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/users/item_calendar_calendar_view_item_attachments_request_builder.go b/users/item_calendar_calendar_view_item_attachments_request_builder.go index 4a962fb31e9..d1b578b3cae 100644 --- a/users/item_calendar_calendar_view_item_attachments_request_builder.go +++ b/users/item_calendar_calendar_view_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarCalendarViewItemAttachmentsRequestBuilder) Get(ctx context. } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarCalendarViewItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarCalendarViewItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -136,7 +136,7 @@ func (m *ItemCalendarCalendarViewItemAttachmentsRequestBuilder) ToGetRequestInfo } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. func (m *ItemCalendarCalendarViewItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarCalendarViewItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/users/item_calendar_calendar_view_item_exception_occurrences_item_attachments_request_builder.go b/users/item_calendar_calendar_view_item_exception_occurrences_item_attachments_request_builder.go index 67444e68fb0..bec00c1b6ed 100644 --- a/users/item_calendar_calendar_view_item_exception_occurrences_item_attachments_request_builder.go +++ b/users/item_calendar_calendar_view_item_exception_occurrences_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarCalendarViewItemExceptionOccurrencesItemAttachmentsRequestB } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarCalendarViewItemExceptionOccurrencesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarCalendarViewItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -136,7 +136,7 @@ func (m *ItemCalendarCalendarViewItemExceptionOccurrencesItemAttachmentsRequestB } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. func (m *ItemCalendarCalendarViewItemExceptionOccurrencesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarCalendarViewItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/users/item_calendar_calendar_view_item_exception_occurrences_item_instances_item_attachments_request_builder.go b/users/item_calendar_calendar_view_item_exception_occurrences_item_instances_item_attachments_request_builder.go index ada4412d643..ce94e918a41 100644 --- a/users/item_calendar_calendar_view_item_exception_occurrences_item_instances_item_attachments_request_builder.go +++ b/users/item_calendar_calendar_view_item_exception_occurrences_item_instances_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarCalendarViewItemExceptionOccurrencesItemInstancesItemAttach } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarCalendarViewItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarCalendarViewItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -136,7 +136,7 @@ func (m *ItemCalendarCalendarViewItemExceptionOccurrencesItemInstancesItemAttach } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. func (m *ItemCalendarCalendarViewItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarCalendarViewItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/users/item_calendar_calendar_view_item_instances_item_attachments_request_builder.go b/users/item_calendar_calendar_view_item_instances_item_attachments_request_builder.go index 4579cd949b3..8c30ba5261f 100644 --- a/users/item_calendar_calendar_view_item_instances_item_attachments_request_builder.go +++ b/users/item_calendar_calendar_view_item_instances_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarCalendarViewItemInstancesItemAttachmentsRequestBuilder) Get } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarCalendarViewItemInstancesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarCalendarViewItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -136,7 +136,7 @@ func (m *ItemCalendarCalendarViewItemInstancesItemAttachmentsRequestBuilder) ToG } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. func (m *ItemCalendarCalendarViewItemInstancesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarCalendarViewItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/users/item_calendar_calendar_view_item_instances_item_exception_occurrences_item_attachments_request_builder.go b/users/item_calendar_calendar_view_item_instances_item_exception_occurrences_item_attachments_request_builder.go index 6b7bf6a7846..16bb4170a82 100644 --- a/users/item_calendar_calendar_view_item_instances_item_exception_occurrences_item_attachments_request_builder.go +++ b/users/item_calendar_calendar_view_item_instances_item_exception_occurrences_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarCalendarViewItemInstancesItemExceptionOccurrencesItemAttach } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarCalendarViewItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarCalendarViewItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -136,7 +136,7 @@ func (m *ItemCalendarCalendarViewItemInstancesItemExceptionOccurrencesItemAttach } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. func (m *ItemCalendarCalendarViewItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarCalendarViewItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/users/item_calendar_events_item_attachments_request_builder.go b/users/item_calendar_events_item_attachments_request_builder.go index 79c97b1873f..5b898b9ea2d 100644 --- a/users/item_calendar_events_item_attachments_request_builder.go +++ b/users/item_calendar_events_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarEventsItemAttachmentsRequestBuilder) Get(ctx context.Contex } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarEventsItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarEventsItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -136,7 +136,7 @@ func (m *ItemCalendarEventsItemAttachmentsRequestBuilder) ToGetRequestInformatio } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. func (m *ItemCalendarEventsItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarEventsItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/users/item_calendar_events_item_exception_occurrences_item_attachments_request_builder.go b/users/item_calendar_events_item_exception_occurrences_item_attachments_request_builder.go index 0e7eba554a7..265d7add8bb 100644 --- a/users/item_calendar_events_item_exception_occurrences_item_attachments_request_builder.go +++ b/users/item_calendar_events_item_exception_occurrences_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarEventsItemExceptionOccurrencesItemAttachmentsRequestBuilder } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarEventsItemExceptionOccurrencesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarEventsItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -136,7 +136,7 @@ func (m *ItemCalendarEventsItemExceptionOccurrencesItemAttachmentsRequestBuilder } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. func (m *ItemCalendarEventsItemExceptionOccurrencesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarEventsItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/users/item_calendar_events_item_exception_occurrences_item_instances_item_attachments_request_builder.go b/users/item_calendar_events_item_exception_occurrences_item_instances_item_attachments_request_builder.go index 63d13b45aa4..ec0aba323a3 100644 --- a/users/item_calendar_events_item_exception_occurrences_item_instances_item_attachments_request_builder.go +++ b/users/item_calendar_events_item_exception_occurrences_item_instances_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarEventsItemExceptionOccurrencesItemInstancesItemAttachmentsR } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarEventsItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarEventsItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -136,7 +136,7 @@ func (m *ItemCalendarEventsItemExceptionOccurrencesItemInstancesItemAttachmentsR } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. func (m *ItemCalendarEventsItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarEventsItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/users/item_calendar_events_item_instances_item_attachments_request_builder.go b/users/item_calendar_events_item_instances_item_attachments_request_builder.go index 78f6a46ba73..fbbe850cb4c 100644 --- a/users/item_calendar_events_item_instances_item_attachments_request_builder.go +++ b/users/item_calendar_events_item_instances_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarEventsItemInstancesItemAttachmentsRequestBuilder) Get(ctx c } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarEventsItemInstancesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarEventsItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -136,7 +136,7 @@ func (m *ItemCalendarEventsItemInstancesItemAttachmentsRequestBuilder) ToGetRequ } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. func (m *ItemCalendarEventsItemInstancesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarEventsItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/users/item_calendar_events_item_instances_item_exception_occurrences_item_attachments_request_builder.go b/users/item_calendar_events_item_instances_item_exception_occurrences_item_attachments_request_builder.go index f06bab41875..a242e296888 100644 --- a/users/item_calendar_events_item_instances_item_exception_occurrences_item_attachments_request_builder.go +++ b/users/item_calendar_events_item_instances_item_exception_occurrences_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarEventsItemInstancesItemExceptionOccurrencesItemAttachmentsR } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarEventsItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarEventsItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -136,7 +136,7 @@ func (m *ItemCalendarEventsItemInstancesItemExceptionOccurrencesItemAttachmentsR } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. func (m *ItemCalendarEventsItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarEventsItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/users/item_calendar_groups_item_calendars_item_calendar_view_item_attachments_request_builder.go b/users/item_calendar_groups_item_calendars_item_calendar_view_item_attachments_request_builder.go index 4e115428d39..e0cec524bfe 100644 --- a/users/item_calendar_groups_item_calendars_item_calendar_view_item_attachments_request_builder.go +++ b/users/item_calendar_groups_item_calendars_item_calendar_view_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarGroupsItemCalendarsItemCalendarViewItemAttachmentsRequestBu } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarGroupsItemCalendarsItemCalendarViewItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarGroupsItemCalendarsItemCalendarViewItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -136,7 +136,7 @@ func (m *ItemCalendarGroupsItemCalendarsItemCalendarViewItemAttachmentsRequestBu } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. func (m *ItemCalendarGroupsItemCalendarsItemCalendarViewItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarGroupsItemCalendarsItemCalendarViewItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/users/item_calendar_groups_item_calendars_item_calendar_view_item_exception_occurrences_item_attachments_request_builder.go b/users/item_calendar_groups_item_calendars_item_calendar_view_item_exception_occurrences_item_attachments_request_builder.go index 16e50c17f0e..79806c22425 100644 --- a/users/item_calendar_groups_item_calendars_item_calendar_view_item_exception_occurrences_item_attachments_request_builder.go +++ b/users/item_calendar_groups_item_calendars_item_calendar_view_item_exception_occurrences_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarGroupsItemCalendarsItemCalendarViewItemExceptionOccurrences } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarGroupsItemCalendarsItemCalendarViewItemExceptionOccurrencesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarGroupsItemCalendarsItemCalendarViewItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -136,7 +136,7 @@ func (m *ItemCalendarGroupsItemCalendarsItemCalendarViewItemExceptionOccurrences } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. func (m *ItemCalendarGroupsItemCalendarsItemCalendarViewItemExceptionOccurrencesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarGroupsItemCalendarsItemCalendarViewItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/users/item_calendar_groups_item_calendars_item_calendar_view_item_exception_occurrences_item_instances_item_attachments_request_builder.go b/users/item_calendar_groups_item_calendars_item_calendar_view_item_exception_occurrences_item_instances_item_attachments_request_builder.go index 960eadcd1e6..21890e7bdf5 100644 --- a/users/item_calendar_groups_item_calendars_item_calendar_view_item_exception_occurrences_item_instances_item_attachments_request_builder.go +++ b/users/item_calendar_groups_item_calendars_item_calendar_view_item_exception_occurrences_item_instances_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarGroupsItemCalendarsItemCalendarViewItemExceptionOccurrences } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarGroupsItemCalendarsItemCalendarViewItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarGroupsItemCalendarsItemCalendarViewItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -136,7 +136,7 @@ func (m *ItemCalendarGroupsItemCalendarsItemCalendarViewItemExceptionOccurrences } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. func (m *ItemCalendarGroupsItemCalendarsItemCalendarViewItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarGroupsItemCalendarsItemCalendarViewItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/users/item_calendar_groups_item_calendars_item_calendar_view_item_instances_item_attachments_request_builder.go b/users/item_calendar_groups_item_calendars_item_calendar_view_item_instances_item_attachments_request_builder.go index ee4f6f27b9a..3a9dca27d99 100644 --- a/users/item_calendar_groups_item_calendars_item_calendar_view_item_instances_item_attachments_request_builder.go +++ b/users/item_calendar_groups_item_calendars_item_calendar_view_item_instances_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarGroupsItemCalendarsItemCalendarViewItemInstancesItemAttachm } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarGroupsItemCalendarsItemCalendarViewItemInstancesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarGroupsItemCalendarsItemCalendarViewItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -136,7 +136,7 @@ func (m *ItemCalendarGroupsItemCalendarsItemCalendarViewItemInstancesItemAttachm } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. func (m *ItemCalendarGroupsItemCalendarsItemCalendarViewItemInstancesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarGroupsItemCalendarsItemCalendarViewItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/users/item_calendar_groups_item_calendars_item_calendar_view_item_instances_item_exception_occurrences_item_attachments_request_builder.go b/users/item_calendar_groups_item_calendars_item_calendar_view_item_instances_item_exception_occurrences_item_attachments_request_builder.go index a042fca137f..35a6fd9f078 100644 --- a/users/item_calendar_groups_item_calendars_item_calendar_view_item_instances_item_exception_occurrences_item_attachments_request_builder.go +++ b/users/item_calendar_groups_item_calendars_item_calendar_view_item_instances_item_exception_occurrences_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarGroupsItemCalendarsItemCalendarViewItemInstancesItemExcepti } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarGroupsItemCalendarsItemCalendarViewItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarGroupsItemCalendarsItemCalendarViewItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -136,7 +136,7 @@ func (m *ItemCalendarGroupsItemCalendarsItemCalendarViewItemInstancesItemExcepti } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. func (m *ItemCalendarGroupsItemCalendarsItemCalendarViewItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarGroupsItemCalendarsItemCalendarViewItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/users/item_calendar_groups_item_calendars_item_events_item_attachments_request_builder.go b/users/item_calendar_groups_item_calendars_item_events_item_attachments_request_builder.go index 46d27b910ad..036e4e2046c 100644 --- a/users/item_calendar_groups_item_calendars_item_events_item_attachments_request_builder.go +++ b/users/item_calendar_groups_item_calendars_item_events_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarGroupsItemCalendarsItemEventsItemAttachmentsRequestBuilder) } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarGroupsItemCalendarsItemEventsItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarGroupsItemCalendarsItemEventsItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -136,7 +136,7 @@ func (m *ItemCalendarGroupsItemCalendarsItemEventsItemAttachmentsRequestBuilder) } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. func (m *ItemCalendarGroupsItemCalendarsItemEventsItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarGroupsItemCalendarsItemEventsItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/users/item_calendar_groups_item_calendars_item_events_item_exception_occurrences_item_attachments_request_builder.go b/users/item_calendar_groups_item_calendars_item_events_item_exception_occurrences_item_attachments_request_builder.go index cb38d95e453..2e44f9ea8a1 100644 --- a/users/item_calendar_groups_item_calendars_item_events_item_exception_occurrences_item_attachments_request_builder.go +++ b/users/item_calendar_groups_item_calendars_item_events_item_exception_occurrences_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarGroupsItemCalendarsItemEventsItemExceptionOccurrencesItemAt } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarGroupsItemCalendarsItemEventsItemExceptionOccurrencesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarGroupsItemCalendarsItemEventsItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -136,7 +136,7 @@ func (m *ItemCalendarGroupsItemCalendarsItemEventsItemExceptionOccurrencesItemAt } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. func (m *ItemCalendarGroupsItemCalendarsItemEventsItemExceptionOccurrencesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarGroupsItemCalendarsItemEventsItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/users/item_calendar_groups_item_calendars_item_events_item_exception_occurrences_item_instances_item_attachments_request_builder.go b/users/item_calendar_groups_item_calendars_item_events_item_exception_occurrences_item_instances_item_attachments_request_builder.go index 710bdbb6634..36ddf302539 100644 --- a/users/item_calendar_groups_item_calendars_item_events_item_exception_occurrences_item_instances_item_attachments_request_builder.go +++ b/users/item_calendar_groups_item_calendars_item_events_item_exception_occurrences_item_instances_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarGroupsItemCalendarsItemEventsItemExceptionOccurrencesItemIn } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarGroupsItemCalendarsItemEventsItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarGroupsItemCalendarsItemEventsItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -136,7 +136,7 @@ func (m *ItemCalendarGroupsItemCalendarsItemEventsItemExceptionOccurrencesItemIn } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. func (m *ItemCalendarGroupsItemCalendarsItemEventsItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarGroupsItemCalendarsItemEventsItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/users/item_calendar_groups_item_calendars_item_events_item_instances_item_attachments_request_builder.go b/users/item_calendar_groups_item_calendars_item_events_item_instances_item_attachments_request_builder.go index df9095655cb..84aa8fd655c 100644 --- a/users/item_calendar_groups_item_calendars_item_events_item_instances_item_attachments_request_builder.go +++ b/users/item_calendar_groups_item_calendars_item_events_item_instances_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarGroupsItemCalendarsItemEventsItemInstancesItemAttachmentsRe } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarGroupsItemCalendarsItemEventsItemInstancesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarGroupsItemCalendarsItemEventsItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -136,7 +136,7 @@ func (m *ItemCalendarGroupsItemCalendarsItemEventsItemInstancesItemAttachmentsRe } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. func (m *ItemCalendarGroupsItemCalendarsItemEventsItemInstancesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarGroupsItemCalendarsItemEventsItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/users/item_calendar_groups_item_calendars_item_events_item_instances_item_exception_occurrences_item_attachments_request_builder.go b/users/item_calendar_groups_item_calendars_item_events_item_instances_item_exception_occurrences_item_attachments_request_builder.go index a0afb08043e..477edce0f14 100644 --- a/users/item_calendar_groups_item_calendars_item_events_item_instances_item_exception_occurrences_item_attachments_request_builder.go +++ b/users/item_calendar_groups_item_calendars_item_events_item_instances_item_exception_occurrences_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarGroupsItemCalendarsItemEventsItemInstancesItemExceptionOccu } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarGroupsItemCalendarsItemEventsItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarGroupsItemCalendarsItemEventsItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -136,7 +136,7 @@ func (m *ItemCalendarGroupsItemCalendarsItemEventsItemInstancesItemExceptionOccu } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. func (m *ItemCalendarGroupsItemCalendarsItemEventsItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarGroupsItemCalendarsItemEventsItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/users/item_calendar_view_item_attachments_request_builder.go b/users/item_calendar_view_item_attachments_request_builder.go index dda1afaaec5..19fa5a760c0 100644 --- a/users/item_calendar_view_item_attachments_request_builder.go +++ b/users/item_calendar_view_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarViewItemAttachmentsRequestBuilder) Get(ctx context.Context, } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarViewItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarViewItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -136,7 +136,7 @@ func (m *ItemCalendarViewItemAttachmentsRequestBuilder) ToGetRequestInformation( } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. func (m *ItemCalendarViewItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarViewItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/users/item_calendar_view_item_exception_occurrences_item_attachments_request_builder.go b/users/item_calendar_view_item_exception_occurrences_item_attachments_request_builder.go index 2355d6bdd6b..67d3e29db55 100644 --- a/users/item_calendar_view_item_exception_occurrences_item_attachments_request_builder.go +++ b/users/item_calendar_view_item_exception_occurrences_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarViewItemExceptionOccurrencesItemAttachmentsRequestBuilder) } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarViewItemExceptionOccurrencesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarViewItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -136,7 +136,7 @@ func (m *ItemCalendarViewItemExceptionOccurrencesItemAttachmentsRequestBuilder) } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. func (m *ItemCalendarViewItemExceptionOccurrencesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarViewItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/users/item_calendar_view_item_exception_occurrences_item_instances_item_attachments_request_builder.go b/users/item_calendar_view_item_exception_occurrences_item_instances_item_attachments_request_builder.go index 8dcfe38f6f9..8f2c6459723 100644 --- a/users/item_calendar_view_item_exception_occurrences_item_instances_item_attachments_request_builder.go +++ b/users/item_calendar_view_item_exception_occurrences_item_instances_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarViewItemExceptionOccurrencesItemInstancesItemAttachmentsReq } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarViewItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarViewItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -136,7 +136,7 @@ func (m *ItemCalendarViewItemExceptionOccurrencesItemInstancesItemAttachmentsReq } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. func (m *ItemCalendarViewItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarViewItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/users/item_calendar_view_item_instances_item_attachments_request_builder.go b/users/item_calendar_view_item_instances_item_attachments_request_builder.go index 4dcacbd6874..744babfd58c 100644 --- a/users/item_calendar_view_item_instances_item_attachments_request_builder.go +++ b/users/item_calendar_view_item_instances_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarViewItemInstancesItemAttachmentsRequestBuilder) Get(ctx con } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarViewItemInstancesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarViewItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -136,7 +136,7 @@ func (m *ItemCalendarViewItemInstancesItemAttachmentsRequestBuilder) ToGetReques } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. func (m *ItemCalendarViewItemInstancesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarViewItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/users/item_calendar_view_item_instances_item_exception_occurrences_item_attachments_request_builder.go b/users/item_calendar_view_item_instances_item_exception_occurrences_item_attachments_request_builder.go index 7eef1d24e79..5637d05a1af 100644 --- a/users/item_calendar_view_item_instances_item_exception_occurrences_item_attachments_request_builder.go +++ b/users/item_calendar_view_item_instances_item_exception_occurrences_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarViewItemInstancesItemExceptionOccurrencesItemAttachmentsReq } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarViewItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarViewItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -136,7 +136,7 @@ func (m *ItemCalendarViewItemInstancesItemExceptionOccurrencesItemAttachmentsReq } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. func (m *ItemCalendarViewItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarViewItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/users/item_calendars_item_calendar_view_item_attachments_request_builder.go b/users/item_calendars_item_calendar_view_item_attachments_request_builder.go index 60fd2d22991..f1d94f24593 100644 --- a/users/item_calendars_item_calendar_view_item_attachments_request_builder.go +++ b/users/item_calendars_item_calendar_view_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarsItemCalendarViewItemAttachmentsRequestBuilder) Get(ctx con } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarsItemCalendarViewItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarsItemCalendarViewItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -136,7 +136,7 @@ func (m *ItemCalendarsItemCalendarViewItemAttachmentsRequestBuilder) ToGetReques } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. func (m *ItemCalendarsItemCalendarViewItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarsItemCalendarViewItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/users/item_calendars_item_calendar_view_item_exception_occurrences_item_attachments_request_builder.go b/users/item_calendars_item_calendar_view_item_exception_occurrences_item_attachments_request_builder.go index 333274657c5..9f1066c2dec 100644 --- a/users/item_calendars_item_calendar_view_item_exception_occurrences_item_attachments_request_builder.go +++ b/users/item_calendars_item_calendar_view_item_exception_occurrences_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarsItemCalendarViewItemExceptionOccurrencesItemAttachmentsReq } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarsItemCalendarViewItemExceptionOccurrencesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarsItemCalendarViewItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -136,7 +136,7 @@ func (m *ItemCalendarsItemCalendarViewItemExceptionOccurrencesItemAttachmentsReq } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. func (m *ItemCalendarsItemCalendarViewItemExceptionOccurrencesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarsItemCalendarViewItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/users/item_calendars_item_calendar_view_item_exception_occurrences_item_instances_item_attachments_request_builder.go b/users/item_calendars_item_calendar_view_item_exception_occurrences_item_instances_item_attachments_request_builder.go index 2fc4546fde4..8f8c5239dfe 100644 --- a/users/item_calendars_item_calendar_view_item_exception_occurrences_item_instances_item_attachments_request_builder.go +++ b/users/item_calendars_item_calendar_view_item_exception_occurrences_item_instances_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarsItemCalendarViewItemExceptionOccurrencesItemInstancesItemA } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarsItemCalendarViewItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarsItemCalendarViewItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -136,7 +136,7 @@ func (m *ItemCalendarsItemCalendarViewItemExceptionOccurrencesItemInstancesItemA } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. func (m *ItemCalendarsItemCalendarViewItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarsItemCalendarViewItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/users/item_calendars_item_calendar_view_item_instances_item_attachments_request_builder.go b/users/item_calendars_item_calendar_view_item_instances_item_attachments_request_builder.go index a52cc5a64cd..413ef374486 100644 --- a/users/item_calendars_item_calendar_view_item_instances_item_attachments_request_builder.go +++ b/users/item_calendars_item_calendar_view_item_instances_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarsItemCalendarViewItemInstancesItemAttachmentsRequestBuilder } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarsItemCalendarViewItemInstancesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarsItemCalendarViewItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -136,7 +136,7 @@ func (m *ItemCalendarsItemCalendarViewItemInstancesItemAttachmentsRequestBuilder } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. func (m *ItemCalendarsItemCalendarViewItemInstancesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarsItemCalendarViewItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/users/item_calendars_item_calendar_view_item_instances_item_exception_occurrences_item_attachments_request_builder.go b/users/item_calendars_item_calendar_view_item_instances_item_exception_occurrences_item_attachments_request_builder.go index cadf154a149..117013bf865 100644 --- a/users/item_calendars_item_calendar_view_item_instances_item_exception_occurrences_item_attachments_request_builder.go +++ b/users/item_calendars_item_calendar_view_item_instances_item_exception_occurrences_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarsItemCalendarViewItemInstancesItemExceptionOccurrencesItemA } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarsItemCalendarViewItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarsItemCalendarViewItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -136,7 +136,7 @@ func (m *ItemCalendarsItemCalendarViewItemInstancesItemExceptionOccurrencesItemA } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. func (m *ItemCalendarsItemCalendarViewItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarsItemCalendarViewItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/users/item_calendars_item_events_item_attachments_request_builder.go b/users/item_calendars_item_events_item_attachments_request_builder.go index c28a3601640..8af79d86853 100644 --- a/users/item_calendars_item_events_item_attachments_request_builder.go +++ b/users/item_calendars_item_events_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarsItemEventsItemAttachmentsRequestBuilder) Get(ctx context.C } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarsItemEventsItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarsItemEventsItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -136,7 +136,7 @@ func (m *ItemCalendarsItemEventsItemAttachmentsRequestBuilder) ToGetRequestInfor } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. func (m *ItemCalendarsItemEventsItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarsItemEventsItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/users/item_calendars_item_events_item_exception_occurrences_item_attachments_request_builder.go b/users/item_calendars_item_events_item_exception_occurrences_item_attachments_request_builder.go index 266f0a25187..dbf461690cc 100644 --- a/users/item_calendars_item_events_item_exception_occurrences_item_attachments_request_builder.go +++ b/users/item_calendars_item_events_item_exception_occurrences_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarsItemEventsItemExceptionOccurrencesItemAttachmentsRequestBu } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarsItemEventsItemExceptionOccurrencesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarsItemEventsItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -136,7 +136,7 @@ func (m *ItemCalendarsItemEventsItemExceptionOccurrencesItemAttachmentsRequestBu } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. func (m *ItemCalendarsItemEventsItemExceptionOccurrencesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarsItemEventsItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/users/item_calendars_item_events_item_exception_occurrences_item_instances_item_attachments_request_builder.go b/users/item_calendars_item_events_item_exception_occurrences_item_instances_item_attachments_request_builder.go index 1dc2b8bc16d..30b08e3939c 100644 --- a/users/item_calendars_item_events_item_exception_occurrences_item_instances_item_attachments_request_builder.go +++ b/users/item_calendars_item_events_item_exception_occurrences_item_instances_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarsItemEventsItemExceptionOccurrencesItemInstancesItemAttachm } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarsItemEventsItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarsItemEventsItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -136,7 +136,7 @@ func (m *ItemCalendarsItemEventsItemExceptionOccurrencesItemInstancesItemAttachm } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. func (m *ItemCalendarsItemEventsItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarsItemEventsItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/users/item_calendars_item_events_item_instances_item_attachments_request_builder.go b/users/item_calendars_item_events_item_instances_item_attachments_request_builder.go index 11514540f8b..98984b7a13d 100644 --- a/users/item_calendars_item_events_item_instances_item_attachments_request_builder.go +++ b/users/item_calendars_item_events_item_instances_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarsItemEventsItemInstancesItemAttachmentsRequestBuilder) Get( } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarsItemEventsItemInstancesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarsItemEventsItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -136,7 +136,7 @@ func (m *ItemCalendarsItemEventsItemInstancesItemAttachmentsRequestBuilder) ToGe } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. func (m *ItemCalendarsItemEventsItemInstancesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarsItemEventsItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/users/item_calendars_item_events_item_instances_item_exception_occurrences_item_attachments_request_builder.go b/users/item_calendars_item_events_item_instances_item_exception_occurrences_item_attachments_request_builder.go index f594512b2e8..0e3f24afd7e 100644 --- a/users/item_calendars_item_events_item_instances_item_exception_occurrences_item_attachments_request_builder.go +++ b/users/item_calendars_item_events_item_instances_item_exception_occurrences_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarsItemEventsItemInstancesItemExceptionOccurrencesItemAttachm } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarsItemEventsItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarsItemEventsItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -136,7 +136,7 @@ func (m *ItemCalendarsItemEventsItemInstancesItemExceptionOccurrencesItemAttachm } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. func (m *ItemCalendarsItemEventsItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarsItemEventsItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/users/item_chats_item_messages_request_builder.go b/users/item_chats_item_messages_request_builder.go index fe09f4851b5..a4eecbfddb7 100644 --- a/users/item_chats_item_messages_request_builder.go +++ b/users/item_chats_item_messages_request_builder.go @@ -100,10 +100,10 @@ func (m *ItemChatsItemMessagesRequestBuilder) Get(ctx context.Context, requestCo } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageCollectionResponseable), nil } -// Post send a new chatMessage in the specified channel or a chat. +// Post send a new chatMessage 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 creating a chat message. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/chatmessage-post?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/chat-post-messages?view=graph-rest-1.0 func (m *ItemChatsItemMessagesRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, requestConfiguration *ItemChatsItemMessagesRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -138,7 +138,7 @@ func (m *ItemChatsItemMessagesRequestBuilder) ToGetRequestInformation(ctx contex } return requestInfo, nil } -// ToPostRequestInformation send a new chatMessage in the specified channel or a chat. +// ToPostRequestInformation send a new chatMessage 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 creating a chat message. func (m *ItemChatsItemMessagesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, requestConfiguration *ItemChatsItemMessagesRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/users/item_events_item_attachments_request_builder.go b/users/item_events_item_attachments_request_builder.go index 1ebee926b0a..38cf2937cb0 100644 --- a/users/item_events_item_attachments_request_builder.go +++ b/users/item_events_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemEventsItemAttachmentsRequestBuilder) Get(ctx context.Context, reque } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 func (m *ItemEventsItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemEventsItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -136,7 +136,7 @@ func (m *ItemEventsItemAttachmentsRequestBuilder) ToGetRequestInformation(ctx co } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. func (m *ItemEventsItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemEventsItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/users/item_events_item_exception_occurrences_item_attachments_request_builder.go b/users/item_events_item_exception_occurrences_item_attachments_request_builder.go index 6ff874be8eb..55971770e5c 100644 --- a/users/item_events_item_exception_occurrences_item_attachments_request_builder.go +++ b/users/item_events_item_exception_occurrences_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemEventsItemExceptionOccurrencesItemAttachmentsRequestBuilder) Get(ct } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 func (m *ItemEventsItemExceptionOccurrencesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemEventsItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -136,7 +136,7 @@ func (m *ItemEventsItemExceptionOccurrencesItemAttachmentsRequestBuilder) ToGetR } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. func (m *ItemEventsItemExceptionOccurrencesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemEventsItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/users/item_events_item_exception_occurrences_item_instances_item_attachments_request_builder.go b/users/item_events_item_exception_occurrences_item_instances_item_attachments_request_builder.go index 78ddb7325bb..f75122eca60 100644 --- a/users/item_events_item_exception_occurrences_item_instances_item_attachments_request_builder.go +++ b/users/item_events_item_exception_occurrences_item_instances_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemEventsItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBu } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 func (m *ItemEventsItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemEventsItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -136,7 +136,7 @@ func (m *ItemEventsItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBu } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. func (m *ItemEventsItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemEventsItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/users/item_events_item_instances_item_attachments_request_builder.go b/users/item_events_item_instances_item_attachments_request_builder.go index 62e02b22b1e..62444c0aa41 100644 --- a/users/item_events_item_instances_item_attachments_request_builder.go +++ b/users/item_events_item_instances_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemEventsItemInstancesItemAttachmentsRequestBuilder) Get(ctx context.C } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 func (m *ItemEventsItemInstancesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemEventsItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -136,7 +136,7 @@ func (m *ItemEventsItemInstancesItemAttachmentsRequestBuilder) ToGetRequestInfor } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. func (m *ItemEventsItemInstancesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemEventsItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/users/item_events_item_instances_item_exception_occurrences_item_attachments_request_builder.go b/users/item_events_item_instances_item_exception_occurrences_item_attachments_request_builder.go index 749f2c814fc..c7aedd6bd7a 100644 --- a/users/item_events_item_instances_item_exception_occurrences_item_attachments_request_builder.go +++ b/users/item_events_item_instances_item_exception_occurrences_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemEventsItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBu } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 func (m *ItemEventsItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemEventsItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -136,7 +136,7 @@ func (m *ItemEventsItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBu } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. func (m *ItemEventsItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemEventsItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/users/item_mail_folders_item_child_folders_item_messages_item_attachments_request_builder.go b/users/item_mail_folders_item_child_folders_item_messages_item_attachments_request_builder.go index d025a7e7443..b38e81fb8c9 100644 --- a/users/item_mail_folders_item_child_folders_item_messages_item_attachments_request_builder.go +++ b/users/item_mail_folders_item_child_folders_item_messages_item_attachments_request_builder.go @@ -94,10 +94,10 @@ func (m *ItemMailFoldersItemChildFoldersItemMessagesItemAttachmentsRequestBuilde } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to a message. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. You can add an attachment to an existing message by posting to its attachments collection, or to a newmessage that is being drafted, or created and sent on the fly. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/message-post-attachments?view=graph-rest-1.0 func (m *ItemMailFoldersItemChildFoldersItemMessagesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemMailFoldersItemChildFoldersItemMessagesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -132,7 +132,7 @@ func (m *ItemMailFoldersItemChildFoldersItemMessagesItemAttachmentsRequestBuilde } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to a message. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. You can add an attachment to an existing message by posting to its attachments collection, or to a newmessage that is being drafted, or created and sent on the fly. func (m *ItemMailFoldersItemChildFoldersItemMessagesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemMailFoldersItemChildFoldersItemMessagesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/users/item_mail_folders_item_messages_item_attachments_request_builder.go b/users/item_mail_folders_item_messages_item_attachments_request_builder.go index c4bb02c2649..c2746a75af5 100644 --- a/users/item_mail_folders_item_messages_item_attachments_request_builder.go +++ b/users/item_mail_folders_item_messages_item_attachments_request_builder.go @@ -94,10 +94,10 @@ func (m *ItemMailFoldersItemMessagesItemAttachmentsRequestBuilder) Get(ctx conte } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to a message. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. You can add an attachment to an existing message by posting to its attachments collection, or to a newmessage that is being drafted, or created and sent on the fly. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/message-post-attachments?view=graph-rest-1.0 func (m *ItemMailFoldersItemMessagesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemMailFoldersItemMessagesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -132,7 +132,7 @@ func (m *ItemMailFoldersItemMessagesItemAttachmentsRequestBuilder) ToGetRequestI } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to a message. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. You can add an attachment to an existing message by posting to its attachments collection, or to a newmessage that is being drafted, or created and sent on the fly. func (m *ItemMailFoldersItemMessagesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemMailFoldersItemMessagesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/users/item_messages_item_attachments_request_builder.go b/users/item_messages_item_attachments_request_builder.go index 0994ea09cfb..e8fe3120f35 100644 --- a/users/item_messages_item_attachments_request_builder.go +++ b/users/item_messages_item_attachments_request_builder.go @@ -94,10 +94,10 @@ func (m *ItemMessagesItemAttachmentsRequestBuilder) Get(ctx context.Context, req } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post 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. +// Post use this API to add an attachment to a message. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. You can add an attachment to an existing message by posting to its attachments collection, or to a newmessage that is being drafted, or created and sent on the fly. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/message-post-attachments?view=graph-rest-1.0 func (m *ItemMessagesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemMessagesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -132,7 +132,7 @@ func (m *ItemMessagesItemAttachmentsRequestBuilder) ToGetRequestInformation(ctx } return requestInfo, nil } -// ToPostRequestInformation 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. +// ToPostRequestInformation use this API to add an attachment to a message. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. You can add an attachment to an existing message by posting to its attachments collection, or to a newmessage that is being drafted, or created and sent on the fly. func (m *ItemMessagesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemMessagesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/users/item_messages_item_value_content_request_builder.go b/users/item_messages_item_value_content_request_builder.go index df7aeddbfa5..412ff9c335b 100644 --- a/users/item_messages_item_value_content_request_builder.go +++ b/users/item_messages_item_value_content_request_builder.go @@ -40,7 +40,7 @@ func NewItemMessagesItemValueContentRequestBuilder(rawUrl string, requestAdapter // Get get media content for the navigation property messages from users // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/opentypeextension-get?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/user-list-messages?view=graph-rest-1.0 func (m *ItemMessagesItemValueContentRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemMessagesItemValueContentRequestBuilderGetRequestConfiguration)([]byte, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { diff --git a/users/item_messages_message_item_request_builder.go b/users/item_messages_message_item_request_builder.go index a53694fcdea..492f0e7cddf 100644 --- a/users/item_messages_message_item_request_builder.go +++ b/users/item_messages_message_item_request_builder.go @@ -80,10 +80,10 @@ func (m *ItemMessagesMessageItemRequestBuilder) CreateReply()(*ItemMessagesItemC func (m *ItemMessagesMessageItemRequestBuilder) CreateReplyAll()(*ItemMessagesItemCreateReplyAllRequestBuilder) { return NewItemMessagesItemCreateReplyAllRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Delete delete eventMessage. +// Delete delete a message in the specified user's mailbox, or delete a relationship of the message. For example, you can delete a specific @-mention of the specified user in the message. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-delete?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/message-delete?view=graph-rest-1.0 func (m *ItemMessagesMessageItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *ItemMessagesMessageItemRequestBuilderDeleteRequestConfiguration)(error) { requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); if err != nil { @@ -110,7 +110,7 @@ func (m *ItemMessagesMessageItemRequestBuilder) Forward()(*ItemMessagesItemForwa // Get the messages in a mailbox or folder. Read-only. Nullable. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/opentypeextension-get?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/message-get?view=graph-rest-1.0 func (m *ItemMessagesMessageItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemMessagesMessageItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Messageable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -145,10 +145,10 @@ func (m *ItemMessagesMessageItemRequestBuilder) Mentions()(*ItemMessagesItemMent func (m *ItemMessagesMessageItemRequestBuilder) Move()(*ItemMessagesItemMoveRequestBuilder) { return NewItemMessagesItemMoveRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Patch update the properties of a message object. +// Patch update the properties of an eventMessage object. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/message-update?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-update?view=graph-rest-1.0 func (m *ItemMessagesMessageItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Messageable, requestConfiguration *ItemMessagesMessageItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Messageable, error) { requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -179,7 +179,7 @@ func (m *ItemMessagesMessageItemRequestBuilder) ReplyAll()(*ItemMessagesItemRepl func (m *ItemMessagesMessageItemRequestBuilder) Send()(*ItemMessagesItemSendRequestBuilder) { return NewItemMessagesItemSendRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// ToDeleteRequestInformation delete eventMessage. +// ToDeleteRequestInformation delete a message in the specified user's mailbox, or delete a relationship of the message. For example, you can delete a specific @-mention of the specified user in the message. func (m *ItemMessagesMessageItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *ItemMessagesMessageItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate @@ -207,7 +207,7 @@ func (m *ItemMessagesMessageItemRequestBuilder) ToGetRequestInformation(ctx cont } return requestInfo, nil } -// ToPatchRequestInformation update the properties of a message object. +// ToPatchRequestInformation update the properties of an eventMessage object. func (m *ItemMessagesMessageItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Messageable, requestConfiguration *ItemMessagesMessageItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/users/item_messages_request_builder.go b/users/item_messages_request_builder.go index 53e12671cb5..3e4d36cb5cc 100644 --- a/users/item_messages_request_builder.go +++ b/users/item_messages_request_builder.go @@ -83,7 +83,7 @@ func (m *ItemMessagesRequestBuilder) Delta()(*ItemMessagesDeltaRequestBuilder) { // Get the messages in a mailbox or folder. Read-only. Nullable. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/opentypeextension-get?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/user-list-messages?view=graph-rest-1.0 func (m *ItemMessagesRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemMessagesRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MessageCollectionResponseable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -102,10 +102,10 @@ func (m *ItemMessagesRequestBuilder) Get(ctx context.Context, requestConfigurati } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MessageCollectionResponseable), nil } -// Post create a draft of a new message in either JSON or MIME format. When using JSON format, you can:- Include an attachment.- Use a mention to call out another user in the new 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 action, or create a draft to forward, to reply or to reply-all to an existing message. +// Post 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. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/user-post-messages?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/opentypeextension-post-opentypeextension?view=graph-rest-1.0 func (m *ItemMessagesRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Messageable, requestConfiguration *ItemMessagesRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Messageable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -140,7 +140,7 @@ func (m *ItemMessagesRequestBuilder) ToGetRequestInformation(ctx context.Context } return requestInfo, nil } -// ToPostRequestInformation create a draft of a new message in either JSON or MIME format. When using JSON format, you can:- Include an attachment.- Use a mention to call out another user in the new 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 action, or create a draft to forward, to reply or to reply-all to an existing message. +// ToPostRequestInformation 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. func (m *ItemMessagesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Messageable, requestConfiguration *ItemMessagesRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/users/item_online_meetings_item_registration_request_builder.go b/users/item_online_meetings_item_registration_request_builder.go index d516bb63e03..4e9a335e1ce 100644 --- a/users/item_online_meetings_item_registration_request_builder.go +++ b/users/item_online_meetings_item_registration_request_builder.go @@ -58,10 +58,10 @@ func NewItemOnlineMeetingsItemRegistrationRequestBuilder(rawUrl string, requestA func (m *ItemOnlineMeetingsItemRegistrationRequestBuilder) CustomQuestions()(*ItemOnlineMeetingsItemRegistrationCustomQuestionsRequestBuilder) { return NewItemOnlineMeetingsItemRegistrationCustomQuestionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Delete disable and delete the meetingRegistration of an onlineMeeting on behalf of the organizer. +// Delete disable and delete the externalMeetingRegistration of an onlineMeeting. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/meetingregistration-delete?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/externalmeetingregistration-delete?view=graph-rest-1.0 func (m *ItemOnlineMeetingsItemRegistrationRequestBuilder) Delete(ctx context.Context, requestConfiguration *ItemOnlineMeetingsItemRegistrationRequestBuilderDeleteRequestConfiguration)(error) { requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); if err != nil { @@ -125,7 +125,7 @@ func (m *ItemOnlineMeetingsItemRegistrationRequestBuilder) Patch(ctx context.Con func (m *ItemOnlineMeetingsItemRegistrationRequestBuilder) Registrants()(*ItemOnlineMeetingsItemRegistrationRegistrantsRequestBuilder) { return NewItemOnlineMeetingsItemRegistrationRegistrantsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// ToDeleteRequestInformation disable and delete the meetingRegistration of an onlineMeeting on behalf of the organizer. +// ToDeleteRequestInformation disable and delete the externalMeetingRegistration of an onlineMeeting. func (m *ItemOnlineMeetingsItemRegistrationRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *ItemOnlineMeetingsItemRegistrationRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/users/item_outlook_master_categories_outlook_category_item_request_builder.go b/users/item_outlook_master_categories_outlook_category_item_request_builder.go index f8029e1ed4f..9ab5ae26e76 100644 --- a/users/item_outlook_master_categories_outlook_category_item_request_builder.go +++ b/users/item_outlook_master_categories_outlook_category_item_request_builder.go @@ -93,7 +93,7 @@ func (m *ItemOutlookMasterCategoriesOutlookCategoryItemRequestBuilder) Get(ctx c } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.OutlookCategoryable), nil } -// Patch update the writable property, color, of the specified outlookCategory object. You cannot modify the displayName propertyonce you have created the category. +// Patch update the writable property, color, of the specified outlookCategory object. You can't modify the displayName propertyonce you have created the category. // [Find more info here] // // [Find more info here]: https://learn.microsoft.com/graph/api/outlookcategory-update?view=graph-rest-1.0 @@ -143,7 +143,7 @@ func (m *ItemOutlookMasterCategoriesOutlookCategoryItemRequestBuilder) ToGetRequ } return requestInfo, nil } -// ToPatchRequestInformation update the writable property, color, of the specified outlookCategory object. You cannot modify the displayName propertyonce you have created the category. +// ToPatchRequestInformation update the writable property, color, of the specified outlookCategory object. You can't modify the displayName propertyonce you have created the category. func (m *ItemOutlookMasterCategoriesOutlookCategoryItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.OutlookCategoryable, requestConfiguration *ItemOutlookMasterCategoriesOutlookCategoryItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/users/item_presence_request_builder.go b/users/item_presence_request_builder.go index fb3f23e0aab..a8613341e7f 100644 --- a/users/item_presence_request_builder.go +++ b/users/item_presence_request_builder.go @@ -18,7 +18,7 @@ type ItemPresenceRequestBuilderDeleteRequestConfiguration struct { // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// ItemPresenceRequestBuilderGetQueryParameters get a user's presence information. +// ItemPresenceRequestBuilderGetQueryParameters set a presence status message for a user. An optional expiration date and time can be supplied. type ItemPresenceRequestBuilderGetQueryParameters struct { // Expand related entities Expand []string `uriparametername:"%24expand"` @@ -78,10 +78,10 @@ func (m *ItemPresenceRequestBuilder) Delete(ctx context.Context, requestConfigur } return nil } -// Get get a user's presence information. +// Get set a presence status message for a user. An optional expiration date and time can be supplied. // [Find more info here] // -// [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 func (m *ItemPresenceRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemPresenceRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Presenceable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -143,7 +143,7 @@ func (m *ItemPresenceRequestBuilder) ToDeleteRequestInformation(ctx context.Cont } return requestInfo, nil } -// ToGetRequestInformation get a user's presence information. +// ToGetRequestInformation set a presence status message for a user. An optional expiration date and time can be supplied. func (m *ItemPresenceRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemPresenceRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/users/item_registered_devices_directory_object_item_request_builder.go b/users/item_registered_devices_directory_object_item_request_builder.go index e995966d2c3..afc1ba3166b 100644 --- a/users/item_registered_devices_directory_object_item_request_builder.go +++ b/users/item_registered_devices_directory_object_item_request_builder.go @@ -11,7 +11,7 @@ import ( type ItemRegisteredDevicesDirectoryObjectItemRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ItemRegisteredDevicesDirectoryObjectItemRequestBuilderGetQueryParameters devices that are registered for the user. Read-only. Nullable. Supports $expand. +// ItemRegisteredDevicesDirectoryObjectItemRequestBuilderGetQueryParameters devices that are registered for the user. Read-only. Nullable. Supports $expand and returns up to 100 objects. type ItemRegisteredDevicesDirectoryObjectItemRequestBuilderGetQueryParameters struct { // Expand related entities Expand []string `uriparametername:"%24expand"` @@ -40,7 +40,7 @@ func NewItemRegisteredDevicesDirectoryObjectItemRequestBuilder(rawUrl string, re urlParams["request-raw-url"] = rawUrl return NewItemRegisteredDevicesDirectoryObjectItemRequestBuilderInternal(urlParams, requestAdapter) } -// Get devices that are registered for the user. Read-only. Nullable. Supports $expand. +// Get devices that are registered for the user. Read-only. Nullable. Supports $expand and returns up to 100 objects. func (m *ItemRegisteredDevicesDirectoryObjectItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemRegisteredDevicesDirectoryObjectItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DirectoryObjectable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -67,7 +67,7 @@ func (m *ItemRegisteredDevicesDirectoryObjectItemRequestBuilder) GraphDevice()(* func (m *ItemRegisteredDevicesDirectoryObjectItemRequestBuilder) GraphEndpoint()(*ItemRegisteredDevicesItemGraphEndpointRequestBuilder) { return NewItemRegisteredDevicesItemGraphEndpointRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// ToGetRequestInformation devices that are registered for the user. Read-only. Nullable. Supports $expand. +// ToGetRequestInformation devices that are registered for the user. Read-only. Nullable. Supports $expand and returns up to 100 objects. func (m *ItemRegisteredDevicesDirectoryObjectItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemRegisteredDevicesDirectoryObjectItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/users/item_registered_devices_request_builder.go b/users/item_registered_devices_request_builder.go index 96dd35eb705..a89593ae1bb 100644 --- a/users/item_registered_devices_request_builder.go +++ b/users/item_registered_devices_request_builder.go @@ -11,7 +11,7 @@ import ( type ItemRegisteredDevicesRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ItemRegisteredDevicesRequestBuilderGetQueryParameters devices that are registered for the user. Read-only. Nullable. Supports $expand. +// ItemRegisteredDevicesRequestBuilderGetQueryParameters devices that are registered for the user. Read-only. Nullable. Supports $expand and returns up to 100 objects. type ItemRegisteredDevicesRequestBuilderGetQueryParameters struct { // Include count of items Count *bool `uriparametername:"%24count"` @@ -67,7 +67,7 @@ func NewItemRegisteredDevicesRequestBuilder(rawUrl string, requestAdapter i2ae41 func (m *ItemRegisteredDevicesRequestBuilder) Count()(*ItemRegisteredDevicesCountRequestBuilder) { return NewItemRegisteredDevicesCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Get devices that are registered for the user. Read-only. Nullable. Supports $expand. +// Get devices that are registered for the user. Read-only. Nullable. Supports $expand and returns up to 100 objects. // [Find more info here] // // [Find more info here]: https://learn.microsoft.com/graph/api/user-list-registereddevices?view=graph-rest-1.0 @@ -97,7 +97,7 @@ func (m *ItemRegisteredDevicesRequestBuilder) GraphDevice()(*ItemRegisteredDevic func (m *ItemRegisteredDevicesRequestBuilder) GraphEndpoint()(*ItemRegisteredDevicesGraphEndpointRequestBuilder) { return NewItemRegisteredDevicesGraphEndpointRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// ToGetRequestInformation devices that are registered for the user. Read-only. Nullable. Supports $expand. +// ToGetRequestInformation devices that are registered for the user. Read-only. Nullable. Supports $expand and returns up to 100 objects. func (m *ItemRegisteredDevicesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemRegisteredDevicesRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate diff --git a/users/item_service_provisioning_errors_count_request_builder.go b/users/item_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..074185c3dd4 --- /dev/null +++ b/users/item_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,80 @@ +package users + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type ItemServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type ItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// ItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewItemServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewItemServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemServiceProvisioningErrorsCountRequestBuilder) { + m := &ItemServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/users/{user%2Did}/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewItemServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewItemServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *ItemServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *ItemServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "text/plain") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*ItemServiceProvisioningErrorsCountRequestBuilder) { + return NewItemServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/users/item_service_provisioning_errors_request_builder.go b/users/item_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..790b9c46891 --- /dev/null +++ b/users/item_service_provisioning_errors_request_builder.go @@ -0,0 +1,97 @@ +package users + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \users\{user-id}\serviceProvisioningErrors +type ItemServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +type ItemServiceProvisioningErrorsRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Order items by property values + Orderby []string `uriparametername:"%24orderby"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // Skip the first n items + Skip *int32 `uriparametername:"%24skip"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// ItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewItemServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemServiceProvisioningErrorsRequestBuilder) { + m := &ItemServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/users/{user%2Did}/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewItemServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewItemServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *ItemServiceProvisioningErrorsRequestBuilder) Count()(*ItemServiceProvisioningErrorsCountRequestBuilder) { + return NewItemServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). +func (m *ItemServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation() + requestInfo.UrlTemplate = m.BaseRequestBuilder.UrlTemplate + requestInfo.PathParameters = m.BaseRequestBuilder.PathParameters + requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET + requestInfo.Headers.Add("Accept", "application/json") + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*ItemServiceProvisioningErrorsRequestBuilder) { + return NewItemServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/users/user_item_request_builder.go b/users/user_item_request_builder.go index 80de28b17d4..8ed12e67e12 100644 --- a/users/user_item_request_builder.go +++ b/users/user_item_request_builder.go @@ -473,6 +473,10 @@ func (m *UserItemRequestBuilder) Security()(*ItemSecurityRequestBuilder) { func (m *UserItemRequestBuilder) SendMail()(*ItemSendMailRequestBuilder) { return NewItemSendMailRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *UserItemRequestBuilder) ServiceProvisioningErrors()(*ItemServiceProvisioningErrorsRequestBuilder) { + return NewItemServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // Settings provides operations to manage the settings property of the microsoft.graph.user entity. func (m *UserItemRequestBuilder) Settings()(*ItemSettingsRequestBuilder) { return NewItemSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter)