From bf6ac9c2a5c5a07e11ccaa6e470c73d67bfd47bd Mon Sep 17 00:00:00 2001 From: Microsoft Graph DevX Tooling Date: Tue, 21 Jul 2026 23:48:40 +0000 Subject: [PATCH] feat(generation): update request builders and models Update generated files with build 227538 --- ...ers_mailbox_folder_item_request_builder.go | 80 + ...ders_item_child_folders_request_builder.go | 44 + ...ers_mailbox_folder_item_request_builder.go | 86 + ..._mailboxes_item_folders_request_builder.go | 47 + ...pi_usage_report_metrics_request_builder.go | 6 +- ..._zero_touch_web_token_post_request_body.go | 116 ++ ...eate_zero_touch_web_token_post_response.go | 116 ++ ...te_zero_touch_web_token_request_builder.go | 96 ++ ...gs_create_zero_touch_web_token_response.go | 30 + ...unt_enterprise_settings_request_builder.go | 5 + ...es_item_get_sync_status_request_builder.go | 72 + ...em_remove_device_esim_post_request_body.go | 116 ++ ...item_remove_device_esim_request_builder.go | 71 + ...ces_managed_device_item_request_builder.go | 10 + ...es_item_get_sync_status_request_builder.go | 72 + ...em_remove_device_esim_post_request_body.go | 116 ++ ...item_remove_device_esim_request_builder.go | 71 + ...ces_managed_device_item_request_builder.go | 10 + ...int_organization_action_request_builder.go | 7 +- ...detail_with_action_type_request_builder.go | 7 +- ..._endpoint_service_plans_request_builder.go | 6 +- ...m_items_drive_item_item_request_builder.go | 10 + .../item_items_item_lock_post_request_body.go | 116 ++ .../item_items_item_lock_request_builder.go | 79 + ...items_item_release_lock_request_builder.go | 70 + ...anner_history_item_item_request_builder.go | 6 +- ...lans_item_history_items_request_builder.go | 6 +- ...anner_history_item_item_request_builder.go | 6 +- ...lans_item_history_items_request_builder.go | 6 +- ...anner_history_item_item_request_builder.go | 6 +- ...lans_item_history_items_request_builder.go | 6 +- kiota-dom-export.txt | 4 +- kiota-lock.json | 2 +- models/additional_storage_allocations.go | 190 +++ models/api_usage_report_enablement_status.go | 4 +- models/browse_query_response_item.go | 149 ++ models/cloud_p_c.go | 37 + models/cloud_pc_organization_action_detail.go | 4 +- models/cloud_pc_service_plan.go | 4 +- models/desk.go | 49 + models/device_sync_status_response.go | 184 +++ models/externalconnectors/external_item.go | 4 +- ...ernal_item_information_protection_label.go | 4 +- models/family_member_storage_quota.go | 227 +++ .../guest_sponsor_trigger.go | 81 + .../workflow_execution_trigger.go | 2 + models/place.go | 37 + models/place_service_plan_info.go | 153 ++ models/planner_history_item.go | 16 +- models/planner_plan.go | 4 +- models/planner_task_data.go | 96 +- models/planner_task_details_data.go | 28 +- models/room.go | 37 - models/security/case_management_root.go | 43 + models/security/casemanagement/activity.go | 64 + .../activity_collection_response.go | 92 ++ .../activity_resource_details.go | 190 +++ .../security/casemanagement/alert_counts.go | 264 +++ .../casemanagement/alert_status_counts.go | 227 +++ models/security/casemanagement/attachment.go | 304 ++++ .../attachment_collection_response.go | 92 ++ .../casemanagement/attachment_origin.go | 191 +++ .../casemanagement/attachment_origin_type.go | 42 + .../casemanagement/attachment_scan_result.go | 42 + .../security/casemanagement/audit_action.go | 57 + models/security/casemanagement/audit_log.go | 168 ++ .../casemanagement/boolean_value_property.go | 81 + .../case_collection_response.go | 92 ++ .../security/casemanagement/case_escaped.go | 373 +++++ .../casemanagement/case_management_entity.go | 234 +++ .../casemanagement/case_task_category.go | 51 + .../casemanagement/case_task_priority.go | 51 + models/security/casemanagement/comment.go | 81 + .../casemanagement/custom_field_values.go | 116 ++ .../security/casemanagement/exposure_case.go | 421 +++++ .../exposure_case_automation.go | 153 ++ .../casemanagement/exposure_case_git_hub.go | 301 ++++ .../exposure_case_seemplicity.go | 376 +++++ .../security/casemanagement/generic_case.go | 230 +++ .../casemanagement/impacted_assets_counts.go | 634 +++++++ .../security/casemanagement/incident_case.go | 1451 +++++++++++++++++ .../casemanagement/incident_classification.go | 45 + .../casemanagement/incident_determination.go | 78 + .../casemanagement/incident_relation.go | 44 + .../casemanagement/incident_severity.go | 48 + .../incident_severity_counts.go | 301 ++++ .../security/casemanagement/investigation.go | 233 +++ .../casemanagement/modified_property.go | 227 +++ .../casemanagement/recommendation_relation.go | 155 ++ models/security/casemanagement/relation.go | 103 ++ .../relation_collection_response.go | 92 ++ .../casemanagement/string_value_property.go | 81 + models/security/casemanagement/task.go | 344 ++++ .../task_collection_response.go | 92 ++ models/security/casemanagement/task_status.go | 54 + .../casemanagement/third_party_work_item.go | 378 +++++ .../third_party_work_item_metadata.go | 116 ++ .../third_party_work_item_provider.go | 36 + .../third_party_work_item_type.go | 36 + .../security/casemanagement/value_property.go | 136 ++ .../workspace_indicator_relation.go | 155 ++ models/sync_component.go | 248 +++ models/sync_component_status.go | 55 + models/task_history_item.go | 8 +- models/unified_storage_quota.go | 86 + models/vpp_token.go | 38 + models/workspace.go | 37 - ...anner_history_item_item_request_builder.go | 6 +- ...lans_item_history_items_request_builder.go | 6 +- ...th_period_with_version_request_builder.go} | 35 +- ...th_period_with_version_request_builder.go} | 35 +- ...th_period_with_version_request_builder.go} | 35 +- reports/reports_request_builder.go | 28 +- ...agement_cases_case_item_request_builder.go | 189 +++ ..._management_cases_count_request_builder.go | 83 + ...ctivities_activity_item_request_builder.go | 169 ++ ...s_item_activities_count_request_builder.go | 83 + ...t_cases_item_activities_request_builder.go | 161 ++ ...chments_attachment_item_request_builder.go | 171 ++ ..._item_attachments_count_request_builder.go | 83 + ...ttachments_item_content_request_builder.go | 145 ++ ..._cases_item_attachments_request_builder.go | 161 ++ ...es_item_relations_count_request_builder.go | 83 + ...relations_relation_item_request_builder.go | 163 ++ ...nt_cases_item_relations_request_builder.go | 161 ++ ..._cases_item_tasks_count_request_builder.go | 83 + ...gement_cases_item_tasks_request_builder.go | 161 ++ ...es_item_tasks_task_item_request_builder.go | 166 ++ .../case_management_cases_request_builder.go | 161 ++ security/case_management_request_builder.go | 165 ++ ...covery_hold_policy_item_request_builder.go | 10 + ...security_disable_policy_request_builder.go | 67 + ..._security_enable_policy_request_builder.go | 67 + security/security_request_builder.go | 5 + ...r_with_user_principal_name_get_response.go | 92 ++ ...ith_user_principal_name_request_builder.go | 125 ++ ..._user_with_user_principal_name_response.go | 30 + ...r_principal_name_with_role_get_response.go | 92 ++ ...rincipal_name_with_role_request_builder.go | 122 ++ ..._user_principal_name_with_role_response.go | 30 + ...file_storage_containers_request_builder.go | 10 + ...r_with_user_principal_name_get_response.go | 92 ++ ...ith_user_principal_name_request_builder.go | 125 ++ ..._user_with_user_principal_name_response.go | 30 + ...r_principal_name_with_role_get_response.go | 92 ++ ...rincipal_name_with_role_request_builder.go | 122 ++ ..._user_principal_name_with_role_response.go | 30 + ...rage_deleted_containers_request_builder.go | 10 + ...anner_history_item_item_request_builder.go | 6 +- ...lans_item_history_items_request_builder.go | 6 +- ...anner_history_item_item_request_builder.go | 6 +- ...lans_item_history_items_request_builder.go | 6 +- ...719f27b24b7e7160123d3fd9c3693c7963fa0b5.go | 6 +- ...be138272271fb006a4a2d1e14902cd0dbfed72f.go | 6 +- ...lans_item_history_items_request_builder.go | 6 +- ...lans_item_history_items_request_builder.go | 6 +- ...c9fbff78e9dbe2796f525e6f4846daa7b329a6f.go | 6 +- ...ce856b01457de16915da8e55f929a9351187d4a.go | 6 +- ...7d2d78990ebf4464e3536452ffe4fe997f0cabc.go | 6 +- ...lans_item_history_items_request_builder.go | 6 +- ...512a2b6ecbaf3167999659997b11cdfd970b2ba.go | 6 +- ...ccab35ee848760be7cc4b69a1709db6f6eb2d61.go | 6 +- ...es_item_get_sync_status_request_builder.go | 72 + ...em_remove_device_esim_post_request_body.go | 116 ++ ...item_remove_device_esim_request_builder.go | 71 + ...ces_managed_device_item_request_builder.go | 10 + ...anner_history_item_item_request_builder.go | 6 +- ...lans_item_history_items_request_builder.go | 6 +- 168 files changed, 16200 insertions(+), 307 deletions(-) create mode 100644 devicemanagement/android_managed_store_account_enterprise_settings_create_zero_touch_web_token_post_request_body.go create mode 100644 devicemanagement/android_managed_store_account_enterprise_settings_create_zero_touch_web_token_post_response.go create mode 100644 devicemanagement/android_managed_store_account_enterprise_settings_create_zero_touch_web_token_request_builder.go create mode 100644 devicemanagement/android_managed_store_account_enterprise_settings_create_zero_touch_web_token_response.go create mode 100644 devicemanagement/comanaged_devices_item_get_sync_status_request_builder.go create mode 100644 devicemanagement/comanaged_devices_item_remove_device_esim_post_request_body.go create mode 100644 devicemanagement/comanaged_devices_item_remove_device_esim_request_builder.go create mode 100644 devicemanagement/managed_devices_item_get_sync_status_request_builder.go create mode 100644 devicemanagement/managed_devices_item_remove_device_esim_post_request_body.go create mode 100644 devicemanagement/managed_devices_item_remove_device_esim_request_builder.go create mode 100644 drives/item_items_item_lock_post_request_body.go create mode 100644 drives/item_items_item_lock_request_builder.go create mode 100644 drives/item_items_item_release_lock_request_builder.go create mode 100644 models/additional_storage_allocations.go create mode 100644 models/device_sync_status_response.go create mode 100644 models/family_member_storage_quota.go create mode 100644 models/identitygovernance/guest_sponsor_trigger.go create mode 100644 models/place_service_plan_info.go create mode 100644 models/security/case_management_root.go create mode 100644 models/security/casemanagement/activity.go create mode 100644 models/security/casemanagement/activity_collection_response.go create mode 100644 models/security/casemanagement/activity_resource_details.go create mode 100644 models/security/casemanagement/alert_counts.go create mode 100644 models/security/casemanagement/alert_status_counts.go create mode 100644 models/security/casemanagement/attachment.go create mode 100644 models/security/casemanagement/attachment_collection_response.go create mode 100644 models/security/casemanagement/attachment_origin.go create mode 100644 models/security/casemanagement/attachment_origin_type.go create mode 100644 models/security/casemanagement/attachment_scan_result.go create mode 100644 models/security/casemanagement/audit_action.go create mode 100644 models/security/casemanagement/audit_log.go create mode 100644 models/security/casemanagement/boolean_value_property.go create mode 100644 models/security/casemanagement/case_collection_response.go create mode 100644 models/security/casemanagement/case_escaped.go create mode 100644 models/security/casemanagement/case_management_entity.go create mode 100644 models/security/casemanagement/case_task_category.go create mode 100644 models/security/casemanagement/case_task_priority.go create mode 100644 models/security/casemanagement/comment.go create mode 100644 models/security/casemanagement/custom_field_values.go create mode 100644 models/security/casemanagement/exposure_case.go create mode 100644 models/security/casemanagement/exposure_case_automation.go create mode 100644 models/security/casemanagement/exposure_case_git_hub.go create mode 100644 models/security/casemanagement/exposure_case_seemplicity.go create mode 100644 models/security/casemanagement/generic_case.go create mode 100644 models/security/casemanagement/impacted_assets_counts.go create mode 100644 models/security/casemanagement/incident_case.go create mode 100644 models/security/casemanagement/incident_classification.go create mode 100644 models/security/casemanagement/incident_determination.go create mode 100644 models/security/casemanagement/incident_relation.go create mode 100644 models/security/casemanagement/incident_severity.go create mode 100644 models/security/casemanagement/incident_severity_counts.go create mode 100644 models/security/casemanagement/investigation.go create mode 100644 models/security/casemanagement/modified_property.go create mode 100644 models/security/casemanagement/recommendation_relation.go create mode 100644 models/security/casemanagement/relation.go create mode 100644 models/security/casemanagement/relation_collection_response.go create mode 100644 models/security/casemanagement/string_value_property.go create mode 100644 models/security/casemanagement/task.go create mode 100644 models/security/casemanagement/task_collection_response.go create mode 100644 models/security/casemanagement/task_status.go create mode 100644 models/security/casemanagement/third_party_work_item.go create mode 100644 models/security/casemanagement/third_party_work_item_metadata.go create mode 100644 models/security/casemanagement/third_party_work_item_provider.go create mode 100644 models/security/casemanagement/third_party_work_item_type.go create mode 100644 models/security/casemanagement/value_property.go create mode 100644 models/security/casemanagement/workspace_indicator_relation.go create mode 100644 models/sync_component.go create mode 100644 models/sync_component_status.go rename reports/{get_microsoft365_copilot_usage_user_detail_with_period_request_builder.go => get_microsoft365_copilot_usage_user_detail_with_period_with_version_request_builder.go} (50%) rename reports/{get_microsoft365_copilot_user_count_summary_with_period_request_builder.go => get_microsoft365_copilot_user_count_summary_with_period_with_version_request_builder.go} (50%) rename reports/{get_microsoft365_copilot_user_count_trend_with_period_request_builder.go => get_microsoft365_copilot_user_count_trend_with_period_with_version_request_builder.go} (51%) create mode 100644 security/case_management_cases_case_item_request_builder.go create mode 100644 security/case_management_cases_count_request_builder.go create mode 100644 security/case_management_cases_item_activities_activity_item_request_builder.go create mode 100644 security/case_management_cases_item_activities_count_request_builder.go create mode 100644 security/case_management_cases_item_activities_request_builder.go create mode 100644 security/case_management_cases_item_attachments_attachment_item_request_builder.go create mode 100644 security/case_management_cases_item_attachments_count_request_builder.go create mode 100644 security/case_management_cases_item_attachments_item_content_request_builder.go create mode 100644 security/case_management_cases_item_attachments_request_builder.go create mode 100644 security/case_management_cases_item_relations_count_request_builder.go create mode 100644 security/case_management_cases_item_relations_relation_item_request_builder.go create mode 100644 security/case_management_cases_item_relations_request_builder.go create mode 100644 security/case_management_cases_item_tasks_count_request_builder.go create mode 100644 security/case_management_cases_item_tasks_request_builder.go create mode 100644 security/case_management_cases_item_tasks_task_item_request_builder.go create mode 100644 security/case_management_cases_request_builder.go create mode 100644 security/case_management_request_builder.go create mode 100644 security/cases_ediscovery_cases_item_legal_holds_item_microsoft_graph_security_disable_policy_request_builder.go create mode 100644 security/cases_ediscovery_cases_item_legal_holds_item_microsoft_graph_security_enable_policy_request_builder.go create mode 100644 storage/file_storage_containers_get_by_user_with_user_principal_name_get_response.go create mode 100644 storage/file_storage_containers_get_by_user_with_user_principal_name_request_builder.go create mode 100644 storage/file_storage_containers_get_by_user_with_user_principal_name_response.go create mode 100644 storage/file_storage_containers_get_by_user_with_user_principal_name_with_role_get_response.go create mode 100644 storage/file_storage_containers_get_by_user_with_user_principal_name_with_role_request_builder.go create mode 100644 storage/file_storage_containers_get_by_user_with_user_principal_name_with_role_response.go create mode 100644 storage/file_storage_deleted_containers_get_by_user_with_user_principal_name_get_response.go create mode 100644 storage/file_storage_deleted_containers_get_by_user_with_user_principal_name_request_builder.go create mode 100644 storage/file_storage_deleted_containers_get_by_user_with_user_principal_name_response.go create mode 100644 storage/file_storage_deleted_containers_get_by_user_with_user_principal_name_with_role_get_response.go create mode 100644 storage/file_storage_deleted_containers_get_by_user_with_user_principal_name_with_role_request_builder.go create mode 100644 storage/file_storage_deleted_containers_get_by_user_with_user_principal_name_with_role_response.go create mode 100644 users/item_managed_devices_item_get_sync_status_request_builder.go create mode 100644 users/item_managed_devices_item_remove_device_esim_post_request_body.go create mode 100644 users/item_managed_devices_item_remove_device_esim_request_builder.go diff --git a/admin/exchange_mailboxes_item_folders_item_child_folders_mailbox_folder_item_request_builder.go b/admin/exchange_mailboxes_item_folders_item_child_folders_mailbox_folder_item_request_builder.go index 68777473cb2..c9bdd133d65 100644 --- a/admin/exchange_mailboxes_item_folders_item_child_folders_mailbox_folder_item_request_builder.go +++ b/admin/exchange_mailboxes_item_folders_item_child_folders_mailbox_folder_item_request_builder.go @@ -14,6 +14,13 @@ import ( type ExchangeMailboxesItemFoldersItemChildFoldersMailboxFolderItemRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } +// ExchangeMailboxesItemFoldersItemChildFoldersMailboxFolderItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ExchangeMailboxesItemFoldersItemChildFoldersMailboxFolderItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} // ExchangeMailboxesItemFoldersItemChildFoldersMailboxFolderItemRequestBuilderGetQueryParameters the collection of child folders in this folder. type ExchangeMailboxesItemFoldersItemChildFoldersMailboxFolderItemRequestBuilderGetQueryParameters struct { // Expand related entities @@ -30,6 +37,13 @@ type ExchangeMailboxesItemFoldersItemChildFoldersMailboxFolderItemRequestBuilder // Request query parameters QueryParameters *ExchangeMailboxesItemFoldersItemChildFoldersMailboxFolderItemRequestBuilderGetQueryParameters } +// ExchangeMailboxesItemFoldersItemChildFoldersMailboxFolderItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ExchangeMailboxesItemFoldersItemChildFoldersMailboxFolderItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} // NewExchangeMailboxesItemFoldersItemChildFoldersMailboxFolderItemRequestBuilderInternal instantiates a new ExchangeMailboxesItemFoldersItemChildFoldersMailboxFolderItemRequestBuilder and sets the default values. func NewExchangeMailboxesItemFoldersItemChildFoldersMailboxFolderItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ExchangeMailboxesItemFoldersItemChildFoldersMailboxFolderItemRequestBuilder) { m := &ExchangeMailboxesItemFoldersItemChildFoldersMailboxFolderItemRequestBuilder{ @@ -43,6 +57,23 @@ func NewExchangeMailboxesItemFoldersItemChildFoldersMailboxFolderItemRequestBuil urlParams["request-raw-url"] = rawUrl return NewExchangeMailboxesItemFoldersItemChildFoldersMailboxFolderItemRequestBuilderInternal(urlParams, requestAdapter) } +// Delete delete navigation property childFolders for admin +// Deprecated: Private preview for Import Export APIs as of 2021-08/PrivatePreview:importExport on 2021-08-19 and will be removed 2021-11-15 +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *ExchangeMailboxesItemFoldersItemChildFoldersMailboxFolderItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *ExchangeMailboxesItemFoldersItemChildFoldersMailboxFolderItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} // Get the collection of child folders in this folder. // Deprecated: Private preview for Import Export APIs as of 2021-08/PrivatePreview:importExport on 2021-08-19 and will be removed 2021-11-15 // returns a MailboxFolderable when successful @@ -69,6 +100,39 @@ func (m *ExchangeMailboxesItemFoldersItemChildFoldersMailboxFolderItemRequestBui func (m *ExchangeMailboxesItemFoldersItemChildFoldersMailboxFolderItemRequestBuilder) Items()(*ExchangeMailboxesItemFoldersItemChildFoldersItemItemsRequestBuilder) { return NewExchangeMailboxesItemFoldersItemChildFoldersItemItemsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// Patch update the navigation property childFolders in admin +// Deprecated: Private preview for Import Export APIs as of 2021-08/PrivatePreview:importExport on 2021-08-19 and will be removed 2021-11-15 +// returns a MailboxFolderable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *ExchangeMailboxesItemFoldersItemChildFoldersMailboxFolderItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MailboxFolderable, requestConfiguration *ExchangeMailboxesItemFoldersItemChildFoldersMailboxFolderItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MailboxFolderable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMailboxFolderFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MailboxFolderable), nil +} +// ToDeleteRequestInformation delete navigation property childFolders for admin +// Deprecated: Private preview for Import Export APIs as of 2021-08/PrivatePreview:importExport on 2021-08-19 and will be removed 2021-11-15 +// returns a *RequestInformation when successful +func (m *ExchangeMailboxesItemFoldersItemChildFoldersMailboxFolderItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *ExchangeMailboxesItemFoldersItemChildFoldersMailboxFolderItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} // ToGetRequestInformation the collection of child folders in this folder. // Deprecated: Private preview for Import Export APIs as of 2021-08/PrivatePreview:importExport on 2021-08-19 and will be removed 2021-11-15 // returns a *RequestInformation when successful @@ -84,6 +148,22 @@ func (m *ExchangeMailboxesItemFoldersItemChildFoldersMailboxFolderItemRequestBui requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } +// ToPatchRequestInformation update the navigation property childFolders in admin +// Deprecated: Private preview for Import Export APIs as of 2021-08/PrivatePreview:importExport on 2021-08-19 and will be removed 2021-11-15 +// returns a *RequestInformation when successful +func (m *ExchangeMailboxesItemFoldersItemChildFoldersMailboxFolderItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MailboxFolderable, requestConfiguration *ExchangeMailboxesItemFoldersItemChildFoldersMailboxFolderItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return 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: Private preview for Import Export APIs as of 2021-08/PrivatePreview:importExport on 2021-08-19 and will be removed 2021-11-15 // returns a *ExchangeMailboxesItemFoldersItemChildFoldersMailboxFolderItemRequestBuilder when successful diff --git a/admin/exchange_mailboxes_item_folders_item_child_folders_request_builder.go b/admin/exchange_mailboxes_item_folders_item_child_folders_request_builder.go index 7820bed07ea..08a5da0cf84 100644 --- a/admin/exchange_mailboxes_item_folders_item_child_folders_request_builder.go +++ b/admin/exchange_mailboxes_item_folders_item_child_folders_request_builder.go @@ -42,6 +42,13 @@ type ExchangeMailboxesItemFoldersItemChildFoldersRequestBuilderGetRequestConfigu // Request query parameters QueryParameters *ExchangeMailboxesItemFoldersItemChildFoldersRequestBuilderGetQueryParameters } +// ExchangeMailboxesItemFoldersItemChildFoldersRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ExchangeMailboxesItemFoldersItemChildFoldersRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} // ByMailboxFolderId1 provides operations to manage the childFolders property of the microsoft.graph.mailboxFolder entity. // Deprecated: Private preview for Import Export APIs as of 2021-08/PrivatePreview:importExport on 2021-08-19 and will be removed 2021-11-15 // returns a *ExchangeMailboxesItemFoldersItemChildFoldersMailboxFolderItemRequestBuilder when successful @@ -102,6 +109,27 @@ func (m *ExchangeMailboxesItemFoldersItemChildFoldersRequestBuilder) Get(ctx con } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MailboxFolderCollectionResponseable), nil } +// Post create new navigation property to childFolders for admin +// Deprecated: Private preview for Import Export APIs as of 2021-08/PrivatePreview:importExport on 2021-08-19 and will be removed 2021-11-15 +// returns a MailboxFolderable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *ExchangeMailboxesItemFoldersItemChildFoldersRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MailboxFolderable, requestConfiguration *ExchangeMailboxesItemFoldersItemChildFoldersRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MailboxFolderable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMailboxFolderFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MailboxFolderable), nil +} // ToGetRequestInformation get the mailboxFolder collection under the specified mailboxFolder in a mailbox. // Deprecated: Private preview for Import Export APIs as of 2021-08/PrivatePreview:importExport on 2021-08-19 and will be removed 2021-11-15 // returns a *RequestInformation when successful @@ -117,6 +145,22 @@ func (m *ExchangeMailboxesItemFoldersItemChildFoldersRequestBuilder) ToGetReques requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } +// ToPostRequestInformation create new navigation property to childFolders for admin +// Deprecated: Private preview for Import Export APIs as of 2021-08/PrivatePreview:importExport on 2021-08-19 and will be removed 2021-11-15 +// returns a *RequestInformation when successful +func (m *ExchangeMailboxesItemFoldersItemChildFoldersRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MailboxFolderable, requestConfiguration *ExchangeMailboxesItemFoldersItemChildFoldersRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return 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: Private preview for Import Export APIs as of 2021-08/PrivatePreview:importExport on 2021-08-19 and will be removed 2021-11-15 // returns a *ExchangeMailboxesItemFoldersItemChildFoldersRequestBuilder when successful diff --git a/admin/exchange_mailboxes_item_folders_mailbox_folder_item_request_builder.go b/admin/exchange_mailboxes_item_folders_mailbox_folder_item_request_builder.go index 606baa391f1..8682f0105c3 100644 --- a/admin/exchange_mailboxes_item_folders_mailbox_folder_item_request_builder.go +++ b/admin/exchange_mailboxes_item_folders_mailbox_folder_item_request_builder.go @@ -14,6 +14,13 @@ import ( type ExchangeMailboxesItemFoldersMailboxFolderItemRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } +// ExchangeMailboxesItemFoldersMailboxFolderItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ExchangeMailboxesItemFoldersMailboxFolderItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} // ExchangeMailboxesItemFoldersMailboxFolderItemRequestBuilderGetQueryParameters read the properties and relationships of a mailboxFolder object. type ExchangeMailboxesItemFoldersMailboxFolderItemRequestBuilderGetQueryParameters struct { // Expand related entities @@ -30,6 +37,13 @@ type ExchangeMailboxesItemFoldersMailboxFolderItemRequestBuilderGetRequestConfig // Request query parameters QueryParameters *ExchangeMailboxesItemFoldersMailboxFolderItemRequestBuilderGetQueryParameters } +// ExchangeMailboxesItemFoldersMailboxFolderItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ExchangeMailboxesItemFoldersMailboxFolderItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} // ChildFolders provides operations to manage the childFolders property of the microsoft.graph.mailboxFolder entity. // returns a *ExchangeMailboxesItemFoldersItemChildFoldersRequestBuilder when successful func (m *ExchangeMailboxesItemFoldersMailboxFolderItemRequestBuilder) ChildFolders()(*ExchangeMailboxesItemFoldersItemChildFoldersRequestBuilder) { @@ -48,6 +62,26 @@ func NewExchangeMailboxesItemFoldersMailboxFolderItemRequestBuilder(rawUrl strin urlParams["request-raw-url"] = rawUrl return NewExchangeMailboxesItemFoldersMailboxFolderItemRequestBuilderInternal(urlParams, requestAdapter) } +// Delete delete a mailboxFolder or a child mailboxFolder within a mailbox. +// Deprecated: Private preview for Import Export APIs as of 2021-08/PrivatePreview:importExport on 2021-08-19 and will be removed 2021-11-15 +// returns a ODataError error when the service returns a 4XX or 5XX status code +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/mailbox-delete-folders?view=graph-rest-beta +func (m *ExchangeMailboxesItemFoldersMailboxFolderItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *ExchangeMailboxesItemFoldersMailboxFolderItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} // Get read the properties and relationships of a mailboxFolder object. // Deprecated: Private preview for Import Export APIs as of 2021-08/PrivatePreview:importExport on 2021-08-19 and will be removed 2021-11-15 // returns a MailboxFolderable when successful @@ -77,6 +111,42 @@ func (m *ExchangeMailboxesItemFoldersMailboxFolderItemRequestBuilder) Get(ctx co func (m *ExchangeMailboxesItemFoldersMailboxFolderItemRequestBuilder) Items()(*ExchangeMailboxesItemFoldersItemItemsRequestBuilder) { return NewExchangeMailboxesItemFoldersItemItemsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// Patch update mailboxFolder properties such as the displayName within a mailbox. +// Deprecated: Private preview for Import Export APIs as of 2021-08/PrivatePreview:importExport on 2021-08-19 and will be removed 2021-11-15 +// returns a MailboxFolderable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/mailboxfolder-update?view=graph-rest-beta +func (m *ExchangeMailboxesItemFoldersMailboxFolderItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MailboxFolderable, requestConfiguration *ExchangeMailboxesItemFoldersMailboxFolderItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MailboxFolderable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMailboxFolderFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MailboxFolderable), nil +} +// ToDeleteRequestInformation delete a mailboxFolder or a child mailboxFolder within a mailbox. +// Deprecated: Private preview for Import Export APIs as of 2021-08/PrivatePreview:importExport on 2021-08-19 and will be removed 2021-11-15 +// returns a *RequestInformation when successful +func (m *ExchangeMailboxesItemFoldersMailboxFolderItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *ExchangeMailboxesItemFoldersMailboxFolderItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} // ToGetRequestInformation read the properties and relationships of a mailboxFolder object. // Deprecated: Private preview for Import Export APIs as of 2021-08/PrivatePreview:importExport on 2021-08-19 and will be removed 2021-11-15 // returns a *RequestInformation when successful @@ -92,6 +162,22 @@ func (m *ExchangeMailboxesItemFoldersMailboxFolderItemRequestBuilder) ToGetReque requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } +// ToPatchRequestInformation update mailboxFolder properties such as the displayName within a mailbox. +// Deprecated: Private preview for Import Export APIs as of 2021-08/PrivatePreview:importExport on 2021-08-19 and will be removed 2021-11-15 +// returns a *RequestInformation when successful +func (m *ExchangeMailboxesItemFoldersMailboxFolderItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MailboxFolderable, requestConfiguration *ExchangeMailboxesItemFoldersMailboxFolderItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return 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: Private preview for Import Export APIs as of 2021-08/PrivatePreview:importExport on 2021-08-19 and will be removed 2021-11-15 // returns a *ExchangeMailboxesItemFoldersMailboxFolderItemRequestBuilder when successful diff --git a/admin/exchange_mailboxes_item_folders_request_builder.go b/admin/exchange_mailboxes_item_folders_request_builder.go index 793bde8476a..f02eccbb681 100644 --- a/admin/exchange_mailboxes_item_folders_request_builder.go +++ b/admin/exchange_mailboxes_item_folders_request_builder.go @@ -42,6 +42,13 @@ type ExchangeMailboxesItemFoldersRequestBuilderGetRequestConfiguration struct { // Request query parameters QueryParameters *ExchangeMailboxesItemFoldersRequestBuilderGetQueryParameters } +// ExchangeMailboxesItemFoldersRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ExchangeMailboxesItemFoldersRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} // ByMailboxFolderId provides operations to manage the folders property of the microsoft.graph.mailbox entity. // Deprecated: Private preview for Import Export APIs as of 2021-08/PrivatePreview:importExport on 2021-08-19 and will be removed 2021-11-15 // returns a *ExchangeMailboxesItemFoldersMailboxFolderItemRequestBuilder when successful @@ -102,6 +109,30 @@ func (m *ExchangeMailboxesItemFoldersRequestBuilder) Get(ctx context.Context, re } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MailboxFolderCollectionResponseable), nil } +// Post create a new mailboxFolder or child mailboxFolder in a user's mailbox. +// Deprecated: Private preview for Import Export APIs as of 2021-08/PrivatePreview:importExport on 2021-08-19 and will be removed 2021-11-15 +// returns a MailboxFolderable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/mailbox-post-folders?view=graph-rest-beta +func (m *ExchangeMailboxesItemFoldersRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MailboxFolderable, requestConfiguration *ExchangeMailboxesItemFoldersRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MailboxFolderable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMailboxFolderFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MailboxFolderable), nil +} // ToGetRequestInformation get all the mailboxFolder objects in the specified mailbox, including any search folders. // Deprecated: Private preview for Import Export APIs as of 2021-08/PrivatePreview:importExport on 2021-08-19 and will be removed 2021-11-15 // returns a *RequestInformation when successful @@ -117,6 +148,22 @@ func (m *ExchangeMailboxesItemFoldersRequestBuilder) ToGetRequestInformation(ctx requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } +// ToPostRequestInformation create a new mailboxFolder or child mailboxFolder in a user's mailbox. +// Deprecated: Private preview for Import Export APIs as of 2021-08/PrivatePreview:importExport on 2021-08-19 and will be removed 2021-11-15 +// returns a *RequestInformation when successful +func (m *ExchangeMailboxesItemFoldersRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MailboxFolderable, requestConfiguration *ExchangeMailboxesItemFoldersRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return 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: Private preview for Import Export APIs as of 2021-08/PrivatePreview:importExport on 2021-08-19 and will be removed 2021-11-15 // returns a *ExchangeMailboxesItemFoldersRequestBuilder when successful diff --git a/admin/report_settings_share_point_api_usage_report_metrics_request_builder.go b/admin/report_settings_share_point_api_usage_report_metrics_request_builder.go index f2e7348fb36..1bb09386568 100644 --- a/admin/report_settings_share_point_api_usage_report_metrics_request_builder.go +++ b/admin/report_settings_share_point_api_usage_report_metrics_request_builder.go @@ -14,7 +14,7 @@ import ( type ReportSettingsSharePointApiUsageReportMetricsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ReportSettingsSharePointApiUsageReportMetricsRequestBuilderGetQueryParameters get the list of SharePoint API usage report metrics and their enablement status for the tenant. Currently, only the EgressReport metric is supported. +// ReportSettingsSharePointApiUsageReportMetricsRequestBuilderGetQueryParameters get the list of SharePoint API usage report metrics and their enablement status for the tenant. The supported metrics are egressReport and throttlingReport. type ReportSettingsSharePointApiUsageReportMetricsRequestBuilderGetQueryParameters struct { // Include count of items Count *bool "uriparametername:\"%24count\"" @@ -79,7 +79,7 @@ func NewReportSettingsSharePointApiUsageReportMetricsRequestBuilder(rawUrl strin func (m *ReportSettingsSharePointApiUsageReportMetricsRequestBuilder) Count()(*ReportSettingsSharePointApiUsageReportMetricsCountRequestBuilder) { return NewReportSettingsSharePointApiUsageReportMetricsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Get get the list of SharePoint API usage report metrics and their enablement status for the tenant. Currently, only the EgressReport metric is supported. +// Get get the list of SharePoint API usage report metrics and their enablement status for the tenant. The supported metrics are egressReport and throttlingReport. // returns a ApiUsageReportEnablementStatusCollectionResponseable when successful // returns a ODataError error when the service returns a 4XX or 5XX status code // [Find more info here] @@ -122,7 +122,7 @@ func (m *ReportSettingsSharePointApiUsageReportMetricsRequestBuilder) Post(ctx c } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ApiUsageReportEnablementStatusable), nil } -// ToGetRequestInformation get the list of SharePoint API usage report metrics and their enablement status for the tenant. Currently, only the EgressReport metric is supported. +// ToGetRequestInformation get the list of SharePoint API usage report metrics and their enablement status for the tenant. The supported metrics are egressReport and throttlingReport. // returns a *RequestInformation when successful func (m *ReportSettingsSharePointApiUsageReportMetricsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ReportSettingsSharePointApiUsageReportMetricsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/devicemanagement/android_managed_store_account_enterprise_settings_create_zero_touch_web_token_post_request_body.go b/devicemanagement/android_managed_store_account_enterprise_settings_create_zero_touch_web_token_post_request_body.go new file mode 100644 index 00000000000..a3713eb070d --- /dev/null +++ b/devicemanagement/android_managed_store_account_enterprise_settings_create_zero_touch_web_token_post_request_body.go @@ -0,0 +1,116 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package devicemanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +type AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenPostRequestBody struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewAndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenPostRequestBody instantiates a new AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenPostRequestBody and sets the default values. +func NewAndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenPostRequestBody()(*AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenPostRequestBody) { + m := &AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenPostRequestBody{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateAndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateAndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenPostRequestBody(), 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. +// returns a map[string]any when successful +func (m *AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenPostRequestBody) 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. +// returns a BackingStore when successful +func (m *AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenPostRequestBody) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["parentUri"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetParentUri(val) + } + return nil + } + return res +} +// GetParentUri gets the parentUri property value. The parentUri property +// returns a *string when successful +func (m *AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenPostRequestBody) GetParentUri()(*string) { + val, err := m.GetBackingStore().Get("parentUri") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// Serialize serializes information the current object +func (m *AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("parentUri", m.GetParentUri()) + 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 *AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenPostRequestBody) 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 *AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenPostRequestBody) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetParentUri sets the parentUri property value. The parentUri property +func (m *AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenPostRequestBody) SetParentUri(value *string)() { + err := m.GetBackingStore().Set("parentUri", value) + if err != nil { + panic(err) + } +} +type AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetParentUri()(*string) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetParentUri(value *string)() +} diff --git a/devicemanagement/android_managed_store_account_enterprise_settings_create_zero_touch_web_token_post_response.go b/devicemanagement/android_managed_store_account_enterprise_settings_create_zero_touch_web_token_post_response.go new file mode 100644 index 00000000000..7449d95b723 --- /dev/null +++ b/devicemanagement/android_managed_store_account_enterprise_settings_create_zero_touch_web_token_post_response.go @@ -0,0 +1,116 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package devicemanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +type AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenPostResponse struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewAndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenPostResponse instantiates a new AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenPostResponse and sets the default values. +func NewAndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenPostResponse()(*AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenPostResponse) { + m := &AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenPostResponse{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateAndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenPostResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateAndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenPostResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenPostResponse(), 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. +// returns a map[string]any when successful +func (m *AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenPostResponse) 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. +// returns a BackingStore when successful +func (m *AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenPostResponse) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenPostResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetValue(val) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +// returns a *string when successful +func (m *AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenPostResponse) 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 *AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenPostResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("value", m.GetValue()) + 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 *AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenPostResponse) 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 *AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenPostResponse) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetValue sets the value property value. The value property +func (m *AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenPostResponse) SetValue(value *string)() { + err := m.GetBackingStore().Set("value", value) + if err != nil { + panic(err) + } +} +type AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenPostResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetValue()(*string) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetValue(value *string)() +} diff --git a/devicemanagement/android_managed_store_account_enterprise_settings_create_zero_touch_web_token_request_builder.go b/devicemanagement/android_managed_store_account_enterprise_settings_create_zero_touch_web_token_request_builder.go new file mode 100644 index 00000000000..66ad5b11909 --- /dev/null +++ b/devicemanagement/android_managed_store_account_enterprise_settings_create_zero_touch_web_token_request_builder.go @@ -0,0 +1,96 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package devicemanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenRequestBuilder provides operations to call the createZeroTouchWebToken method. +type AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewAndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenRequestBuilderInternal instantiates a new AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenRequestBuilder and sets the default values. +func NewAndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenRequestBuilder) { + m := &AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceManagement/androidManagedStoreAccountEnterpriseSettings/createZeroTouchWebToken", pathParameters), + } + return m +} +// NewAndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenRequestBuilder instantiates a new AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenRequestBuilder and sets the default values. +func NewAndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewAndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenRequestBuilderInternal(urlParams, requestAdapter) +} +// Post generates a web token scoped to the Zero Touch Enrollment portal. Requires the ManageZeroTouchEnrollment RBAC permission. +// Deprecated: This method is obsolete. Use PostAsCreateZeroTouchWebTokenPostResponse instead. +// returns a AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenResponseable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenRequestBuilder) Post(ctx context.Context, body AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenPostRequestBodyable, requestConfiguration *AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenRequestBuilderPostRequestConfiguration)(AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenResponseable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateAndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenResponseable), nil +} +// PostAsCreateZeroTouchWebTokenPostResponse generates a web token scoped to the Zero Touch Enrollment portal. Requires the ManageZeroTouchEnrollment RBAC permission. +// returns a AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenPostResponseable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenRequestBuilder) PostAsCreateZeroTouchWebTokenPostResponse(ctx context.Context, body AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenPostRequestBodyable, requestConfiguration *AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenRequestBuilderPostRequestConfiguration)(AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenPostResponseable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateAndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenPostResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenPostResponseable), nil +} +// ToPostRequestInformation generates a web token scoped to the Zero Touch Enrollment portal. Requires the ManageZeroTouchEnrollment RBAC permission. +// returns a *RequestInformation when successful +func (m *AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenRequestBuilder) ToPostRequestInformation(ctx context.Context, body AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenPostRequestBodyable, requestConfiguration *AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenRequestBuilder when successful +func (m *AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenRequestBuilder) WithUrl(rawUrl string)(*AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenRequestBuilder) { + return NewAndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/devicemanagement/android_managed_store_account_enterprise_settings_create_zero_touch_web_token_response.go b/devicemanagement/android_managed_store_account_enterprise_settings_create_zero_touch_web_token_response.go new file mode 100644 index 00000000000..df07081fa58 --- /dev/null +++ b/devicemanagement/android_managed_store_account_enterprise_settings_create_zero_touch_web_token_response.go @@ -0,0 +1,30 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package devicemanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Deprecated: This class is obsolete. Use AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenPostResponseable instead. +type AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenResponse struct { + AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenPostResponse +} +// NewAndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenResponse instantiates a new AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenResponse and sets the default values. +func NewAndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenResponse()(*AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenResponse) { + m := &AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenResponse{ + AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenPostResponse: *NewAndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenPostResponse(), + } + return m +} +// CreateAndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateAndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenResponse(), nil +} +// Deprecated: This class is obsolete. Use AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenPostResponseable instead. +type AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenResponseable interface { + AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenPostResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/devicemanagement/android_managed_store_account_enterprise_settings_request_builder.go b/devicemanagement/android_managed_store_account_enterprise_settings_request_builder.go index d55574f2525..4c2fed67b1c 100644 --- a/devicemanagement/android_managed_store_account_enterprise_settings_request_builder.go +++ b/devicemanagement/android_managed_store_account_enterprise_settings_request_builder.go @@ -77,6 +77,11 @@ func NewAndroidManagedStoreAccountEnterpriseSettingsRequestBuilder(rawUrl string func (m *AndroidManagedStoreAccountEnterpriseSettingsRequestBuilder) CreateGooglePlayWebToken()(*AndroidManagedStoreAccountEnterpriseSettingsCreateGooglePlayWebTokenRequestBuilder) { return NewAndroidManagedStoreAccountEnterpriseSettingsCreateGooglePlayWebTokenRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// CreateZeroTouchWebToken provides operations to call the createZeroTouchWebToken method. +// returns a *AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenRequestBuilder when successful +func (m *AndroidManagedStoreAccountEnterpriseSettingsRequestBuilder) CreateZeroTouchWebToken()(*AndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenRequestBuilder) { + return NewAndroidManagedStoreAccountEnterpriseSettingsCreateZeroTouchWebTokenRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // Delete delete navigation property androidManagedStoreAccountEnterpriseSettings for deviceManagement // returns a ODataError error when the service returns a 4XX or 5XX status code func (m *AndroidManagedStoreAccountEnterpriseSettingsRequestBuilder) Delete(ctx context.Context, requestConfiguration *AndroidManagedStoreAccountEnterpriseSettingsRequestBuilderDeleteRequestConfiguration)(error) { diff --git a/devicemanagement/comanaged_devices_item_get_sync_status_request_builder.go b/devicemanagement/comanaged_devices_item_get_sync_status_request_builder.go new file mode 100644 index 00000000000..12e3a84d1ac --- /dev/null +++ b/devicemanagement/comanaged_devices_item_get_sync_status_request_builder.go @@ -0,0 +1,72 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +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" +) + +// ComanagedDevicesItemGetSyncStatusRequestBuilder provides operations to call the getSyncStatus method. +type ComanagedDevicesItemGetSyncStatusRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ComanagedDevicesItemGetSyncStatusRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ComanagedDevicesItemGetSyncStatusRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewComanagedDevicesItemGetSyncStatusRequestBuilderInternal instantiates a new ComanagedDevicesItemGetSyncStatusRequestBuilder and sets the default values. +func NewComanagedDevicesItemGetSyncStatusRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ComanagedDevicesItemGetSyncStatusRequestBuilder) { + m := &ComanagedDevicesItemGetSyncStatusRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceManagement/comanagedDevices/{managedDevice%2Did}/getSyncStatus()", pathParameters), + } + return m +} +// NewComanagedDevicesItemGetSyncStatusRequestBuilder instantiates a new ComanagedDevicesItemGetSyncStatusRequestBuilder and sets the default values. +func NewComanagedDevicesItemGetSyncStatusRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ComanagedDevicesItemGetSyncStatusRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewComanagedDevicesItemGetSyncStatusRequestBuilderInternal(urlParams, requestAdapter) +} +// Get invoke function getSyncStatus +// returns a DeviceSyncStatusResponseable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *ComanagedDevicesItemGetSyncStatusRequestBuilder) Get(ctx context.Context, requestConfiguration *ComanagedDevicesItemGetSyncStatusRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DeviceSyncStatusResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateDeviceSyncStatusResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DeviceSyncStatusResponseable), nil +} +// ToGetRequestInformation invoke function getSyncStatus +// returns a *RequestInformation when successful +func (m *ComanagedDevicesItemGetSyncStatusRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ComanagedDevicesItemGetSyncStatusRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ComanagedDevicesItemGetSyncStatusRequestBuilder when successful +func (m *ComanagedDevicesItemGetSyncStatusRequestBuilder) WithUrl(rawUrl string)(*ComanagedDevicesItemGetSyncStatusRequestBuilder) { + return NewComanagedDevicesItemGetSyncStatusRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/devicemanagement/comanaged_devices_item_remove_device_esim_post_request_body.go b/devicemanagement/comanaged_devices_item_remove_device_esim_post_request_body.go new file mode 100644 index 00000000000..dde1e0ad2ac --- /dev/null +++ b/devicemanagement/comanaged_devices_item_remove_device_esim_post_request_body.go @@ -0,0 +1,116 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package devicemanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +type ComanagedDevicesItemRemoveDeviceEsimPostRequestBody struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewComanagedDevicesItemRemoveDeviceEsimPostRequestBody instantiates a new ComanagedDevicesItemRemoveDeviceEsimPostRequestBody and sets the default values. +func NewComanagedDevicesItemRemoveDeviceEsimPostRequestBody()(*ComanagedDevicesItemRemoveDeviceEsimPostRequestBody) { + m := &ComanagedDevicesItemRemoveDeviceEsimPostRequestBody{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateComanagedDevicesItemRemoveDeviceEsimPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateComanagedDevicesItemRemoveDeviceEsimPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewComanagedDevicesItemRemoveDeviceEsimPostRequestBody(), 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. +// returns a map[string]any when successful +func (m *ComanagedDevicesItemRemoveDeviceEsimPostRequestBody) 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. +// returns a BackingStore when successful +func (m *ComanagedDevicesItemRemoveDeviceEsimPostRequestBody) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ComanagedDevicesItemRemoveDeviceEsimPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["iccId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIccId(val) + } + return nil + } + return res +} +// GetIccId gets the iccId property value. The iccId property +// returns a *string when successful +func (m *ComanagedDevicesItemRemoveDeviceEsimPostRequestBody) GetIccId()(*string) { + val, err := m.GetBackingStore().Get("iccId") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// Serialize serializes information the current object +func (m *ComanagedDevicesItemRemoveDeviceEsimPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("iccId", m.GetIccId()) + 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 *ComanagedDevicesItemRemoveDeviceEsimPostRequestBody) 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 *ComanagedDevicesItemRemoveDeviceEsimPostRequestBody) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetIccId sets the iccId property value. The iccId property +func (m *ComanagedDevicesItemRemoveDeviceEsimPostRequestBody) SetIccId(value *string)() { + err := m.GetBackingStore().Set("iccId", value) + if err != nil { + panic(err) + } +} +type ComanagedDevicesItemRemoveDeviceEsimPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetIccId()(*string) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetIccId(value *string)() +} diff --git a/devicemanagement/comanaged_devices_item_remove_device_esim_request_builder.go b/devicemanagement/comanaged_devices_item_remove_device_esim_request_builder.go new file mode 100644 index 00000000000..6f136d5b611 --- /dev/null +++ b/devicemanagement/comanaged_devices_item_remove_device_esim_request_builder.go @@ -0,0 +1,71 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package devicemanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ComanagedDevicesItemRemoveDeviceEsimRequestBuilder provides operations to call the removeDeviceEsim method. +type ComanagedDevicesItemRemoveDeviceEsimRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ComanagedDevicesItemRemoveDeviceEsimRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ComanagedDevicesItemRemoveDeviceEsimRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewComanagedDevicesItemRemoveDeviceEsimRequestBuilderInternal instantiates a new ComanagedDevicesItemRemoveDeviceEsimRequestBuilder and sets the default values. +func NewComanagedDevicesItemRemoveDeviceEsimRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ComanagedDevicesItemRemoveDeviceEsimRequestBuilder) { + m := &ComanagedDevicesItemRemoveDeviceEsimRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceManagement/comanagedDevices/{managedDevice%2Did}/removeDeviceEsim", pathParameters), + } + return m +} +// NewComanagedDevicesItemRemoveDeviceEsimRequestBuilder instantiates a new ComanagedDevicesItemRemoveDeviceEsimRequestBuilder and sets the default values. +func NewComanagedDevicesItemRemoveDeviceEsimRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ComanagedDevicesItemRemoveDeviceEsimRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewComanagedDevicesItemRemoveDeviceEsimRequestBuilderInternal(urlParams, requestAdapter) +} +// Post remove eSIM from the device +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *ComanagedDevicesItemRemoveDeviceEsimRequestBuilder) Post(ctx context.Context, body ComanagedDevicesItemRemoveDeviceEsimPostRequestBodyable, requestConfiguration *ComanagedDevicesItemRemoveDeviceEsimRequestBuilderPostRequestConfiguration)(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation remove eSIM from the device +// returns a *RequestInformation when successful +func (m *ComanagedDevicesItemRemoveDeviceEsimRequestBuilder) ToPostRequestInformation(ctx context.Context, body ComanagedDevicesItemRemoveDeviceEsimPostRequestBodyable, requestConfiguration *ComanagedDevicesItemRemoveDeviceEsimRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ComanagedDevicesItemRemoveDeviceEsimRequestBuilder when successful +func (m *ComanagedDevicesItemRemoveDeviceEsimRequestBuilder) WithUrl(rawUrl string)(*ComanagedDevicesItemRemoveDeviceEsimRequestBuilder) { + return NewComanagedDevicesItemRemoveDeviceEsimRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/devicemanagement/comanaged_devices_managed_device_item_request_builder.go b/devicemanagement/comanaged_devices_managed_device_item_request_builder.go index d0ab25c264e..79d0e1ab231 100644 --- a/devicemanagement/comanaged_devices_managed_device_item_request_builder.go +++ b/devicemanagement/comanaged_devices_managed_device_item_request_builder.go @@ -188,6 +188,11 @@ func (m *ComanagedDevicesManagedDeviceItemRequestBuilder) GetFileVaultKey()(*Com func (m *ComanagedDevicesManagedDeviceItemRequestBuilder) GetNonCompliantSettings()(*ComanagedDevicesItemGetNonCompliantSettingsRequestBuilder) { return NewComanagedDevicesItemGetNonCompliantSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// GetSyncStatus provides operations to call the getSyncStatus method. +// returns a *ComanagedDevicesItemGetSyncStatusRequestBuilder when successful +func (m *ComanagedDevicesManagedDeviceItemRequestBuilder) GetSyncStatus()(*ComanagedDevicesItemGetSyncStatusRequestBuilder) { + return NewComanagedDevicesItemGetSyncStatusRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // InitiateDeviceAttestation provides operations to call the initiateDeviceAttestation method. // returns a *ComanagedDevicesItemInitiateDeviceAttestationRequestBuilder when successful func (m *ComanagedDevicesManagedDeviceItemRequestBuilder) InitiateDeviceAttestation()(*ComanagedDevicesItemInitiateDeviceAttestationRequestBuilder) { @@ -278,6 +283,11 @@ func (m *ComanagedDevicesManagedDeviceItemRequestBuilder) Reenable()(*ComanagedD func (m *ComanagedDevicesManagedDeviceItemRequestBuilder) RemoteLock()(*ComanagedDevicesItemRemoteLockRequestBuilder) { return NewComanagedDevicesItemRemoteLockRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// RemoveDeviceEsim provides operations to call the removeDeviceEsim method. +// returns a *ComanagedDevicesItemRemoveDeviceEsimRequestBuilder when successful +func (m *ComanagedDevicesManagedDeviceItemRequestBuilder) RemoveDeviceEsim()(*ComanagedDevicesItemRemoveDeviceEsimRequestBuilder) { + return NewComanagedDevicesItemRemoveDeviceEsimRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // RemoveDeviceFirmwareConfigurationInterfaceManagement provides operations to call the removeDeviceFirmwareConfigurationInterfaceManagement method. // returns a *ComanagedDevicesItemRemoveDeviceFirmwareConfigurationInterfaceManagementRequestBuilder when successful func (m *ComanagedDevicesManagedDeviceItemRequestBuilder) RemoveDeviceFirmwareConfigurationInterfaceManagement()(*ComanagedDevicesItemRemoveDeviceFirmwareConfigurationInterfaceManagementRequestBuilder) { diff --git a/devicemanagement/managed_devices_item_get_sync_status_request_builder.go b/devicemanagement/managed_devices_item_get_sync_status_request_builder.go new file mode 100644 index 00000000000..cbd2ac52d64 --- /dev/null +++ b/devicemanagement/managed_devices_item_get_sync_status_request_builder.go @@ -0,0 +1,72 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +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" +) + +// ManagedDevicesItemGetSyncStatusRequestBuilder provides operations to call the getSyncStatus method. +type ManagedDevicesItemGetSyncStatusRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ManagedDevicesItemGetSyncStatusRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ManagedDevicesItemGetSyncStatusRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewManagedDevicesItemGetSyncStatusRequestBuilderInternal instantiates a new ManagedDevicesItemGetSyncStatusRequestBuilder and sets the default values. +func NewManagedDevicesItemGetSyncStatusRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ManagedDevicesItemGetSyncStatusRequestBuilder) { + m := &ManagedDevicesItemGetSyncStatusRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceManagement/managedDevices/{managedDevice%2Did}/getSyncStatus()", pathParameters), + } + return m +} +// NewManagedDevicesItemGetSyncStatusRequestBuilder instantiates a new ManagedDevicesItemGetSyncStatusRequestBuilder and sets the default values. +func NewManagedDevicesItemGetSyncStatusRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ManagedDevicesItemGetSyncStatusRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewManagedDevicesItemGetSyncStatusRequestBuilderInternal(urlParams, requestAdapter) +} +// Get invoke function getSyncStatus +// returns a DeviceSyncStatusResponseable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *ManagedDevicesItemGetSyncStatusRequestBuilder) Get(ctx context.Context, requestConfiguration *ManagedDevicesItemGetSyncStatusRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DeviceSyncStatusResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateDeviceSyncStatusResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DeviceSyncStatusResponseable), nil +} +// ToGetRequestInformation invoke function getSyncStatus +// returns a *RequestInformation when successful +func (m *ManagedDevicesItemGetSyncStatusRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ManagedDevicesItemGetSyncStatusRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ManagedDevicesItemGetSyncStatusRequestBuilder when successful +func (m *ManagedDevicesItemGetSyncStatusRequestBuilder) WithUrl(rawUrl string)(*ManagedDevicesItemGetSyncStatusRequestBuilder) { + return NewManagedDevicesItemGetSyncStatusRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/devicemanagement/managed_devices_item_remove_device_esim_post_request_body.go b/devicemanagement/managed_devices_item_remove_device_esim_post_request_body.go new file mode 100644 index 00000000000..0bffc85b6cf --- /dev/null +++ b/devicemanagement/managed_devices_item_remove_device_esim_post_request_body.go @@ -0,0 +1,116 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package devicemanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +type ManagedDevicesItemRemoveDeviceEsimPostRequestBody struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewManagedDevicesItemRemoveDeviceEsimPostRequestBody instantiates a new ManagedDevicesItemRemoveDeviceEsimPostRequestBody and sets the default values. +func NewManagedDevicesItemRemoveDeviceEsimPostRequestBody()(*ManagedDevicesItemRemoveDeviceEsimPostRequestBody) { + m := &ManagedDevicesItemRemoveDeviceEsimPostRequestBody{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateManagedDevicesItemRemoveDeviceEsimPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateManagedDevicesItemRemoveDeviceEsimPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedDevicesItemRemoveDeviceEsimPostRequestBody(), 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. +// returns a map[string]any when successful +func (m *ManagedDevicesItemRemoveDeviceEsimPostRequestBody) 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. +// returns a BackingStore when successful +func (m *ManagedDevicesItemRemoveDeviceEsimPostRequestBody) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ManagedDevicesItemRemoveDeviceEsimPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["iccId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIccId(val) + } + return nil + } + return res +} +// GetIccId gets the iccId property value. The iccId property +// returns a *string when successful +func (m *ManagedDevicesItemRemoveDeviceEsimPostRequestBody) GetIccId()(*string) { + val, err := m.GetBackingStore().Get("iccId") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// Serialize serializes information the current object +func (m *ManagedDevicesItemRemoveDeviceEsimPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("iccId", m.GetIccId()) + 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 *ManagedDevicesItemRemoveDeviceEsimPostRequestBody) 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 *ManagedDevicesItemRemoveDeviceEsimPostRequestBody) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetIccId sets the iccId property value. The iccId property +func (m *ManagedDevicesItemRemoveDeviceEsimPostRequestBody) SetIccId(value *string)() { + err := m.GetBackingStore().Set("iccId", value) + if err != nil { + panic(err) + } +} +type ManagedDevicesItemRemoveDeviceEsimPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetIccId()(*string) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetIccId(value *string)() +} diff --git a/devicemanagement/managed_devices_item_remove_device_esim_request_builder.go b/devicemanagement/managed_devices_item_remove_device_esim_request_builder.go new file mode 100644 index 00000000000..2fc420b3bcd --- /dev/null +++ b/devicemanagement/managed_devices_item_remove_device_esim_request_builder.go @@ -0,0 +1,71 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package devicemanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ManagedDevicesItemRemoveDeviceEsimRequestBuilder provides operations to call the removeDeviceEsim method. +type ManagedDevicesItemRemoveDeviceEsimRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ManagedDevicesItemRemoveDeviceEsimRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ManagedDevicesItemRemoveDeviceEsimRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewManagedDevicesItemRemoveDeviceEsimRequestBuilderInternal instantiates a new ManagedDevicesItemRemoveDeviceEsimRequestBuilder and sets the default values. +func NewManagedDevicesItemRemoveDeviceEsimRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ManagedDevicesItemRemoveDeviceEsimRequestBuilder) { + m := &ManagedDevicesItemRemoveDeviceEsimRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceManagement/managedDevices/{managedDevice%2Did}/removeDeviceEsim", pathParameters), + } + return m +} +// NewManagedDevicesItemRemoveDeviceEsimRequestBuilder instantiates a new ManagedDevicesItemRemoveDeviceEsimRequestBuilder and sets the default values. +func NewManagedDevicesItemRemoveDeviceEsimRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ManagedDevicesItemRemoveDeviceEsimRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewManagedDevicesItemRemoveDeviceEsimRequestBuilderInternal(urlParams, requestAdapter) +} +// Post remove eSIM from the device +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *ManagedDevicesItemRemoveDeviceEsimRequestBuilder) Post(ctx context.Context, body ManagedDevicesItemRemoveDeviceEsimPostRequestBodyable, requestConfiguration *ManagedDevicesItemRemoveDeviceEsimRequestBuilderPostRequestConfiguration)(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation remove eSIM from the device +// returns a *RequestInformation when successful +func (m *ManagedDevicesItemRemoveDeviceEsimRequestBuilder) ToPostRequestInformation(ctx context.Context, body ManagedDevicesItemRemoveDeviceEsimPostRequestBodyable, requestConfiguration *ManagedDevicesItemRemoveDeviceEsimRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ManagedDevicesItemRemoveDeviceEsimRequestBuilder when successful +func (m *ManagedDevicesItemRemoveDeviceEsimRequestBuilder) WithUrl(rawUrl string)(*ManagedDevicesItemRemoveDeviceEsimRequestBuilder) { + return NewManagedDevicesItemRemoveDeviceEsimRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/devicemanagement/managed_devices_managed_device_item_request_builder.go b/devicemanagement/managed_devices_managed_device_item_request_builder.go index 3616104435d..9fa8dba81ec 100644 --- a/devicemanagement/managed_devices_managed_device_item_request_builder.go +++ b/devicemanagement/managed_devices_managed_device_item_request_builder.go @@ -188,6 +188,11 @@ func (m *ManagedDevicesManagedDeviceItemRequestBuilder) GetFileVaultKey()(*Manag func (m *ManagedDevicesManagedDeviceItemRequestBuilder) GetNonCompliantSettings()(*ManagedDevicesItemGetNonCompliantSettingsRequestBuilder) { return NewManagedDevicesItemGetNonCompliantSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// GetSyncStatus provides operations to call the getSyncStatus method. +// returns a *ManagedDevicesItemGetSyncStatusRequestBuilder when successful +func (m *ManagedDevicesManagedDeviceItemRequestBuilder) GetSyncStatus()(*ManagedDevicesItemGetSyncStatusRequestBuilder) { + return NewManagedDevicesItemGetSyncStatusRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // InitiateDeviceAttestation provides operations to call the initiateDeviceAttestation method. // returns a *ManagedDevicesItemInitiateDeviceAttestationRequestBuilder when successful func (m *ManagedDevicesManagedDeviceItemRequestBuilder) InitiateDeviceAttestation()(*ManagedDevicesItemInitiateDeviceAttestationRequestBuilder) { @@ -278,6 +283,11 @@ func (m *ManagedDevicesManagedDeviceItemRequestBuilder) Reenable()(*ManagedDevic func (m *ManagedDevicesManagedDeviceItemRequestBuilder) RemoteLock()(*ManagedDevicesItemRemoteLockRequestBuilder) { return NewManagedDevicesItemRemoteLockRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// RemoveDeviceEsim provides operations to call the removeDeviceEsim method. +// returns a *ManagedDevicesItemRemoveDeviceEsimRequestBuilder when successful +func (m *ManagedDevicesManagedDeviceItemRequestBuilder) RemoveDeviceEsim()(*ManagedDevicesItemRemoveDeviceEsimRequestBuilder) { + return NewManagedDevicesItemRemoveDeviceEsimRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // RemoveDeviceFirmwareConfigurationInterfaceManagement provides operations to call the removeDeviceFirmwareConfigurationInterfaceManagement method. // returns a *ManagedDevicesItemRemoveDeviceFirmwareConfigurationInterfaceManagementRequestBuilder when successful func (m *ManagedDevicesManagedDeviceItemRequestBuilder) RemoveDeviceFirmwareConfigurationInterfaceManagement()(*ManagedDevicesItemRemoveDeviceFirmwareConfigurationInterfaceManagementRequestBuilder) { diff --git a/devicemanagement/virtual_endpoint_organization_action_request_builder.go b/devicemanagement/virtual_endpoint_organization_action_request_builder.go index f3356a6fb35..e5e1acf16a2 100644 --- a/devicemanagement/virtual_endpoint_organization_action_request_builder.go +++ b/devicemanagement/virtual_endpoint_organization_action_request_builder.go @@ -34,9 +34,12 @@ func NewVirtualEndpointOrganizationActionRequestBuilder(rawUrl string, requestAd urlParams["request-raw-url"] = rawUrl return NewVirtualEndpointOrganizationActionRequestBuilderInternal(urlParams, requestAdapter) } -// Post invoke action organizationAction +// Post trigger a Cloud PC organization action. // returns a CloudPcOrganizationActionDetailable when successful // returns a ODataError error when the service returns a 4XX or 5XX status code +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/cloudpc-organizationaction?view=graph-rest-beta func (m *VirtualEndpointOrganizationActionRequestBuilder) Post(ctx context.Context, body VirtualEndpointOrganizationActionPostRequestBodyable, requestConfiguration *VirtualEndpointOrganizationActionRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CloudPcOrganizationActionDetailable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -54,7 +57,7 @@ func (m *VirtualEndpointOrganizationActionRequestBuilder) Post(ctx context.Conte } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CloudPcOrganizationActionDetailable), nil } -// ToPostRequestInformation invoke action organizationAction +// ToPostRequestInformation trigger a Cloud PC organization action. // returns a *RequestInformation when successful func (m *VirtualEndpointOrganizationActionRequestBuilder) ToPostRequestInformation(ctx context.Context, body VirtualEndpointOrganizationActionPostRequestBodyable, requestConfiguration *VirtualEndpointOrganizationActionRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/devicemanagement/virtual_endpoint_retrieve_organization_action_detail_with_action_type_request_builder.go b/devicemanagement/virtual_endpoint_retrieve_organization_action_detail_with_action_type_request_builder.go index 8e85ca21610..75cff05f533 100644 --- a/devicemanagement/virtual_endpoint_retrieve_organization_action_detail_with_action_type_request_builder.go +++ b/devicemanagement/virtual_endpoint_retrieve_organization_action_detail_with_action_type_request_builder.go @@ -37,9 +37,12 @@ func NewVirtualEndpointRetrieveOrganizationActionDetailWithActionTypeRequestBuil urlParams["request-raw-url"] = rawUrl return NewVirtualEndpointRetrieveOrganizationActionDetailWithActionTypeRequestBuilderInternal(urlParams, requestAdapter, nil) } -// Get invoke function retrieveOrganizationActionDetail +// Get retrieve the details of a cloudPcOrganizationActionDetail. // returns a CloudPcOrganizationActionDetailable when successful // returns a ODataError error when the service returns a 4XX or 5XX status code +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/cloudpc-retrieveorganizationactiondetail?view=graph-rest-beta func (m *VirtualEndpointRetrieveOrganizationActionDetailWithActionTypeRequestBuilder) Get(ctx context.Context, requestConfiguration *VirtualEndpointRetrieveOrganizationActionDetailWithActionTypeRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CloudPcOrganizationActionDetailable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -57,7 +60,7 @@ func (m *VirtualEndpointRetrieveOrganizationActionDetailWithActionTypeRequestBui } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CloudPcOrganizationActionDetailable), nil } -// ToGetRequestInformation invoke function retrieveOrganizationActionDetail +// ToGetRequestInformation retrieve the details of a cloudPcOrganizationActionDetail. // returns a *RequestInformation when successful func (m *VirtualEndpointRetrieveOrganizationActionDetailWithActionTypeRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *VirtualEndpointRetrieveOrganizationActionDetailWithActionTypeRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/devicemanagement/virtual_endpoint_service_plans_request_builder.go b/devicemanagement/virtual_endpoint_service_plans_request_builder.go index 295af1f6df8..33e5d699c40 100644 --- a/devicemanagement/virtual_endpoint_service_plans_request_builder.go +++ b/devicemanagement/virtual_endpoint_service_plans_request_builder.go @@ -14,7 +14,7 @@ import ( type VirtualEndpointServicePlansRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// VirtualEndpointServicePlansRequestBuilderGetQueryParameters list the currently available service plans that an organization can purchase for their Cloud PCs. For examples of currently available service plans, see Windows 365 compare plans and pricing. Currently, Microsoft Graph API is available for Windows 365 Enterprise. +// VirtualEndpointServicePlansRequestBuilderGetQueryParameters list the currently available service plans that an organization can purchase for their Cloud PCs. For examples of currently available service plans, see Windows 365 compare plans and pricing. Currently, the Microsoft Graph API is available for Windows 365 Enterprise. type VirtualEndpointServicePlansRequestBuilderGetQueryParameters struct { // Include count of items Count *bool "uriparametername:\"%24count\"" @@ -79,7 +79,7 @@ func NewVirtualEndpointServicePlansRequestBuilder(rawUrl string, requestAdapter func (m *VirtualEndpointServicePlansRequestBuilder) Count()(*VirtualEndpointServicePlansCountRequestBuilder) { return NewVirtualEndpointServicePlansCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Get list the currently available service plans that an organization can purchase for their Cloud PCs. For examples of currently available service plans, see Windows 365 compare plans and pricing. Currently, Microsoft Graph API is available for Windows 365 Enterprise. +// Get list the currently available service plans that an organization can purchase for their Cloud PCs. For examples of currently available service plans, see Windows 365 compare plans and pricing. Currently, the Microsoft Graph API is available for Windows 365 Enterprise. // returns a CloudPcServicePlanCollectionResponseable when successful // returns a ODataError error when the service returns a 4XX or 5XX status code // [Find more info here] @@ -122,7 +122,7 @@ func (m *VirtualEndpointServicePlansRequestBuilder) Post(ctx context.Context, bo } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CloudPcServicePlanable), nil } -// ToGetRequestInformation list the currently available service plans that an organization can purchase for their Cloud PCs. For examples of currently available service plans, see Windows 365 compare plans and pricing. Currently, Microsoft Graph API is available for Windows 365 Enterprise. +// ToGetRequestInformation list the currently available service plans that an organization can purchase for their Cloud PCs. For examples of currently available service plans, see Windows 365 compare plans and pricing. Currently, the Microsoft Graph API is available for Windows 365 Enterprise. // returns a *RequestInformation when successful func (m *VirtualEndpointServicePlansRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *VirtualEndpointServicePlansRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/drives/item_items_drive_item_item_request_builder.go b/drives/item_items_drive_item_item_request_builder.go index 009aa433045..a6e965b5dde 100644 --- a/drives/item_items_drive_item_item_request_builder.go +++ b/drives/item_items_drive_item_item_request_builder.go @@ -208,6 +208,11 @@ func (m *ItemItemsDriveItemItemRequestBuilder) LastModifiedByUser()(*ItemItemsIt func (m *ItemItemsDriveItemItemRequestBuilder) ListItem()(*ItemItemsItemListItemRequestBuilder) { return NewItemItemsItemListItemRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// Lock provides operations to call the lock method. +// returns a *ItemItemsItemLockRequestBuilder when successful +func (m *ItemItemsDriveItemItemRequestBuilder) Lock()(*ItemItemsItemLockRequestBuilder) { + return NewItemItemsItemLockRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // Patch update the navigation property items in drives // returns a DriveItemable when successful // returns a ODataError error when the service returns a 4XX or 5XX status code @@ -243,6 +248,11 @@ func (m *ItemItemsDriveItemItemRequestBuilder) Permissions()(*ItemItemsItemPermi func (m *ItemItemsDriveItemItemRequestBuilder) Preview()(*ItemItemsItemPreviewRequestBuilder) { return NewItemItemsItemPreviewRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ReleaseLock provides operations to call the releaseLock method. +// returns a *ItemItemsItemReleaseLockRequestBuilder when successful +func (m *ItemItemsDriveItemItemRequestBuilder) ReleaseLock()(*ItemItemsItemReleaseLockRequestBuilder) { + return NewItemItemsItemReleaseLockRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // Restore provides operations to call the restore method. // returns a *ItemItemsItemRestoreRequestBuilder when successful func (m *ItemItemsDriveItemItemRequestBuilder) Restore()(*ItemItemsItemRestoreRequestBuilder) { diff --git a/drives/item_items_item_lock_post_request_body.go b/drives/item_items_item_lock_post_request_body.go new file mode 100644 index 00000000000..03b891e74d3 --- /dev/null +++ b/drives/item_items_item_lock_post_request_body.go @@ -0,0 +1,116 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package drives + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +type ItemItemsItemLockPostRequestBody struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewItemItemsItemLockPostRequestBody instantiates a new ItemItemsItemLockPostRequestBody and sets the default values. +func NewItemItemsItemLockPostRequestBody()(*ItemItemsItemLockPostRequestBody) { + m := &ItemItemsItemLockPostRequestBody{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemsItemLockPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemsItemLockPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemsItemLockPostRequestBody(), 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. +// returns a map[string]any when successful +func (m *ItemItemsItemLockPostRequestBody) 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. +// returns a BackingStore when successful +func (m *ItemItemsItemLockPostRequestBody) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetDurationMinutes gets the durationMinutes property value. The durationMinutes property +// returns a *int32 when successful +func (m *ItemItemsItemLockPostRequestBody) GetDurationMinutes()(*int32) { + val, err := m.GetBackingStore().Get("durationMinutes") + if err != nil { + panic(err) + } + if val != nil { + return val.(*int32) + } + return nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemsItemLockPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["durationMinutes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDurationMinutes(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ItemItemsItemLockPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("durationMinutes", m.GetDurationMinutes()) + 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 *ItemItemsItemLockPostRequestBody) 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 *ItemItemsItemLockPostRequestBody) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetDurationMinutes sets the durationMinutes property value. The durationMinutes property +func (m *ItemItemsItemLockPostRequestBody) SetDurationMinutes(value *int32)() { + err := m.GetBackingStore().Set("durationMinutes", value) + if err != nil { + panic(err) + } +} +type ItemItemsItemLockPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetDurationMinutes()(*int32) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetDurationMinutes(value *int32)() +} diff --git a/drives/item_items_item_lock_request_builder.go b/drives/item_items_item_lock_request_builder.go new file mode 100644 index 00000000000..40bafd2e0f3 --- /dev/null +++ b/drives/item_items_item_lock_request_builder.go @@ -0,0 +1,79 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +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" +) + +// ItemItemsItemLockRequestBuilder provides operations to call the lock method. +type ItemItemsItemLockRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemsItemLockRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemItemsItemLockRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewItemItemsItemLockRequestBuilderInternal instantiates a new ItemItemsItemLockRequestBuilder and sets the default values. +func NewItemItemsItemLockRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemsItemLockRequestBuilder) { + m := &ItemItemsItemLockRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/lock", pathParameters), + } + return m +} +// NewItemItemsItemLockRequestBuilder instantiates a new ItemItemsItemLockRequestBuilder and sets the default values. +func NewItemItemsItemLockRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemsItemLockRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemsItemLockRequestBuilderInternal(urlParams, requestAdapter) +} +// Post acquire an exclusive lock on a file represented by a driveItem, or extend an existing lock you already hold. While the lock is held, other users are prevented from acquiring a lock on the same file. The lock automatically expires after the duration specified in the request elapses. A single endpoint handles both initial acquisition and refresh. The server determines which behavior applies based on the file's current lock state and the caller's identity. The caller doesn't need to track whether they previously locked the file, and doesn't need to manage a lock identifier. Only exclusive locks are currently supported. +// returns a LockInfoable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/driveitem-lock?view=graph-rest-beta +func (m *ItemItemsItemLockRequestBuilder) Post(ctx context.Context, body ItemItemsItemLockPostRequestBodyable, requestConfiguration *ItemItemsItemLockRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.LockInfoable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateLockInfoFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.LockInfoable), nil +} +// ToPostRequestInformation acquire an exclusive lock on a file represented by a driveItem, or extend an existing lock you already hold. While the lock is held, other users are prevented from acquiring a lock on the same file. The lock automatically expires after the duration specified in the request elapses. A single endpoint handles both initial acquisition and refresh. The server determines which behavior applies based on the file's current lock state and the caller's identity. The caller doesn't need to track whether they previously locked the file, and doesn't need to manage a lock identifier. Only exclusive locks are currently supported. +// returns a *RequestInformation when successful +func (m *ItemItemsItemLockRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemsItemLockPostRequestBodyable, requestConfiguration *ItemItemsItemLockRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemsItemLockRequestBuilder when successful +func (m *ItemItemsItemLockRequestBuilder) WithUrl(rawUrl string)(*ItemItemsItemLockRequestBuilder) { + return NewItemItemsItemLockRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/drives/item_items_item_release_lock_request_builder.go b/drives/item_items_item_release_lock_request_builder.go new file mode 100644 index 00000000000..81d509f4a31 --- /dev/null +++ b/drives/item_items_item_release_lock_request_builder.go @@ -0,0 +1,70 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package drives + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemItemsItemReleaseLockRequestBuilder provides operations to call the releaseLock method. +type ItemItemsItemReleaseLockRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemsItemReleaseLockRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemItemsItemReleaseLockRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewItemItemsItemReleaseLockRequestBuilderInternal instantiates a new ItemItemsItemReleaseLockRequestBuilder and sets the default values. +func NewItemItemsItemReleaseLockRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemsItemReleaseLockRequestBuilder) { + m := &ItemItemsItemReleaseLockRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/releaseLock", pathParameters), + } + return m +} +// NewItemItemsItemReleaseLockRequestBuilder instantiates a new ItemItemsItemReleaseLockRequestBuilder and sets the default values. +func NewItemItemsItemReleaseLockRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemsItemReleaseLockRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemsItemReleaseLockRequestBuilderInternal(urlParams, requestAdapter) +} +// Post release the exclusive lock that the calling user currently holds on a file represented by a driveItem. After successful release, the file is immediately available for other users to lock and modify. Only the user who currently holds the lock can release it. The server identifies the lock from the file's current state (no lock identifier is required from the caller). +// returns a ODataError error when the service returns a 4XX or 5XX status code +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/driveitem-releaselock?view=graph-rest-beta +func (m *ItemItemsItemReleaseLockRequestBuilder) Post(ctx context.Context, requestConfiguration *ItemItemsItemReleaseLockRequestBuilderPostRequestConfiguration)(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation release the exclusive lock that the calling user currently holds on a file represented by a driveItem. After successful release, the file is immediately available for other users to lock and modify. Only the user who currently holds the lock can release it. The server identifies the lock from the file's current state (no lock identifier is required from the caller). +// returns a *RequestInformation when successful +func (m *ItemItemsItemReleaseLockRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *ItemItemsItemReleaseLockRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemsItemReleaseLockRequestBuilder when successful +func (m *ItemItemsItemReleaseLockRequestBuilder) WithUrl(rawUrl string)(*ItemItemsItemReleaseLockRequestBuilder) { + return NewItemItemsItemReleaseLockRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/groups/item_planner_plans_item_history_items_planner_history_item_item_request_builder.go b/groups/item_planner_plans_item_history_items_planner_history_item_item_request_builder.go index b5f7cef6545..e1f816a2095 100644 --- a/groups/item_planner_plans_item_history_items_planner_history_item_item_request_builder.go +++ b/groups/item_planner_plans_item_history_items_planner_history_item_item_request_builder.go @@ -21,7 +21,7 @@ type ItemPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderDeleteR // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// ItemPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderGetQueryParameters get historyItems from groups +// ItemPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderGetQueryParameters collection of history items for entities in the plan. Read-only. Nullable. type ItemPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderGetQueryParameters struct { // Expand related entities Expand []string "uriparametername:\"%24expand\"" @@ -73,7 +73,7 @@ func (m *ItemPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilder) D } return nil } -// Get get historyItems from groups +// Get collection of history items for entities in the plan. Read-only. Nullable. // returns a PlannerHistoryItemable when successful // returns a ODataError error when the service returns a 4XX or 5XX status code func (m *ItemPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerHistoryItemable, error) { @@ -124,7 +124,7 @@ func (m *ItemPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilder) T requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToGetRequestInformation get historyItems from groups +// ToGetRequestInformation collection of history items for entities in the plan. Read-only. Nullable. // returns a *RequestInformation when successful func (m *ItemPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/groups/item_planner_plans_item_history_items_request_builder.go b/groups/item_planner_plans_item_history_items_request_builder.go index b65b9f9a164..8315b1e53b7 100644 --- a/groups/item_planner_plans_item_history_items_request_builder.go +++ b/groups/item_planner_plans_item_history_items_request_builder.go @@ -14,7 +14,7 @@ import ( type ItemPlannerPlansItemHistoryItemsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ItemPlannerPlansItemHistoryItemsRequestBuilderGetQueryParameters get historyItems from groups +// ItemPlannerPlansItemHistoryItemsRequestBuilderGetQueryParameters collection of history items for entities in the plan. Read-only. Nullable. type ItemPlannerPlansItemHistoryItemsRequestBuilderGetQueryParameters struct { // Include count of items Count *bool "uriparametername:\"%24count\"" @@ -79,7 +79,7 @@ func NewItemPlannerPlansItemHistoryItemsRequestBuilder(rawUrl string, requestAda func (m *ItemPlannerPlansItemHistoryItemsRequestBuilder) Count()(*ItemPlannerPlansItemHistoryItemsCountRequestBuilder) { return NewItemPlannerPlansItemHistoryItemsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Get get historyItems from groups +// Get collection of history items for entities in the plan. Read-only. Nullable. // returns a PlannerHistoryItemCollectionResponseable when successful // returns a ODataError error when the service returns a 4XX or 5XX status code func (m *ItemPlannerPlansItemHistoryItemsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemPlannerPlansItemHistoryItemsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerHistoryItemCollectionResponseable, error) { @@ -119,7 +119,7 @@ func (m *ItemPlannerPlansItemHistoryItemsRequestBuilder) Post(ctx context.Contex } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerHistoryItemable), nil } -// ToGetRequestInformation get historyItems from groups +// ToGetRequestInformation collection of history items for entities in the plan. Read-only. Nullable. // returns a *RequestInformation when successful func (m *ItemPlannerPlansItemHistoryItemsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemPlannerPlansItemHistoryItemsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/groups/item_team_channels_item_planner_plans_item_history_items_planner_history_item_item_request_builder.go b/groups/item_team_channels_item_planner_plans_item_history_items_planner_history_item_item_request_builder.go index 2a35bddf0c4..f8a46979509 100644 --- a/groups/item_team_channels_item_planner_plans_item_history_items_planner_history_item_item_request_builder.go +++ b/groups/item_team_channels_item_planner_plans_item_history_items_planner_history_item_item_request_builder.go @@ -21,7 +21,7 @@ type ItemTeamChannelsItemPlannerPlansItemHistoryItemsPlannerHistoryItemItemReque // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// ItemTeamChannelsItemPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderGetQueryParameters get historyItems from groups +// ItemTeamChannelsItemPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderGetQueryParameters collection of history items for entities in the plan. Read-only. Nullable. type ItemTeamChannelsItemPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderGetQueryParameters struct { // Expand related entities Expand []string "uriparametername:\"%24expand\"" @@ -73,7 +73,7 @@ func (m *ItemTeamChannelsItemPlannerPlansItemHistoryItemsPlannerHistoryItemItemR } return nil } -// Get get historyItems from groups +// Get collection of history items for entities in the plan. Read-only. Nullable. // returns a PlannerHistoryItemable when successful // returns a ODataError error when the service returns a 4XX or 5XX status code func (m *ItemTeamChannelsItemPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemTeamChannelsItemPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerHistoryItemable, error) { @@ -124,7 +124,7 @@ func (m *ItemTeamChannelsItemPlannerPlansItemHistoryItemsPlannerHistoryItemItemR requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToGetRequestInformation get historyItems from groups +// ToGetRequestInformation collection of history items for entities in the plan. Read-only. Nullable. // returns a *RequestInformation when successful func (m *ItemTeamChannelsItemPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemTeamChannelsItemPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/groups/item_team_channels_item_planner_plans_item_history_items_request_builder.go b/groups/item_team_channels_item_planner_plans_item_history_items_request_builder.go index a8bd7f96ce7..0240d80cb61 100644 --- a/groups/item_team_channels_item_planner_plans_item_history_items_request_builder.go +++ b/groups/item_team_channels_item_planner_plans_item_history_items_request_builder.go @@ -14,7 +14,7 @@ import ( type ItemTeamChannelsItemPlannerPlansItemHistoryItemsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ItemTeamChannelsItemPlannerPlansItemHistoryItemsRequestBuilderGetQueryParameters get historyItems from groups +// ItemTeamChannelsItemPlannerPlansItemHistoryItemsRequestBuilderGetQueryParameters collection of history items for entities in the plan. Read-only. Nullable. type ItemTeamChannelsItemPlannerPlansItemHistoryItemsRequestBuilderGetQueryParameters struct { // Include count of items Count *bool "uriparametername:\"%24count\"" @@ -79,7 +79,7 @@ func NewItemTeamChannelsItemPlannerPlansItemHistoryItemsRequestBuilder(rawUrl st func (m *ItemTeamChannelsItemPlannerPlansItemHistoryItemsRequestBuilder) Count()(*ItemTeamChannelsItemPlannerPlansItemHistoryItemsCountRequestBuilder) { return NewItemTeamChannelsItemPlannerPlansItemHistoryItemsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Get get historyItems from groups +// Get collection of history items for entities in the plan. Read-only. Nullable. // returns a PlannerHistoryItemCollectionResponseable when successful // returns a ODataError error when the service returns a 4XX or 5XX status code func (m *ItemTeamChannelsItemPlannerPlansItemHistoryItemsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemTeamChannelsItemPlannerPlansItemHistoryItemsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerHistoryItemCollectionResponseable, error) { @@ -119,7 +119,7 @@ func (m *ItemTeamChannelsItemPlannerPlansItemHistoryItemsRequestBuilder) Post(ct } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerHistoryItemable), nil } -// ToGetRequestInformation get historyItems from groups +// ToGetRequestInformation collection of history items for entities in the plan. Read-only. Nullable. // returns a *RequestInformation when successful func (m *ItemTeamChannelsItemPlannerPlansItemHistoryItemsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemTeamChannelsItemPlannerPlansItemHistoryItemsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/groups/item_team_primary_channel_planner_plans_item_history_items_planner_history_item_item_request_builder.go b/groups/item_team_primary_channel_planner_plans_item_history_items_planner_history_item_item_request_builder.go index 38d5e6295d1..3809f19072f 100644 --- a/groups/item_team_primary_channel_planner_plans_item_history_items_planner_history_item_item_request_builder.go +++ b/groups/item_team_primary_channel_planner_plans_item_history_items_planner_history_item_item_request_builder.go @@ -21,7 +21,7 @@ type ItemTeamPrimaryChannelPlannerPlansItemHistoryItemsPlannerHistoryItemItemReq // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// ItemTeamPrimaryChannelPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderGetQueryParameters get historyItems from groups +// ItemTeamPrimaryChannelPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderGetQueryParameters collection of history items for entities in the plan. Read-only. Nullable. type ItemTeamPrimaryChannelPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderGetQueryParameters struct { // Expand related entities Expand []string "uriparametername:\"%24expand\"" @@ -73,7 +73,7 @@ func (m *ItemTeamPrimaryChannelPlannerPlansItemHistoryItemsPlannerHistoryItemIte } return nil } -// Get get historyItems from groups +// Get collection of history items for entities in the plan. Read-only. Nullable. // returns a PlannerHistoryItemable when successful // returns a ODataError error when the service returns a 4XX or 5XX status code func (m *ItemTeamPrimaryChannelPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemTeamPrimaryChannelPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerHistoryItemable, error) { @@ -124,7 +124,7 @@ func (m *ItemTeamPrimaryChannelPlannerPlansItemHistoryItemsPlannerHistoryItemIte requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToGetRequestInformation get historyItems from groups +// ToGetRequestInformation collection of history items for entities in the plan. Read-only. Nullable. // returns a *RequestInformation when successful func (m *ItemTeamPrimaryChannelPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemTeamPrimaryChannelPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/groups/item_team_primary_channel_planner_plans_item_history_items_request_builder.go b/groups/item_team_primary_channel_planner_plans_item_history_items_request_builder.go index 938ad02e1fc..ceb4c7a4ddf 100644 --- a/groups/item_team_primary_channel_planner_plans_item_history_items_request_builder.go +++ b/groups/item_team_primary_channel_planner_plans_item_history_items_request_builder.go @@ -14,7 +14,7 @@ import ( type ItemTeamPrimaryChannelPlannerPlansItemHistoryItemsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ItemTeamPrimaryChannelPlannerPlansItemHistoryItemsRequestBuilderGetQueryParameters get historyItems from groups +// ItemTeamPrimaryChannelPlannerPlansItemHistoryItemsRequestBuilderGetQueryParameters collection of history items for entities in the plan. Read-only. Nullable. type ItemTeamPrimaryChannelPlannerPlansItemHistoryItemsRequestBuilderGetQueryParameters struct { // Include count of items Count *bool "uriparametername:\"%24count\"" @@ -79,7 +79,7 @@ func NewItemTeamPrimaryChannelPlannerPlansItemHistoryItemsRequestBuilder(rawUrl func (m *ItemTeamPrimaryChannelPlannerPlansItemHistoryItemsRequestBuilder) Count()(*ItemTeamPrimaryChannelPlannerPlansItemHistoryItemsCountRequestBuilder) { return NewItemTeamPrimaryChannelPlannerPlansItemHistoryItemsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Get get historyItems from groups +// Get collection of history items for entities in the plan. Read-only. Nullable. // returns a PlannerHistoryItemCollectionResponseable when successful // returns a ODataError error when the service returns a 4XX or 5XX status code func (m *ItemTeamPrimaryChannelPlannerPlansItemHistoryItemsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemTeamPrimaryChannelPlannerPlansItemHistoryItemsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerHistoryItemCollectionResponseable, error) { @@ -119,7 +119,7 @@ func (m *ItemTeamPrimaryChannelPlannerPlansItemHistoryItemsRequestBuilder) Post( } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerHistoryItemable), nil } -// ToGetRequestInformation get historyItems from groups +// ToGetRequestInformation collection of history items for entities in the plan. Read-only. Nullable. // returns a *RequestInformation when successful func (m *ItemTeamPrimaryChannelPlannerPlansItemHistoryItemsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemTeamPrimaryChannelPlannerPlansItemHistoryItemsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/kiota-dom-export.txt b/kiota-dom-export.txt index 1ae5c270ce9..043a194a21b 100644 --- a/kiota-dom-export.txt +++ b/kiota-dom-export.txt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:55a7e74bb9583de9eecefe92a0cfee1a7465c24a37ef909770f2634702d35334 -size 110992808 +oid sha256:e8c26039992f4ea7f746053ab570df46bed2002cd558541ae246a706dd1b1364 +size 111342154 diff --git a/kiota-lock.json b/kiota-lock.json index 67544df8c9e..b1350e6ef3e 100644 --- a/kiota-lock.json +++ b/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "C83BBC2D664CC21A971EAB56A4269689874467BE15A0F7F5479EFE39578C464E6D6606C990346E5185BD25C64482E00E8158AFEBA28D029BE50E6108E4E4C0AB", + "descriptionHash": "36652CFA3AC725D4459415792B6045CEB6336952D3624160EEDF275826ECF3533832D3587F4DDB23C5B0A43AF69DA6D730B99CDF8F008D4CA714E84BAED200F5", "descriptionLocation": "../../msgraph-metadata/clean_beta_openapi/openapi.yaml", "lockFileVersion": "1.0.0", "kiotaVersion": "1.34.1", diff --git a/models/additional_storage_allocations.go b/models/additional_storage_allocations.go new file mode 100644 index 00000000000..9f182026dc7 --- /dev/null +++ b/models/additional_storage_allocations.go @@ -0,0 +1,190 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +type AdditionalStorageAllocations struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewAdditionalStorageAllocations instantiates a new AdditionalStorageAllocations and sets the default values. +func NewAdditionalStorageAllocations()(*AdditionalStorageAllocations) { + m := &AdditionalStorageAllocations{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateAdditionalStorageAllocationsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateAdditionalStorageAllocationsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAdditionalStorageAllocations(), 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. +// returns a map[string]any when successful +func (m *AdditionalStorageAllocations) 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. +// returns a BackingStore when successful +func (m *AdditionalStorageAllocations) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetBonusQuotaInBytes gets the bonusQuotaInBytes property value. The bonusQuotaInBytes property +// returns a *int64 when successful +func (m *AdditionalStorageAllocations) GetBonusQuotaInBytes()(*int64) { + val, err := m.GetBackingStore().Get("bonusQuotaInBytes") + if err != nil { + panic(err) + } + if val != nil { + return val.(*int64) + } + return nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *AdditionalStorageAllocations) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["bonusQuotaInBytes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetBonusQuotaInBytes(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["subscriptionQuotaInBytes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetSubscriptionQuotaInBytes(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +// returns a *string when successful +func (m *AdditionalStorageAllocations) GetOdataType()(*string) { + val, err := m.GetBackingStore().Get("odataType") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetSubscriptionQuotaInBytes gets the subscriptionQuotaInBytes property value. The subscriptionQuotaInBytes property +// returns a *int64 when successful +func (m *AdditionalStorageAllocations) GetSubscriptionQuotaInBytes()(*int64) { + val, err := m.GetBackingStore().Get("subscriptionQuotaInBytes") + if err != nil { + panic(err) + } + if val != nil { + return val.(*int64) + } + return nil +} +// Serialize serializes information the current object +func (m *AdditionalStorageAllocations) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt64Value("bonusQuotaInBytes", m.GetBonusQuotaInBytes()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("subscriptionQuotaInBytes", m.GetSubscriptionQuotaInBytes()) + 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 *AdditionalStorageAllocations) 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 *AdditionalStorageAllocations) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetBonusQuotaInBytes sets the bonusQuotaInBytes property value. The bonusQuotaInBytes property +func (m *AdditionalStorageAllocations) SetBonusQuotaInBytes(value *int64)() { + err := m.GetBackingStore().Set("bonusQuotaInBytes", value) + if err != nil { + panic(err) + } +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AdditionalStorageAllocations) SetOdataType(value *string)() { + err := m.GetBackingStore().Set("odataType", value) + if err != nil { + panic(err) + } +} +// SetSubscriptionQuotaInBytes sets the subscriptionQuotaInBytes property value. The subscriptionQuotaInBytes property +func (m *AdditionalStorageAllocations) SetSubscriptionQuotaInBytes(value *int64)() { + err := m.GetBackingStore().Set("subscriptionQuotaInBytes", value) + if err != nil { + panic(err) + } +} +type AdditionalStorageAllocationsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetBonusQuotaInBytes()(*int64) + GetOdataType()(*string) + GetSubscriptionQuotaInBytes()(*int64) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetBonusQuotaInBytes(value *int64)() + SetOdataType(value *string)() + SetSubscriptionQuotaInBytes(value *int64)() +} diff --git a/models/api_usage_report_enablement_status.go b/models/api_usage_report_enablement_status.go index 6b58792f9a2..ac0c1b4d6b9 100644 --- a/models/api_usage_report_enablement_status.go +++ b/models/api_usage_report_enablement_status.go @@ -79,7 +79,7 @@ func (m *ApiUsageReportEnablementStatus) GetFieldDeserializers()(map[string]func } return res } -// GetMetric gets the metric property value. The name of the API usage report metric. Currently, only EgressReport is supported. +// GetMetric gets the metric property value. The name of the API usage report metric. The supported values are: egressReport, throttlingReport. // returns a *string when successful func (m *ApiUsageReportEnablementStatus) GetMetric()(*string) { val, err := m.GetBackingStore().Get("metric") @@ -155,7 +155,7 @@ func (m *ApiUsageReportEnablementStatus) SetAdditionalData(value map[string]any) func (m *ApiUsageReportEnablementStatus) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { m.backingStore = value } -// SetMetric sets the metric property value. The name of the API usage report metric. Currently, only EgressReport is supported. +// SetMetric sets the metric property value. The name of the API usage report metric. The supported values are: egressReport, throttlingReport. func (m *ApiUsageReportEnablementStatus) SetMetric(value *string)() { err := m.GetBackingStore().Set("metric", value) if err != nil { diff --git a/models/browse_query_response_item.go b/models/browse_query_response_item.go index ece244768bd..3268df568b3 100644 --- a/models/browse_query_response_item.go +++ b/models/browse_query_response_item.go @@ -4,6 +4,7 @@ package models import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" ) @@ -43,10 +44,54 @@ func (m *BrowseQueryResponseItem) GetAdditionalData()(map[string]any) { func (m *BrowseQueryResponseItem) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { return m.backingStore } +// GetCreatedBy gets the createdBy property value. The createdBy property +// returns a IdentitySetable when successful +func (m *BrowseQueryResponseItem) GetCreatedBy()(IdentitySetable) { + val, err := m.GetBackingStore().Get("createdBy") + if err != nil { + panic(err) + } + if val != nil { + return val.(IdentitySetable) + } + return nil +} +// GetCreatedDateTime gets the createdDateTime property value. The createdDateTime property +// returns a *Time when successful +func (m *BrowseQueryResponseItem) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + val, err := m.GetBackingStore().Get("createdDateTime") + if err != nil { + panic(err) + } + if val != nil { + return val.(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + } + return nil +} // GetFieldDeserializers the deserialization information for the current model // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *BrowseQueryResponseItem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["createdBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreatedBy(val.(IdentitySetable)) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } res["itemKey"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -67,6 +112,26 @@ func (m *BrowseQueryResponseItem) GetFieldDeserializers()(map[string]func(i878a8 } return nil } + res["lastModifiedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedBy(val.(IdentitySetable)) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -143,6 +208,30 @@ func (m *BrowseQueryResponseItem) GetItemsCount()(*int32) { } return nil } +// GetLastModifiedBy gets the lastModifiedBy property value. The lastModifiedBy property +// returns a IdentitySetable when successful +func (m *BrowseQueryResponseItem) GetLastModifiedBy()(IdentitySetable) { + val, err := m.GetBackingStore().Get("lastModifiedBy") + if err != nil { + panic(err) + } + if val != nil { + return val.(IdentitySetable) + } + return nil +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The lastModifiedDateTime property +// returns a *Time when successful +func (m *BrowseQueryResponseItem) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + val, err := m.GetBackingStore().Get("lastModifiedDateTime") + if err != nil { + panic(err) + } + if val != nil { + return val.(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + } + return nil +} // GetName gets the name property value. The name of the item. // returns a *string when successful func (m *BrowseQueryResponseItem) GetName()(*string) { @@ -205,6 +294,18 @@ func (m *BrowseQueryResponseItem) GetWebUrl()(*string) { } // Serialize serializes information the current object func (m *BrowseQueryResponseItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("createdBy", m.GetCreatedBy()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } { err := writer.WriteStringValue("itemKey", m.GetItemKey()) if err != nil { @@ -217,6 +318,18 @@ func (m *BrowseQueryResponseItem) Serialize(writer i878a80d2330e89d26896388a3f48 return err } } + { + err := writer.WriteObjectValue("lastModifiedBy", m.GetLastModifiedBy()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } { err := writer.WriteStringValue("name", m.GetName()) if err != nil { @@ -267,6 +380,20 @@ func (m *BrowseQueryResponseItem) SetAdditionalData(value map[string]any)() { func (m *BrowseQueryResponseItem) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { m.backingStore = value } +// SetCreatedBy sets the createdBy property value. The createdBy property +func (m *BrowseQueryResponseItem) SetCreatedBy(value IdentitySetable)() { + err := m.GetBackingStore().Set("createdBy", value) + if err != nil { + panic(err) + } +} +// SetCreatedDateTime sets the createdDateTime property value. The createdDateTime property +func (m *BrowseQueryResponseItem) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + err := m.GetBackingStore().Set("createdDateTime", value) + if err != nil { + panic(err) + } +} // SetItemKey sets the itemKey property value. Unique identifier of the returned item. func (m *BrowseQueryResponseItem) SetItemKey(value *string)() { err := m.GetBackingStore().Set("itemKey", value) @@ -281,6 +408,20 @@ func (m *BrowseQueryResponseItem) SetItemsCount(value *int32)() { panic(err) } } +// SetLastModifiedBy sets the lastModifiedBy property value. The lastModifiedBy property +func (m *BrowseQueryResponseItem) SetLastModifiedBy(value IdentitySetable)() { + err := m.GetBackingStore().Set("lastModifiedBy", value) + if err != nil { + panic(err) + } +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *BrowseQueryResponseItem) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + err := m.GetBackingStore().Set("lastModifiedDateTime", value) + if err != nil { + panic(err) + } +} // SetName sets the name property value. The name of the item. func (m *BrowseQueryResponseItem) SetName(value *string)() { err := m.GetBackingStore().Set("name", value) @@ -321,16 +462,24 @@ type BrowseQueryResponseItemable interface { ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetCreatedBy()(IdentitySetable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) GetItemKey()(*string) GetItemsCount()(*int32) + GetLastModifiedBy()(IdentitySetable) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) GetName()(*string) GetOdataType()(*string) GetSizeInBytes()(*string) GetTypeEscaped()(*BrowseQueryResponseItemType) GetWebUrl()(*string) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetCreatedBy(value IdentitySetable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() SetItemKey(value *string)() SetItemsCount(value *int32)() + SetLastModifiedBy(value IdentitySetable)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() SetName(value *string)() SetOdataType(value *string)() SetSizeInBytes(value *string)() diff --git a/models/cloud_p_c.go b/models/cloud_p_c.go index 396163bfa33..3de51c2915e 100644 --- a/models/cloud_p_c.go +++ b/models/cloud_p_c.go @@ -285,6 +285,16 @@ func (m *CloudPC) GetFieldDeserializers()(map[string]func(i878a80d2330e89d268963 } return nil } + res["lastLogoffDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastLogoffDateTime(val) + } + return nil + } res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetTimeValue() if err != nil { @@ -621,6 +631,18 @@ func (m *CloudPC) GetLastLoginResult()(CloudPcLoginResultable) { } return nil } +// GetLastLogoffDateTime gets the lastLogoffDateTime property value. The date and time when the user last logged off from the Cloud PC session. Returns null if the user has never established a session or if a session is currently active. The timestamp is shown in ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. Returned only when explicitly selected with $select. +// returns a *Time when successful +func (m *CloudPC) GetLastLogoffDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + val, err := m.GetBackingStore().Get("lastLogoffDateTime") + if err != nil { + panic(err) + } + if val != nil { + return val.(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + } + return nil +} // GetLastModifiedDateTime gets the lastModifiedDateTime property value. The last modified date and time of the Cloud PC. 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. // returns a *Time when successful func (m *CloudPC) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { @@ -1019,6 +1041,12 @@ func (m *CloudPC) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010 return err } } + { + err = writer.WriteTimeValue("lastLogoffDateTime", m.GetLastLogoffDateTime()) + if err != nil { + return err + } + } { err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) if err != nil { @@ -1290,6 +1318,13 @@ func (m *CloudPC) SetLastLoginResult(value CloudPcLoginResultable)() { panic(err) } } +// SetLastLogoffDateTime sets the lastLogoffDateTime property value. The date and time when the user last logged off from the Cloud PC session. Returns null if the user has never established a session or if a session is currently active. The timestamp is shown in ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. Returned only when explicitly selected with $select. +func (m *CloudPC) SetLastLogoffDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + err := m.GetBackingStore().Set("lastLogoffDateTime", value) + if err != nil { + panic(err) + } +} // SetLastModifiedDateTime sets the lastModifiedDateTime property value. The last modified date and time of the Cloud PC. 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 *CloudPC) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { err := m.GetBackingStore().Set("lastModifiedDateTime", value) @@ -1483,6 +1518,7 @@ type CloudPCable interface { GetImageDisplayName()(*string) GetIsDisasterRecoveryActive()(*bool) GetLastLoginResult()(CloudPcLoginResultable) + GetLastLogoffDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) GetLastRemoteActionResult()(CloudPcRemoteActionResultable) GetManagedDeviceId()(*string) @@ -1523,6 +1559,7 @@ type CloudPCable interface { SetImageDisplayName(value *string)() SetIsDisasterRecoveryActive(value *bool)() SetLastLoginResult(value CloudPcLoginResultable)() + SetLastLogoffDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() SetLastRemoteActionResult(value CloudPcRemoteActionResultable)() SetManagedDeviceId(value *string)() diff --git a/models/cloud_pc_organization_action_detail.go b/models/cloud_pc_organization_action_detail.go index 95e011e7289..893c3b7c034 100644 --- a/models/cloud_pc_organization_action_detail.go +++ b/models/cloud_pc_organization_action_detail.go @@ -43,7 +43,7 @@ func (m *CloudPcOrganizationActionDetail) GetAdditionalData()(map[string]any) { func (m *CloudPcOrganizationActionDetail) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { return m.backingStore } -// GetErrorDescription gets the errorDescription property value. The errorDescription property +// GetErrorDescription gets the errorDescription property value. More user-friendly error details. For example, Activation failed due to invalid billing plan. // returns a *string when successful func (m *CloudPcOrganizationActionDetail) GetErrorDescription()(*string) { val, err := m.GetBackingStore().Get("errorDescription") @@ -155,7 +155,7 @@ func (m *CloudPcOrganizationActionDetail) SetAdditionalData(value map[string]any func (m *CloudPcOrganizationActionDetail) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { m.backingStore = value } -// SetErrorDescription sets the errorDescription property value. The errorDescription property +// SetErrorDescription sets the errorDescription property value. More user-friendly error details. For example, Activation failed due to invalid billing plan. func (m *CloudPcOrganizationActionDetail) SetErrorDescription(value *string)() { err := m.GetBackingStore().Set("errorDescription", value) if err != nil { diff --git a/models/cloud_pc_service_plan.go b/models/cloud_pc_service_plan.go index 3b2d2c5426b..767b918dde8 100644 --- a/models/cloud_pc_service_plan.go +++ b/models/cloud_pc_service_plan.go @@ -144,7 +144,7 @@ func (m *CloudPcServicePlan) GetRamInGB()(*int32) { } return nil } -// GetStorageInGB gets the storageInGB property value. The size of the OS Disk in GB. Read-only. +// GetStorageInGB gets the storageInGB property value. The size of the operating system disk in GB. Read-only. // returns a *int32 when successful func (m *CloudPcServicePlan) GetStorageInGB()(*int32) { val, err := m.GetBackingStore().Get("storageInGB") @@ -284,7 +284,7 @@ func (m *CloudPcServicePlan) SetRamInGB(value *int32)() { panic(err) } } -// SetStorageInGB sets the storageInGB property value. The size of the OS Disk in GB. Read-only. +// SetStorageInGB sets the storageInGB property value. The size of the operating system disk in GB. Read-only. func (m *CloudPcServicePlan) SetStorageInGB(value *int32)() { err := m.GetBackingStore().Set("storageInGB", value) if err != nil { diff --git a/models/desk.go b/models/desk.go index 208cae0240e..6dbf44e0076 100644 --- a/models/desk.go +++ b/models/desk.go @@ -80,6 +80,22 @@ func (m *Desk) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a } return nil } + res["servicePlans"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePlaceServicePlanInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PlaceServicePlanInfoable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(PlaceServicePlanInfoable) + } + } + m.SetServicePlans(res) + } + return nil + } return res } // GetHeightAdjustableState gets the heightAdjustableState property value. The heightAdjustableState property @@ -118,6 +134,18 @@ func (m *Desk) GetMode()(PlaceModeable) { } return nil } +// GetServicePlans gets the servicePlans property value. Service plans associated with the desk. +// returns a []PlaceServicePlanInfoable when successful +func (m *Desk) GetServicePlans()([]PlaceServicePlanInfoable) { + val, err := m.GetBackingStore().Get("servicePlans") + if err != nil { + panic(err) + } + if val != nil { + return val.([]PlaceServicePlanInfoable) + } + return nil +} // Serialize serializes information the current object func (m *Desk) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { err := m.Place.Serialize(writer) @@ -149,6 +177,18 @@ func (m *Desk) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c49 return err } } + if m.GetServicePlans() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetServicePlans())) + for i, v := range m.GetServicePlans() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err = writer.WriteCollectionOfObjectValues("servicePlans", cast) + if err != nil { + return err + } + } return nil } // SetDisplayDeviceName sets the displayDeviceName property value. The name of the display device (for example, monitor or projector) that is available at the desk. @@ -179,6 +219,13 @@ func (m *Desk) SetMode(value PlaceModeable)() { panic(err) } } +// SetServicePlans sets the servicePlans property value. Service plans associated with the desk. +func (m *Desk) SetServicePlans(value []PlaceServicePlanInfoable)() { + err := m.GetBackingStore().Set("servicePlans", value) + if err != nil { + panic(err) + } +} type Deskable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable Placeable @@ -186,8 +233,10 @@ type Deskable interface { GetHeightAdjustableState()(*PlaceFeatureEnablement) GetMailboxDetails()(MailboxDetailsable) GetMode()(PlaceModeable) + GetServicePlans()([]PlaceServicePlanInfoable) SetDisplayDeviceName(value *string)() SetHeightAdjustableState(value *PlaceFeatureEnablement)() SetMailboxDetails(value MailboxDetailsable)() SetMode(value PlaceModeable)() + SetServicePlans(value []PlaceServicePlanInfoable)() } diff --git a/models/device_sync_status_response.go b/models/device_sync_status_response.go new file mode 100644 index 00000000000..e51c3742f60 --- /dev/null +++ b/models/device_sync_status_response.go @@ -0,0 +1,184 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +type DeviceSyncStatusResponse struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewDeviceSyncStatusResponse instantiates a new DeviceSyncStatusResponse and sets the default values. +func NewDeviceSyncStatusResponse()(*DeviceSyncStatusResponse) { + m := &DeviceSyncStatusResponse{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateDeviceSyncStatusResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateDeviceSyncStatusResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceSyncStatusResponse(), 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. +// returns a map[string]any when successful +func (m *DeviceSyncStatusResponse) 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. +// returns a BackingStore when successful +func (m *DeviceSyncStatusResponse) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetComponents gets the components property value. Indicates the collection of sync component statuses representing infrastructure and policy progress. Each entry represents a component that has started reporting during this sync operation. Components appear in the collection only after they begin executing. Read-only. Not nullable. +// returns a []SyncComponentable when successful +func (m *DeviceSyncStatusResponse) GetComponents()([]SyncComponentable) { + val, err := m.GetBackingStore().Get("components") + if err != nil { + panic(err) + } + if val != nil { + return val.([]SyncComponentable) + } + return nil +} +// GetDeviceId gets the deviceId property value. Indicates the managed device identifier. Used to correlate this sync status snapshot with the device that was synced. This is the same id used in the managedDevice entity. Example: 'd1e2f3a4-b5c6-7890-abcd-ef1234567890'. Read-only. Not nullable. +// returns a *string when successful +func (m *DeviceSyncStatusResponse) GetDeviceId()(*string) { + val, err := m.GetBackingStore().Get("deviceId") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *DeviceSyncStatusResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["components"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSyncComponentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SyncComponentable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(SyncComponentable) + } + } + m.SetComponents(res) + } + return nil + } + res["deviceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceId(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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +// returns a *string when successful +func (m *DeviceSyncStatusResponse) GetOdataType()(*string) { + val, err := m.GetBackingStore().Get("odataType") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// Serialize serializes information the current object +func (m *DeviceSyncStatusResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *DeviceSyncStatusResponse) 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 *DeviceSyncStatusResponse) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetComponents sets the components property value. Indicates the collection of sync component statuses representing infrastructure and policy progress. Each entry represents a component that has started reporting during this sync operation. Components appear in the collection only after they begin executing. Read-only. Not nullable. +func (m *DeviceSyncStatusResponse) SetComponents(value []SyncComponentable)() { + err := m.GetBackingStore().Set("components", value) + if err != nil { + panic(err) + } +} +// SetDeviceId sets the deviceId property value. Indicates the managed device identifier. Used to correlate this sync status snapshot with the device that was synced. This is the same id used in the managedDevice entity. Example: 'd1e2f3a4-b5c6-7890-abcd-ef1234567890'. Read-only. Not nullable. +func (m *DeviceSyncStatusResponse) SetDeviceId(value *string)() { + err := m.GetBackingStore().Set("deviceId", value) + if err != nil { + panic(err) + } +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeviceSyncStatusResponse) SetOdataType(value *string)() { + err := m.GetBackingStore().Set("odataType", value) + if err != nil { + panic(err) + } +} +type DeviceSyncStatusResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetComponents()([]SyncComponentable) + GetDeviceId()(*string) + GetOdataType()(*string) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetComponents(value []SyncComponentable)() + SetDeviceId(value *string)() + SetOdataType(value *string)() +} diff --git a/models/externalconnectors/external_item.go b/models/externalconnectors/external_item.go index bfa5b8073f8..4cc6f67260d 100644 --- a/models/externalconnectors/external_item.go +++ b/models/externalconnectors/external_item.go @@ -127,7 +127,7 @@ func (m *ExternalItem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d2 } return res } -// GetInformationProtectionLabel gets the informationProtectionLabel property value. The informationProtectionLabel property +// GetInformationProtectionLabel gets the informationProtectionLabel property value. Specifies the Microsoft Purview sensitivity label for the item. Set the sensitivityLabelId property to the GUID of a Purview sensitivity label. The service then applies the label rules to the item. To get the label GUID, use the Get sensitivityLabel API or the Get-Label PowerShell command. Optional. // returns a ExternalItemInformationProtectionLabelable when successful func (m *ExternalItem) GetInformationProtectionLabel()(ExternalItemInformationProtectionLabelable) { val, err := m.GetBackingStore().Get("informationProtectionLabel") @@ -222,7 +222,7 @@ func (m *ExternalItem) SetContent(value ExternalItemContentable)() { panic(err) } } -// SetInformationProtectionLabel sets the informationProtectionLabel property value. The informationProtectionLabel property +// SetInformationProtectionLabel sets the informationProtectionLabel property value. Specifies the Microsoft Purview sensitivity label for the item. Set the sensitivityLabelId property to the GUID of a Purview sensitivity label. The service then applies the label rules to the item. To get the label GUID, use the Get sensitivityLabel API or the Get-Label PowerShell command. Optional. func (m *ExternalItem) SetInformationProtectionLabel(value ExternalItemInformationProtectionLabelable)() { err := m.GetBackingStore().Set("informationProtectionLabel", value) if err != nil { diff --git a/models/externalconnectors/external_item_information_protection_label.go b/models/externalconnectors/external_item_information_protection_label.go index 0015a34ce4e..0e855b5891f 100644 --- a/models/externalconnectors/external_item_information_protection_label.go +++ b/models/externalconnectors/external_item_information_protection_label.go @@ -81,7 +81,7 @@ func (m *ExternalItemInformationProtectionLabel) GetOdataType()(*string) { } return nil } -// GetSensitivityLabelId gets the sensitivityLabelId property value. The sensitivityLabelId property +// GetSensitivityLabelId gets the sensitivityLabelId property value. The GUID of the Purview sensitivity label. To get the label GUID, use the Get sensitivityLabel API or the Get-Label PowerShell command. // returns a *string when successful func (m *ExternalItemInformationProtectionLabel) GetSensitivityLabelId()(*string) { val, err := m.GetBackingStore().Get("sensitivityLabelId") @@ -133,7 +133,7 @@ func (m *ExternalItemInformationProtectionLabel) SetOdataType(value *string)() { panic(err) } } -// SetSensitivityLabelId sets the sensitivityLabelId property value. The sensitivityLabelId property +// SetSensitivityLabelId sets the sensitivityLabelId property value. The GUID of the Purview sensitivity label. To get the label GUID, use the Get sensitivityLabel API or the Get-Label PowerShell command. func (m *ExternalItemInformationProtectionLabel) SetSensitivityLabelId(value *string)() { err := m.GetBackingStore().Set("sensitivityLabelId", value) if err != nil { diff --git a/models/family_member_storage_quota.go b/models/family_member_storage_quota.go new file mode 100644 index 00000000000..0ab254b62ff --- /dev/null +++ b/models/family_member_storage_quota.go @@ -0,0 +1,227 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +type FamilyMemberStorageQuota struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewFamilyMemberStorageQuota instantiates a new FamilyMemberStorageQuota and sets the default values. +func NewFamilyMemberStorageQuota()(*FamilyMemberStorageQuota) { + m := &FamilyMemberStorageQuota{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateFamilyMemberStorageQuotaFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateFamilyMemberStorageQuotaFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFamilyMemberStorageQuota(), nil +} +// GetAdditionalAllocations gets the additionalAllocations property value. The additionalAllocations property +// returns a AdditionalStorageAllocationsable when successful +func (m *FamilyMemberStorageQuota) GetAdditionalAllocations()(AdditionalStorageAllocationsable) { + val, err := m.GetBackingStore().Get("additionalAllocations") + if err != nil { + panic(err) + } + if val != nil { + return val.(AdditionalStorageAllocationsable) + } + 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. +// returns a map[string]any when successful +func (m *FamilyMemberStorageQuota) 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. +// returns a BackingStore when successful +func (m *FamilyMemberStorageQuota) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *FamilyMemberStorageQuota) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["additionalAllocations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAdditionalStorageAllocationsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAdditionalAllocations(val.(AdditionalStorageAllocationsable)) + } + 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["used"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetUsed(val) + } + return nil + } + res["user"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUser(val.(Identityable)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +// returns a *string when successful +func (m *FamilyMemberStorageQuota) GetOdataType()(*string) { + val, err := m.GetBackingStore().Get("odataType") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetUsed gets the used property value. The used property +// returns a *int64 when successful +func (m *FamilyMemberStorageQuota) GetUsed()(*int64) { + val, err := m.GetBackingStore().Get("used") + if err != nil { + panic(err) + } + if val != nil { + return val.(*int64) + } + return nil +} +// GetUser gets the user property value. The user property +// returns a Identityable when successful +func (m *FamilyMemberStorageQuota) GetUser()(Identityable) { + val, err := m.GetBackingStore().Get("user") + if err != nil { + panic(err) + } + if val != nil { + return val.(Identityable) + } + return nil +} +// Serialize serializes information the current object +func (m *FamilyMemberStorageQuota) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("additionalAllocations", m.GetAdditionalAllocations()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("used", m.GetUsed()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("user", m.GetUser()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalAllocations sets the additionalAllocations property value. The additionalAllocations property +func (m *FamilyMemberStorageQuota) SetAdditionalAllocations(value AdditionalStorageAllocationsable)() { + err := m.GetBackingStore().Set("additionalAllocations", 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 *FamilyMemberStorageQuota) 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 *FamilyMemberStorageQuota) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *FamilyMemberStorageQuota) SetOdataType(value *string)() { + err := m.GetBackingStore().Set("odataType", value) + if err != nil { + panic(err) + } +} +// SetUsed sets the used property value. The used property +func (m *FamilyMemberStorageQuota) SetUsed(value *int64)() { + err := m.GetBackingStore().Set("used", value) + if err != nil { + panic(err) + } +} +// SetUser sets the user property value. The user property +func (m *FamilyMemberStorageQuota) SetUser(value Identityable)() { + err := m.GetBackingStore().Set("user", value) + if err != nil { + panic(err) + } +} +type FamilyMemberStorageQuotaable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdditionalAllocations()(AdditionalStorageAllocationsable) + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetOdataType()(*string) + GetUsed()(*int64) + GetUser()(Identityable) + SetAdditionalAllocations(value AdditionalStorageAllocationsable)() + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetOdataType(value *string)() + SetUsed(value *int64)() + SetUser(value Identityable)() +} diff --git a/models/identitygovernance/guest_sponsor_trigger.go b/models/identitygovernance/guest_sponsor_trigger.go new file mode 100644 index 00000000000..b32a4c2fb43 --- /dev/null +++ b/models/identitygovernance/guest_sponsor_trigger.go @@ -0,0 +1,81 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package identitygovernance + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type GuestSponsorTrigger struct { + WorkflowExecutionTrigger +} +// NewGuestSponsorTrigger instantiates a new GuestSponsorTrigger and sets the default values. +func NewGuestSponsorTrigger()(*GuestSponsorTrigger) { + m := &GuestSponsorTrigger{ + WorkflowExecutionTrigger: *NewWorkflowExecutionTrigger(), + } + odataTypeValue := "#microsoft.graph.identityGovernance.guestSponsorTrigger" + m.SetOdataType(&odataTypeValue) + return m +} +// CreateGuestSponsorTriggerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateGuestSponsorTriggerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGuestSponsorTrigger(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *GuestSponsorTrigger) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.WorkflowExecutionTrigger.GetFieldDeserializers() + res["minimumRequiredSponsors"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMinimumRequiredSponsors(val) + } + return nil + } + return res +} +// GetMinimumRequiredSponsors gets the minimumRequiredSponsors property value. The minimumRequiredSponsors property +// returns a *int32 when successful +func (m *GuestSponsorTrigger) GetMinimumRequiredSponsors()(*int32) { + val, err := m.GetBackingStore().Get("minimumRequiredSponsors") + if err != nil { + panic(err) + } + if val != nil { + return val.(*int32) + } + return nil +} +// Serialize serializes information the current object +func (m *GuestSponsorTrigger) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.WorkflowExecutionTrigger.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("minimumRequiredSponsors", m.GetMinimumRequiredSponsors()) + if err != nil { + return err + } + } + return nil +} +// SetMinimumRequiredSponsors sets the minimumRequiredSponsors property value. The minimumRequiredSponsors property +func (m *GuestSponsorTrigger) SetMinimumRequiredSponsors(value *int32)() { + err := m.GetBackingStore().Set("minimumRequiredSponsors", value) + if err != nil { + panic(err) + } +} +type GuestSponsorTriggerable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + WorkflowExecutionTriggerable + GetMinimumRequiredSponsors()(*int32) + SetMinimumRequiredSponsors(value *int32)() +} diff --git a/models/identitygovernance/workflow_execution_trigger.go b/models/identitygovernance/workflow_execution_trigger.go index 8357af3cc19..c966f828f3c 100644 --- a/models/identitygovernance/workflow_execution_trigger.go +++ b/models/identitygovernance/workflow_execution_trigger.go @@ -37,6 +37,8 @@ func CreateWorkflowExecutionTriggerFromDiscriminatorValue(parseNode i878a80d2330 switch *mappingValue { case "#microsoft.graph.identityGovernance.attributeChangeTrigger": return NewAttributeChangeTrigger(), nil + case "#microsoft.graph.identityGovernance.guestSponsorTrigger": + return NewGuestSponsorTrigger(), nil case "#microsoft.graph.identityGovernance.membershipChangeTrigger": return NewMembershipChangeTrigger(), nil case "#microsoft.graph.identityGovernance.timeBasedAttributeTrigger": diff --git a/models/place.go b/models/place.go index 3a3a0737ae2..97330673027 100644 --- a/models/place.go +++ b/models/place.go @@ -206,6 +206,16 @@ func (m *Place) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388 } return nil } + res["placeId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPlaceId(val) + } + return nil + } res["tags"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetCollectionOfPrimitiveValues("string") if err != nil { @@ -284,6 +294,18 @@ func (m *Place) GetPhone()(*string) { } return nil } +// GetPlaceId gets the placeId property value. A stable service-level identifier for the place object used by Places workloads. +// returns a *string when successful +func (m *Place) GetPlaceId()(*string) { + val, err := m.GetBackingStore().Get("placeId") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} // GetTags gets the tags property value. Custom tags that are associated with the place for categorization or filtering. // returns a []string when successful func (m *Place) GetTags()([]string) { @@ -368,6 +390,12 @@ func (m *Place) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c4 return err } } + { + err = writer.WriteStringValue("placeId", m.GetPlaceId()) + if err != nil { + return err + } + } if m.GetTags() != nil { err = writer.WriteCollectionOfStringValues("tags", m.GetTags()) if err != nil { @@ -439,6 +467,13 @@ func (m *Place) SetPhone(value *string)() { panic(err) } } +// SetPlaceId sets the placeId property value. A stable service-level identifier for the place object used by Places workloads. +func (m *Place) SetPlaceId(value *string)() { + err := m.GetBackingStore().Set("placeId", value) + if err != nil { + panic(err) + } +} // SetTags sets the tags property value. Custom tags that are associated with the place for categorization or filtering. func (m *Place) SetTags(value []string)() { err := m.GetBackingStore().Set("tags", value) @@ -458,6 +493,7 @@ type Placeable interface { GetLabel()(*string) GetParentId()(*string) GetPhone()(*string) + GetPlaceId()(*string) GetTags()([]string) SetAddress(value PhysicalAddressable)() SetCheckIns(value []CheckInClaimable)() @@ -468,5 +504,6 @@ type Placeable interface { SetLabel(value *string)() SetParentId(value *string)() SetPhone(value *string)() + SetPlaceId(value *string)() SetTags(value []string)() } diff --git a/models/place_service_plan_info.go b/models/place_service_plan_info.go new file mode 100644 index 00000000000..2177dc2a1dd --- /dev/null +++ b/models/place_service_plan_info.go @@ -0,0 +1,153 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +type PlaceServicePlanInfo struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewPlaceServicePlanInfo instantiates a new PlaceServicePlanInfo and sets the default values. +func NewPlaceServicePlanInfo()(*PlaceServicePlanInfo) { + m := &PlaceServicePlanInfo{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePlaceServicePlanInfoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePlaceServicePlanInfoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlaceServicePlanInfo(), 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. +// returns a map[string]any when successful +func (m *PlaceServicePlanInfo) 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. +// returns a BackingStore when successful +func (m *PlaceServicePlanInfo) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PlaceServicePlanInfo) 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["servicePlanId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetServicePlanId(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +// returns a *string when successful +func (m *PlaceServicePlanInfo) GetOdataType()(*string) { + val, err := m.GetBackingStore().Get("odataType") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetServicePlanId gets the servicePlanId property value. The service plan identifier. +// returns a *string when successful +func (m *PlaceServicePlanInfo) GetServicePlanId()(*string) { + val, err := m.GetBackingStore().Get("servicePlanId") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// Serialize serializes information the current object +func (m *PlaceServicePlanInfo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("servicePlanId", m.GetServicePlanId()) + 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 *PlaceServicePlanInfo) 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 *PlaceServicePlanInfo) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PlaceServicePlanInfo) SetOdataType(value *string)() { + err := m.GetBackingStore().Set("odataType", value) + if err != nil { + panic(err) + } +} +// SetServicePlanId sets the servicePlanId property value. The service plan identifier. +func (m *PlaceServicePlanInfo) SetServicePlanId(value *string)() { + err := m.GetBackingStore().Set("servicePlanId", value) + if err != nil { + panic(err) + } +} +type PlaceServicePlanInfoable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetOdataType()(*string) + GetServicePlanId()(*string) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetOdataType(value *string)() + SetServicePlanId(value *string)() +} diff --git a/models/planner_history_item.go b/models/planner_history_item.go index 5f0c79c0d9a..7257e2c9be1 100644 --- a/models/planner_history_item.go +++ b/models/planner_history_item.go @@ -41,7 +41,7 @@ func CreatePlannerHistoryItemFromDiscriminatorValue(parseNode i878a80d2330e89d26 } return NewPlannerHistoryItem(), nil } -// GetActor gets the actor property value. The actor property +// GetActor gets the actor property value. The identity of the user or application that performed the change. // returns a IdentitySetable when successful func (m *PlannerHistoryItem) GetActor()(IdentitySetable) { val, err := m.GetBackingStore().Get("actor") @@ -53,7 +53,7 @@ func (m *PlannerHistoryItem) GetActor()(IdentitySetable) { } return nil } -// GetEntityId gets the entityId property value. The entityId property +// GetEntityId gets the entityId property value. The ID of the entity that was changed. // returns a *string when successful func (m *PlannerHistoryItem) GetEntityId()(*string) { val, err := m.GetBackingStore().Get("entityId") @@ -155,7 +155,7 @@ func (m *PlannerHistoryItem) GetFieldDeserializers()(map[string]func(i878a80d233 } return res } -// GetOccurredDateTime gets the occurredDateTime property value. The occurredDateTime property +// GetOccurredDateTime gets the occurredDateTime property value. The date and time when the change occurred. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2024, is 2024-01-01T00:00:00Z. // returns a *Time when successful func (m *PlannerHistoryItem) GetOccurredDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { val, err := m.GetBackingStore().Get("occurredDateTime") @@ -167,7 +167,7 @@ func (m *PlannerHistoryItem) GetOccurredDateTime()(*i336074805fc853987abe6f7fe3a } return nil } -// GetPlanId gets the planId property value. The planId property +// GetPlanId gets the planId property value. The ID of the plan that contains the changed entity. // returns a *string when successful func (m *PlannerHistoryItem) GetPlanId()(*string) { val, err := m.GetBackingStore().Get("planId") @@ -225,14 +225,14 @@ func (m *PlannerHistoryItem) Serialize(writer i878a80d2330e89d26896388a3f487eef2 } return nil } -// SetActor sets the actor property value. The actor property +// SetActor sets the actor property value. The identity of the user or application that performed the change. func (m *PlannerHistoryItem) SetActor(value IdentitySetable)() { err := m.GetBackingStore().Set("actor", value) if err != nil { panic(err) } } -// SetEntityId sets the entityId property value. The entityId property +// SetEntityId sets the entityId property value. The ID of the entity that was changed. func (m *PlannerHistoryItem) SetEntityId(value *string)() { err := m.GetBackingStore().Set("entityId", value) if err != nil { @@ -253,14 +253,14 @@ func (m *PlannerHistoryItem) SetEventType(value *HistoryEventType)() { panic(err) } } -// SetOccurredDateTime sets the occurredDateTime property value. The occurredDateTime property +// SetOccurredDateTime sets the occurredDateTime property value. The date and time when the change occurred. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2024, is 2024-01-01T00:00:00Z. func (m *PlannerHistoryItem) SetOccurredDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { err := m.GetBackingStore().Set("occurredDateTime", value) if err != nil { panic(err) } } -// SetPlanId sets the planId property value. The planId property +// SetPlanId sets the planId property value. The ID of the plan that contains the changed entity. func (m *PlannerHistoryItem) SetPlanId(value *string)() { err := m.GetBackingStore().Set("planId", value) if err != nil { diff --git a/models/planner_plan.go b/models/planner_plan.go index 41b709508a2..f1e40e6dacf 100644 --- a/models/planner_plan.go +++ b/models/planner_plan.go @@ -311,7 +311,7 @@ func (m *PlannerPlan) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26 } return res } -// GetHistoryItems gets the historyItems property value. The historyItems property +// GetHistoryItems gets the historyItems property value. Collection of history items for entities in the plan. Read-only. Nullable. // returns a []PlannerHistoryItemable when successful func (m *PlannerPlan) GetHistoryItems()([]PlannerHistoryItemable) { val, err := m.GetBackingStore().Get("historyItems") @@ -568,7 +568,7 @@ func (m *PlannerPlan) SetDetails(value PlannerPlanDetailsable)() { panic(err) } } -// SetHistoryItems sets the historyItems property value. The historyItems property +// SetHistoryItems sets the historyItems property value. Collection of history items for entities in the plan. Read-only. Nullable. func (m *PlannerPlan) SetHistoryItems(value []PlannerHistoryItemable)() { err := m.GetBackingStore().Set("historyItems", value) if err != nil { diff --git a/models/planner_task_data.go b/models/planner_task_data.go index c34ff0d94e8..22b33794ce1 100644 --- a/models/planner_task_data.go +++ b/models/planner_task_data.go @@ -26,7 +26,7 @@ func NewPlannerTaskData()(*PlannerTaskData) { func CreatePlannerTaskDataFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewPlannerTaskData(), nil } -// GetActiveChecklistItemCount gets the activeChecklistItemCount property value. The activeChecklistItemCount property +// GetActiveChecklistItemCount gets the activeChecklistItemCount property value. The number of incomplete checklist items whose value is set to false. // returns a *int32 when successful func (m *PlannerTaskData) GetActiveChecklistItemCount()(*int32) { val, err := m.GetBackingStore().Get("activeChecklistItemCount") @@ -51,7 +51,7 @@ func (m *PlannerTaskData) GetAdditionalData()(map[string]any) { } return val.(map[string]any) } -// GetAppliedCategories gets the appliedCategories property value. The appliedCategories property +// GetAppliedCategories gets the appliedCategories property value. The categories to which the task is applied. // returns a PlannerAppliedCategoriesable when successful func (m *PlannerTaskData) GetAppliedCategories()(PlannerAppliedCategoriesable) { val, err := m.GetBackingStore().Get("appliedCategories") @@ -63,7 +63,7 @@ func (m *PlannerTaskData) GetAppliedCategories()(PlannerAppliedCategoriesable) { } return nil } -// GetArchivalInfo gets the archivalInfo property value. The archivalInfo property +// GetArchivalInfo gets the archivalInfo property value. Information about who archived or unarchived the task and why. // returns a PlannerArchivalInfoable when successful func (m *PlannerTaskData) GetArchivalInfo()(PlannerArchivalInfoable) { val, err := m.GetBackingStore().Get("archivalInfo") @@ -75,7 +75,7 @@ func (m *PlannerTaskData) GetArchivalInfo()(PlannerArchivalInfoable) { } return nil } -// GetAssignments gets the assignments property value. The assignments property +// GetAssignments gets the assignments property value. The set of assignees the task is assigned to. // returns a PlannerAssignmentsable when successful func (m *PlannerTaskData) GetAssignments()(PlannerAssignmentsable) { val, err := m.GetBackingStore().Get("assignments") @@ -92,7 +92,7 @@ func (m *PlannerTaskData) GetAssignments()(PlannerAssignmentsable) { func (m *PlannerTaskData) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { return m.backingStore } -// GetBucketId gets the bucketId property value. The bucketId property +// GetBucketId gets the bucketId property value. Bucket ID to which the task belongs. The bucket needs to be in the same plan as the task. // returns a *string when successful func (m *PlannerTaskData) GetBucketId()(*string) { val, err := m.GetBackingStore().Get("bucketId") @@ -104,7 +104,7 @@ func (m *PlannerTaskData) GetBucketId()(*string) { } return nil } -// GetChecklistItemCount gets the checklistItemCount property value. The checklistItemCount property +// GetChecklistItemCount gets the checklistItemCount property value. The number of checklist items that are present on the task. // returns a *int32 when successful func (m *PlannerTaskData) GetChecklistItemCount()(*int32) { val, err := m.GetBackingStore().Get("checklistItemCount") @@ -116,7 +116,7 @@ func (m *PlannerTaskData) GetChecklistItemCount()(*int32) { } return nil } -// GetCompletedBy gets the completedBy property value. The completedBy property +// GetCompletedBy gets the completedBy property value. The identity of the user that completed the task. // returns a IdentitySetable when successful func (m *PlannerTaskData) GetCompletedBy()(IdentitySetable) { val, err := m.GetBackingStore().Get("completedBy") @@ -128,7 +128,7 @@ func (m *PlannerTaskData) GetCompletedBy()(IdentitySetable) { } return nil } -// GetCompletedDateTime gets the completedDateTime property value. The completedDateTime property +// GetCompletedDateTime gets the completedDateTime property value. The date and time at which the percentComplete of the task is set to 100. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2024, is 2024-01-01T00:00:00Z. // returns a *Time when successful func (m *PlannerTaskData) GetCompletedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { val, err := m.GetBackingStore().Get("completedDateTime") @@ -140,7 +140,7 @@ func (m *PlannerTaskData) GetCompletedDateTime()(*i336074805fc853987abe6f7fe3ad9 } return nil } -// GetConversationThreadId gets the conversationThreadId property value. The conversationThreadId property +// GetConversationThreadId gets the conversationThreadId property value. The thread ID of the conversation on the task that corresponds to the ID of the conversation thread object created in the group. // returns a *string when successful func (m *PlannerTaskData) GetConversationThreadId()(*string) { val, err := m.GetBackingStore().Get("conversationThreadId") @@ -152,7 +152,7 @@ func (m *PlannerTaskData) GetConversationThreadId()(*string) { } return nil } -// GetCreatedBy gets the createdBy property value. The createdBy property +// GetCreatedBy gets the createdBy property value. The identity of the user who created the task. // returns a IdentitySetable when successful func (m *PlannerTaskData) GetCreatedBy()(IdentitySetable) { val, err := m.GetBackingStore().Get("createdBy") @@ -164,7 +164,7 @@ func (m *PlannerTaskData) GetCreatedBy()(IdentitySetable) { } return nil } -// GetCreatedDateTime gets the createdDateTime property value. The createdDateTime property +// GetCreatedDateTime gets the createdDateTime property value. The date and time at which the task was created. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2024, is 2024-01-01T00:00:00Z. // returns a *Time when successful func (m *PlannerTaskData) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { val, err := m.GetBackingStore().Get("createdDateTime") @@ -176,7 +176,7 @@ func (m *PlannerTaskData) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a } return nil } -// GetCreationSource gets the creationSource property value. The creationSource property +// GetCreationSource gets the creationSource property value. Information about the origin of the task. // returns a PlannerTaskCreationable when successful func (m *PlannerTaskData) GetCreationSource()(PlannerTaskCreationable) { val, err := m.GetBackingStore().Get("creationSource") @@ -188,7 +188,7 @@ func (m *PlannerTaskData) GetCreationSource()(PlannerTaskCreationable) { } return nil } -// GetDetails gets the details property value. The details property +// GetDetails gets the details property value. Additional details about the task. // returns a PlannerTaskDetailsDataable when successful func (m *PlannerTaskData) GetDetails()(PlannerTaskDetailsDataable) { val, err := m.GetBackingStore().Get("details") @@ -200,7 +200,7 @@ func (m *PlannerTaskData) GetDetails()(PlannerTaskDetailsDataable) { } return nil } -// GetDueDateTime gets the dueDateTime property value. The dueDateTime property +// GetDueDateTime gets the dueDateTime property value. The date and time at which the task is due. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2024, is 2024-01-01T00:00:00Z. // returns a *Time when successful func (m *PlannerTaskData) GetDueDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { val, err := m.GetBackingStore().Get("dueDateTime") @@ -488,7 +488,7 @@ func (m *PlannerTaskData) GetFieldDeserializers()(map[string]func(i878a80d2330e8 } return res } -// GetHasChat gets the hasChat property value. The hasChat property +// GetHasChat gets the hasChat property value. Set to true if the task has a chat associated with it; otherwise, false. // returns a *bool when successful func (m *PlannerTaskData) GetHasChat()(*bool) { val, err := m.GetBackingStore().Get("hasChat") @@ -500,7 +500,7 @@ func (m *PlannerTaskData) GetHasChat()(*bool) { } return nil } -// GetHasDescription gets the hasDescription property value. The hasDescription property +// GetHasDescription gets the hasDescription property value. Set to true if the details object of the task has a nonempty description; otherwise, false. // returns a *bool when successful func (m *PlannerTaskData) GetHasDescription()(*bool) { val, err := m.GetBackingStore().Get("hasDescription") @@ -512,7 +512,7 @@ func (m *PlannerTaskData) GetHasDescription()(*bool) { } return nil } -// GetIsArchived gets the isArchived property value. The isArchived property +// GetIsArchived gets the isArchived property value. Set to true if the task is archived; otherwise, false. // returns a *bool when successful func (m *PlannerTaskData) GetIsArchived()(*bool) { val, err := m.GetBackingStore().Get("isArchived") @@ -536,7 +536,7 @@ func (m *PlannerTaskData) GetOdataType()(*string) { } return nil } -// GetOrderHint gets the orderHint property value. The orderHint property +// GetOrderHint gets the orderHint property value. Hint used to order items of this type in a list view. // returns a *string when successful func (m *PlannerTaskData) GetOrderHint()(*string) { val, err := m.GetBackingStore().Get("orderHint") @@ -548,7 +548,7 @@ func (m *PlannerTaskData) GetOrderHint()(*string) { } return nil } -// GetPercentComplete gets the percentComplete property value. The percentComplete property +// GetPercentComplete gets the percentComplete property value. Percentage of task completion. When set to 100, the task is considered completed. // returns a *int32 when successful func (m *PlannerTaskData) GetPercentComplete()(*int32) { val, err := m.GetBackingStore().Get("percentComplete") @@ -572,7 +572,7 @@ func (m *PlannerTaskData) GetPreviewType()(*PlannerPreviewType) { } return nil } -// GetPriority gets the priority property value. The priority property +// GetPriority gets the priority property value. The priority of the task. Valid values are between 0 and 10, inclusive. Larger values indicate lower priority. For example, 0 has the highest priority and 10 has the lowest priority. // returns a *int32 when successful func (m *PlannerTaskData) GetPriority()(*int32) { val, err := m.GetBackingStore().Get("priority") @@ -584,7 +584,7 @@ func (m *PlannerTaskData) GetPriority()(*int32) { } return nil } -// GetRecurrence gets the recurrence property value. The recurrence property +// GetRecurrence gets the recurrence property value. Defines active or inactive recurrence for the task. A null value indicates that the recurrence was never defined for the task. // returns a PlannerTaskRecurrenceable when successful func (m *PlannerTaskData) GetRecurrence()(PlannerTaskRecurrenceable) { val, err := m.GetBackingStore().Get("recurrence") @@ -596,7 +596,7 @@ func (m *PlannerTaskData) GetRecurrence()(PlannerTaskRecurrenceable) { } return nil } -// GetReferenceCount gets the referenceCount property value. The referenceCount property +// GetReferenceCount gets the referenceCount property value. Number of external references that exist on the task. // returns a *int32 when successful func (m *PlannerTaskData) GetReferenceCount()(*int32) { val, err := m.GetBackingStore().Get("referenceCount") @@ -620,7 +620,7 @@ func (m *PlannerTaskData) GetSpecifiedCompletionRequirements()(*PlannerTaskCompl } return nil } -// GetStartDateTime gets the startDateTime property value. The startDateTime property +// GetStartDateTime gets the startDateTime property value. The date and time at which the task starts. The date and time information uses ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2021 is 2021-01-01T00:00:00Z. // returns a *Time when successful func (m *PlannerTaskData) GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { val, err := m.GetBackingStore().Get("startDateTime") @@ -632,7 +632,7 @@ func (m *PlannerTaskData) GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a } return nil } -// GetTitle gets the title property value. The title property +// GetTitle gets the title property value. Title of the task. // returns a *string when successful func (m *PlannerTaskData) GetTitle()(*string) { val, err := m.GetBackingStore().Get("title") @@ -818,7 +818,7 @@ func (m *PlannerTaskData) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0 } return nil } -// SetActiveChecklistItemCount sets the activeChecklistItemCount property value. The activeChecklistItemCount property +// SetActiveChecklistItemCount sets the activeChecklistItemCount property value. The number of incomplete checklist items whose value is set to false. func (m *PlannerTaskData) SetActiveChecklistItemCount(value *int32)() { err := m.GetBackingStore().Set("activeChecklistItemCount", value) if err != nil { @@ -832,21 +832,21 @@ func (m *PlannerTaskData) SetAdditionalData(value map[string]any)() { panic(err) } } -// SetAppliedCategories sets the appliedCategories property value. The appliedCategories property +// SetAppliedCategories sets the appliedCategories property value. The categories to which the task is applied. func (m *PlannerTaskData) SetAppliedCategories(value PlannerAppliedCategoriesable)() { err := m.GetBackingStore().Set("appliedCategories", value) if err != nil { panic(err) } } -// SetArchivalInfo sets the archivalInfo property value. The archivalInfo property +// SetArchivalInfo sets the archivalInfo property value. Information about who archived or unarchived the task and why. func (m *PlannerTaskData) SetArchivalInfo(value PlannerArchivalInfoable)() { err := m.GetBackingStore().Set("archivalInfo", value) if err != nil { panic(err) } } -// SetAssignments sets the assignments property value. The assignments property +// SetAssignments sets the assignments property value. The set of assignees the task is assigned to. func (m *PlannerTaskData) SetAssignments(value PlannerAssignmentsable)() { err := m.GetBackingStore().Set("assignments", value) if err != nil { @@ -857,91 +857,91 @@ func (m *PlannerTaskData) SetAssignments(value PlannerAssignmentsable)() { func (m *PlannerTaskData) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { m.backingStore = value } -// SetBucketId sets the bucketId property value. The bucketId property +// SetBucketId sets the bucketId property value. Bucket ID to which the task belongs. The bucket needs to be in the same plan as the task. func (m *PlannerTaskData) SetBucketId(value *string)() { err := m.GetBackingStore().Set("bucketId", value) if err != nil { panic(err) } } -// SetChecklistItemCount sets the checklistItemCount property value. The checklistItemCount property +// SetChecklistItemCount sets the checklistItemCount property value. The number of checklist items that are present on the task. func (m *PlannerTaskData) SetChecklistItemCount(value *int32)() { err := m.GetBackingStore().Set("checklistItemCount", value) if err != nil { panic(err) } } -// SetCompletedBy sets the completedBy property value. The completedBy property +// SetCompletedBy sets the completedBy property value. The identity of the user that completed the task. func (m *PlannerTaskData) SetCompletedBy(value IdentitySetable)() { err := m.GetBackingStore().Set("completedBy", value) if err != nil { panic(err) } } -// SetCompletedDateTime sets the completedDateTime property value. The completedDateTime property +// SetCompletedDateTime sets the completedDateTime property value. The date and time at which the percentComplete of the task is set to 100. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2024, is 2024-01-01T00:00:00Z. func (m *PlannerTaskData) SetCompletedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { err := m.GetBackingStore().Set("completedDateTime", value) if err != nil { panic(err) } } -// SetConversationThreadId sets the conversationThreadId property value. The conversationThreadId property +// SetConversationThreadId sets the conversationThreadId property value. The thread ID of the conversation on the task that corresponds to the ID of the conversation thread object created in the group. func (m *PlannerTaskData) SetConversationThreadId(value *string)() { err := m.GetBackingStore().Set("conversationThreadId", value) if err != nil { panic(err) } } -// SetCreatedBy sets the createdBy property value. The createdBy property +// SetCreatedBy sets the createdBy property value. The identity of the user who created the task. func (m *PlannerTaskData) SetCreatedBy(value IdentitySetable)() { err := m.GetBackingStore().Set("createdBy", value) if err != nil { panic(err) } } -// SetCreatedDateTime sets the createdDateTime property value. The createdDateTime property +// SetCreatedDateTime sets the createdDateTime property value. The date and time at which the task was created. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2024, is 2024-01-01T00:00:00Z. func (m *PlannerTaskData) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { err := m.GetBackingStore().Set("createdDateTime", value) if err != nil { panic(err) } } -// SetCreationSource sets the creationSource property value. The creationSource property +// SetCreationSource sets the creationSource property value. Information about the origin of the task. func (m *PlannerTaskData) SetCreationSource(value PlannerTaskCreationable)() { err := m.GetBackingStore().Set("creationSource", value) if err != nil { panic(err) } } -// SetDetails sets the details property value. The details property +// SetDetails sets the details property value. Additional details about the task. func (m *PlannerTaskData) SetDetails(value PlannerTaskDetailsDataable)() { err := m.GetBackingStore().Set("details", value) if err != nil { panic(err) } } -// SetDueDateTime sets the dueDateTime property value. The dueDateTime property +// SetDueDateTime sets the dueDateTime property value. The date and time at which the task is due. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2024, is 2024-01-01T00:00:00Z. func (m *PlannerTaskData) SetDueDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { err := m.GetBackingStore().Set("dueDateTime", value) if err != nil { panic(err) } } -// SetHasChat sets the hasChat property value. The hasChat property +// SetHasChat sets the hasChat property value. Set to true if the task has a chat associated with it; otherwise, false. func (m *PlannerTaskData) SetHasChat(value *bool)() { err := m.GetBackingStore().Set("hasChat", value) if err != nil { panic(err) } } -// SetHasDescription sets the hasDescription property value. The hasDescription property +// SetHasDescription sets the hasDescription property value. Set to true if the details object of the task has a nonempty description; otherwise, false. func (m *PlannerTaskData) SetHasDescription(value *bool)() { err := m.GetBackingStore().Set("hasDescription", value) if err != nil { panic(err) } } -// SetIsArchived sets the isArchived property value. The isArchived property +// SetIsArchived sets the isArchived property value. Set to true if the task is archived; otherwise, false. func (m *PlannerTaskData) SetIsArchived(value *bool)() { err := m.GetBackingStore().Set("isArchived", value) if err != nil { @@ -955,14 +955,14 @@ func (m *PlannerTaskData) SetOdataType(value *string)() { panic(err) } } -// SetOrderHint sets the orderHint property value. The orderHint property +// SetOrderHint sets the orderHint property value. Hint used to order items of this type in a list view. func (m *PlannerTaskData) SetOrderHint(value *string)() { err := m.GetBackingStore().Set("orderHint", value) if err != nil { panic(err) } } -// SetPercentComplete sets the percentComplete property value. The percentComplete property +// SetPercentComplete sets the percentComplete property value. Percentage of task completion. When set to 100, the task is considered completed. func (m *PlannerTaskData) SetPercentComplete(value *int32)() { err := m.GetBackingStore().Set("percentComplete", value) if err != nil { @@ -976,21 +976,21 @@ func (m *PlannerTaskData) SetPreviewType(value *PlannerPreviewType)() { panic(err) } } -// SetPriority sets the priority property value. The priority property +// SetPriority sets the priority property value. The priority of the task. Valid values are between 0 and 10, inclusive. Larger values indicate lower priority. For example, 0 has the highest priority and 10 has the lowest priority. func (m *PlannerTaskData) SetPriority(value *int32)() { err := m.GetBackingStore().Set("priority", value) if err != nil { panic(err) } } -// SetRecurrence sets the recurrence property value. The recurrence property +// SetRecurrence sets the recurrence property value. Defines active or inactive recurrence for the task. A null value indicates that the recurrence was never defined for the task. func (m *PlannerTaskData) SetRecurrence(value PlannerTaskRecurrenceable)() { err := m.GetBackingStore().Set("recurrence", value) if err != nil { panic(err) } } -// SetReferenceCount sets the referenceCount property value. The referenceCount property +// SetReferenceCount sets the referenceCount property value. Number of external references that exist on the task. func (m *PlannerTaskData) SetReferenceCount(value *int32)() { err := m.GetBackingStore().Set("referenceCount", value) if err != nil { @@ -1004,14 +1004,14 @@ func (m *PlannerTaskData) SetSpecifiedCompletionRequirements(value *PlannerTaskC panic(err) } } -// SetStartDateTime sets the startDateTime property value. The startDateTime property +// SetStartDateTime sets the startDateTime property value. The date and time at which the task starts. The date and time information uses ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2021 is 2021-01-01T00:00:00Z. func (m *PlannerTaskData) SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { err := m.GetBackingStore().Set("startDateTime", value) if err != nil { panic(err) } } -// SetTitle sets the title property value. The title property +// SetTitle sets the title property value. Title of the task. func (m *PlannerTaskData) SetTitle(value *string)() { err := m.GetBackingStore().Set("title", value) if err != nil { diff --git a/models/planner_task_details_data.go b/models/planner_task_details_data.go index 1e1c960c35e..b1333c4c918 100644 --- a/models/planner_task_details_data.go +++ b/models/planner_task_details_data.go @@ -38,7 +38,7 @@ func (m *PlannerTaskDetailsData) GetAdditionalData()(map[string]any) { } return val.(map[string]any) } -// GetApprovalAttachment gets the approvalAttachment property value. The approvalAttachment property +// GetApprovalAttachment gets the approvalAttachment property value. Detailed information about the approval that is attached to the task. // returns a PlannerBaseApprovalAttachmentable when successful func (m *PlannerTaskDetailsData) GetApprovalAttachment()(PlannerBaseApprovalAttachmentable) { val, err := m.GetBackingStore().Get("approvalAttachment") @@ -55,7 +55,7 @@ func (m *PlannerTaskDetailsData) GetApprovalAttachment()(PlannerBaseApprovalAtta func (m *PlannerTaskDetailsData) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { return m.backingStore } -// GetChecklist gets the checklist property value. The checklist property +// GetChecklist gets the checklist property value. The collection of checklist items on the task. // returns a PlannerChecklistItemsable when successful func (m *PlannerTaskDetailsData) GetChecklist()(PlannerChecklistItemsable) { val, err := m.GetBackingStore().Get("checklist") @@ -67,7 +67,7 @@ func (m *PlannerTaskDetailsData) GetChecklist()(PlannerChecklistItemsable) { } return nil } -// GetCompletionRequirements gets the completionRequirements property value. The completionRequirements property +// GetCompletionRequirements gets the completionRequirements property value. Contains detailed information about requirements on the task. // returns a PlannerTaskCompletionRequirementDetailsable when successful func (m *PlannerTaskDetailsData) GetCompletionRequirements()(PlannerTaskCompletionRequirementDetailsable) { val, err := m.GetBackingStore().Get("completionRequirements") @@ -79,7 +79,7 @@ func (m *PlannerTaskDetailsData) GetCompletionRequirements()(PlannerTaskCompleti } return nil } -// GetDescription gets the description property value. The description property +// GetDescription gets the description property value. Description of the task. // returns a *string when successful func (m *PlannerTaskDetailsData) GetDescription()(*string) { val, err := m.GetBackingStore().Get("description") @@ -187,7 +187,7 @@ func (m *PlannerTaskDetailsData) GetFieldDeserializers()(map[string]func(i878a80 } return res } -// GetForms gets the forms property value. The forms property +// GetForms gets the forms property value. The collection of forms associated with the task. // returns a PlannerFormsDictionaryable when successful func (m *PlannerTaskDetailsData) GetForms()(PlannerFormsDictionaryable) { val, err := m.GetBackingStore().Get("forms") @@ -199,7 +199,7 @@ func (m *PlannerTaskDetailsData) GetForms()(PlannerFormsDictionaryable) { } return nil } -// GetNotes gets the notes property value. The notes property +// GetNotes gets the notes property value. Rich text description of the task for use by applications that support HTML content. // returns a ItemBodyable when successful func (m *PlannerTaskDetailsData) GetNotes()(ItemBodyable) { val, err := m.GetBackingStore().Get("notes") @@ -235,7 +235,7 @@ func (m *PlannerTaskDetailsData) GetPreviewType()(*PlannerPreviewType) { } return nil } -// GetReferences gets the references property value. The references property +// GetReferences gets the references property value. The collection of references on the task. // returns a PlannerExternalReferencesable when successful func (m *PlannerTaskDetailsData) GetReferences()(PlannerExternalReferencesable) { val, err := m.GetBackingStore().Get("references") @@ -319,7 +319,7 @@ func (m *PlannerTaskDetailsData) SetAdditionalData(value map[string]any)() { panic(err) } } -// SetApprovalAttachment sets the approvalAttachment property value. The approvalAttachment property +// SetApprovalAttachment sets the approvalAttachment property value. Detailed information about the approval that is attached to the task. func (m *PlannerTaskDetailsData) SetApprovalAttachment(value PlannerBaseApprovalAttachmentable)() { err := m.GetBackingStore().Set("approvalAttachment", value) if err != nil { @@ -330,35 +330,35 @@ func (m *PlannerTaskDetailsData) SetApprovalAttachment(value PlannerBaseApproval func (m *PlannerTaskDetailsData) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { m.backingStore = value } -// SetChecklist sets the checklist property value. The checklist property +// SetChecklist sets the checklist property value. The collection of checklist items on the task. func (m *PlannerTaskDetailsData) SetChecklist(value PlannerChecklistItemsable)() { err := m.GetBackingStore().Set("checklist", value) if err != nil { panic(err) } } -// SetCompletionRequirements sets the completionRequirements property value. The completionRequirements property +// SetCompletionRequirements sets the completionRequirements property value. Contains detailed information about requirements on the task. func (m *PlannerTaskDetailsData) SetCompletionRequirements(value PlannerTaskCompletionRequirementDetailsable)() { err := m.GetBackingStore().Set("completionRequirements", value) if err != nil { panic(err) } } -// SetDescription sets the description property value. The description property +// SetDescription sets the description property value. Description of the task. func (m *PlannerTaskDetailsData) SetDescription(value *string)() { err := m.GetBackingStore().Set("description", value) if err != nil { panic(err) } } -// SetForms sets the forms property value. The forms property +// SetForms sets the forms property value. The collection of forms associated with the task. func (m *PlannerTaskDetailsData) SetForms(value PlannerFormsDictionaryable)() { err := m.GetBackingStore().Set("forms", value) if err != nil { panic(err) } } -// SetNotes sets the notes property value. The notes property +// SetNotes sets the notes property value. Rich text description of the task for use by applications that support HTML content. func (m *PlannerTaskDetailsData) SetNotes(value ItemBodyable)() { err := m.GetBackingStore().Set("notes", value) if err != nil { @@ -379,7 +379,7 @@ func (m *PlannerTaskDetailsData) SetPreviewType(value *PlannerPreviewType)() { panic(err) } } -// SetReferences sets the references property value. The references property +// SetReferences sets the references property value. The collection of references on the task. func (m *PlannerTaskDetailsData) SetReferences(value PlannerExternalReferencesable)() { err := m.GetBackingStore().Set("references", value) if err != nil { diff --git a/models/room.go b/models/room.go index 7db2ed6af2e..ce550b080d3 100644 --- a/models/room.go +++ b/models/room.go @@ -200,16 +200,6 @@ func (m *Room) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a } return nil } - res["placeId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetPlaceId(val) - } - return nil - } res["teamsEnabledState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetEnumValue(ParsePlaceFeatureEnablement) if err != nil { @@ -280,18 +270,6 @@ func (m *Room) GetNickname()(*string) { } return nil } -// GetPlaceId gets the placeId property value. The placeId property -// returns a *string when successful -func (m *Room) GetPlaceId()(*string) { - val, err := m.GetBackingStore().Get("placeId") - if err != nil { - panic(err) - } - if val != nil { - return val.(*string) - } - return nil -} // GetTeamsEnabledState gets the teamsEnabledState property value. The teamsEnabledState property // returns a *PlaceFeatureEnablement when successful func (m *Room) GetTeamsEnabledState()(*PlaceFeatureEnablement) { @@ -383,12 +361,6 @@ func (m *Room) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c49 return err } } - { - err = writer.WriteStringValue("placeId", m.GetPlaceId()) - if err != nil { - return err - } - } if m.GetTeamsEnabledState() != nil { cast := (*m.GetTeamsEnabledState()).String() err = writer.WriteStringValue("teamsEnabledState", &cast) @@ -474,13 +446,6 @@ func (m *Room) SetNickname(value *string)() { panic(err) } } -// SetPlaceId sets the placeId property value. The placeId property -func (m *Room) SetPlaceId(value *string)() { - err := m.GetBackingStore().Set("placeId", value) - if err != nil { - panic(err) - } -} // SetTeamsEnabledState sets the teamsEnabledState property value. The teamsEnabledState property func (m *Room) SetTeamsEnabledState(value *PlaceFeatureEnablement)() { err := m.GetBackingStore().Set("teamsEnabledState", value) @@ -508,7 +473,6 @@ type Roomable interface { GetFloorNumber()(*int32) GetIsTeamsEnabled()(*bool) GetNickname()(*string) - GetPlaceId()(*string) GetTeamsEnabledState()(*PlaceFeatureEnablement) GetVideoDeviceName()(*string) SetAudioDeviceName(value *string)() @@ -521,7 +485,6 @@ type Roomable interface { SetFloorNumber(value *int32)() SetIsTeamsEnabled(value *bool)() SetNickname(value *string)() - SetPlaceId(value *string)() SetTeamsEnabledState(value *PlaceFeatureEnablement)() SetVideoDeviceName(value *string)() } diff --git a/models/security/case_management_root.go b/models/security/case_management_root.go new file mode 100644 index 00000000000..6f8987f3c54 --- /dev/null +++ b/models/security/case_management_root.go @@ -0,0 +1,43 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" +) + +type CaseManagementRoot struct { + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Entity +} +// NewCaseManagementRoot instantiates a new CaseManagementRoot and sets the default values. +func NewCaseManagementRoot()(*CaseManagementRoot) { + m := &CaseManagementRoot{ + Entity: *ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.NewEntity(), + } + return m +} +// CreateCaseManagementRootFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCaseManagementRootFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCaseManagementRoot(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CaseManagementRoot) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *CaseManagementRoot) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + return nil +} +type CaseManagementRootable interface { + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/models/security/casemanagement/activity.go b/models/security/casemanagement/activity.go new file mode 100644 index 00000000000..eb113240578 --- /dev/null +++ b/models/security/casemanagement/activity.go @@ -0,0 +1,64 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package casemanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Activity struct { + CaseManagementEntity +} +// NewActivity instantiates a new Activity and sets the default values. +func NewActivity()(*Activity) { + m := &Activity{ + CaseManagementEntity: *NewCaseManagementEntity(), + } + odataTypeValue := "#microsoft.graph.security.caseManagement.activity" + m.SetOdataType(&odataTypeValue) + return m +} +// CreateActivityFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateActivityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.security.caseManagement.auditLog": + return NewAuditLog(), nil + case "#microsoft.graph.security.caseManagement.comment": + return NewComment(), nil + } + } + } + } + return NewActivity(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Activity) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.CaseManagementEntity.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *Activity) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.CaseManagementEntity.Serialize(writer) + if err != nil { + return err + } + return nil +} +type Activityable interface { + CaseManagementEntityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/models/security/casemanagement/activity_collection_response.go b/models/security/casemanagement/activity_collection_response.go new file mode 100644 index 00000000000..56b826ad9c4 --- /dev/null +++ b/models/security/casemanagement/activity_collection_response.go @@ -0,0 +1,92 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package casemanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" +) + +type ActivityCollectionResponse struct { + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BaseCollectionPaginationCountResponse +} +// NewActivityCollectionResponse instantiates a new ActivityCollectionResponse and sets the default values. +func NewActivityCollectionResponse()(*ActivityCollectionResponse) { + m := &ActivityCollectionResponse{ + BaseCollectionPaginationCountResponse: *ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateActivityCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateActivityCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewActivityCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ActivityCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateActivityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Activityable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(Activityable) + } + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +// returns a []Activityable when successful +func (m *ActivityCollectionResponse) GetValue()([]Activityable) { + val, err := m.GetBackingStore().Get("value") + if err != nil { + panic(err) + } + if val != nil { + return val.([]Activityable) + } + return nil +} +// Serialize serializes information the current object +func (m *ActivityCollectionResponse) 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 *ActivityCollectionResponse) SetValue(value []Activityable)() { + err := m.GetBackingStore().Set("value", value) + if err != nil { + panic(err) + } +} +type ActivityCollectionResponseable interface { + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Activityable) + SetValue(value []Activityable)() +} diff --git a/models/security/casemanagement/activity_resource_details.go b/models/security/casemanagement/activity_resource_details.go new file mode 100644 index 00000000000..b62c9e215de --- /dev/null +++ b/models/security/casemanagement/activity_resource_details.go @@ -0,0 +1,190 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package casemanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +type ActivityResourceDetails struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewActivityResourceDetails instantiates a new ActivityResourceDetails and sets the default values. +func NewActivityResourceDetails()(*ActivityResourceDetails) { + m := &ActivityResourceDetails{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateActivityResourceDetailsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateActivityResourceDetailsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewActivityResourceDetails(), 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. +// returns a map[string]any when successful +func (m *ActivityResourceDetails) 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. +// returns a BackingStore when successful +func (m *ActivityResourceDetails) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ActivityResourceDetails) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["kind"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKind(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["resourceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetResourceId(val) + } + return nil + } + return res +} +// GetKind gets the kind property value. The resource kind, such as task or relation. +// returns a *string when successful +func (m *ActivityResourceDetails) GetKind()(*string) { + val, err := m.GetBackingStore().Get("kind") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetOdataType gets the @odata.type property value. The OdataType property +// returns a *string when successful +func (m *ActivityResourceDetails) GetOdataType()(*string) { + val, err := m.GetBackingStore().Get("odataType") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetResourceId gets the resourceId property value. The identifier of the resource associated with the activity. +// returns a *string when successful +func (m *ActivityResourceDetails) GetResourceId()(*string) { + val, err := m.GetBackingStore().Get("resourceId") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// Serialize serializes information the current object +func (m *ActivityResourceDetails) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("kind", m.GetKind()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("resourceId", m.GetResourceId()) + 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 *ActivityResourceDetails) 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 *ActivityResourceDetails) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetKind sets the kind property value. The resource kind, such as task or relation. +func (m *ActivityResourceDetails) SetKind(value *string)() { + err := m.GetBackingStore().Set("kind", value) + if err != nil { + panic(err) + } +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ActivityResourceDetails) SetOdataType(value *string)() { + err := m.GetBackingStore().Set("odataType", value) + if err != nil { + panic(err) + } +} +// SetResourceId sets the resourceId property value. The identifier of the resource associated with the activity. +func (m *ActivityResourceDetails) SetResourceId(value *string)() { + err := m.GetBackingStore().Set("resourceId", value) + if err != nil { + panic(err) + } +} +type ActivityResourceDetailsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetKind()(*string) + GetOdataType()(*string) + GetResourceId()(*string) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetKind(value *string)() + SetOdataType(value *string)() + SetResourceId(value *string)() +} diff --git a/models/security/casemanagement/alert_counts.go b/models/security/casemanagement/alert_counts.go new file mode 100644 index 00000000000..7ebf58d3c9b --- /dev/null +++ b/models/security/casemanagement/alert_counts.go @@ -0,0 +1,264 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package casemanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +type AlertCounts struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewAlertCounts instantiates a new AlertCounts and sets the default values. +func NewAlertCounts()(*AlertCounts) { + m := &AlertCounts{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateAlertCountsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateAlertCountsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAlertCounts(), nil +} +// GetActive gets the active property value. The number of active alerts. +// returns a *int32 when successful +func (m *AlertCounts) GetActive()(*int32) { + val, err := m.GetBackingStore().Get("active") + if err != nil { + panic(err) + } + if val != nil { + return val.(*int32) + } + 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. +// returns a map[string]any when successful +func (m *AlertCounts) 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. +// returns a BackingStore when successful +func (m *AlertCounts) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetBySeverity gets the bySeverity property value. The alert counts grouped by incident severity. +// returns a IncidentSeverityCountsable when successful +func (m *AlertCounts) GetBySeverity()(IncidentSeverityCountsable) { + val, err := m.GetBackingStore().Get("bySeverity") + if err != nil { + panic(err) + } + if val != nil { + return val.(IncidentSeverityCountsable) + } + return nil +} +// GetByStatus gets the byStatus property value. The alert counts grouped by alert status. +// returns a AlertStatusCountsable when successful +func (m *AlertCounts) GetByStatus()(AlertStatusCountsable) { + val, err := m.GetBackingStore().Get("byStatus") + if err != nil { + panic(err) + } + if val != nil { + return val.(AlertStatusCountsable) + } + return nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *AlertCounts) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["active"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetActive(val) + } + return nil + } + res["bySeverity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIncidentSeverityCountsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetBySeverity(val.(IncidentSeverityCountsable)) + } + return nil + } + res["byStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAlertStatusCountsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetByStatus(val.(AlertStatusCountsable)) + } + 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["total"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotal(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +// returns a *string when successful +func (m *AlertCounts) GetOdataType()(*string) { + val, err := m.GetBackingStore().Get("odataType") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetTotal gets the total property value. The total number of alerts. +// returns a *int32 when successful +func (m *AlertCounts) GetTotal()(*int32) { + val, err := m.GetBackingStore().Get("total") + if err != nil { + panic(err) + } + if val != nil { + return val.(*int32) + } + return nil +} +// Serialize serializes information the current object +func (m *AlertCounts) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("active", m.GetActive()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("bySeverity", m.GetBySeverity()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("byStatus", m.GetByStatus()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total", m.GetTotal()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActive sets the active property value. The number of active alerts. +func (m *AlertCounts) SetActive(value *int32)() { + err := m.GetBackingStore().Set("active", 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 *AlertCounts) 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 *AlertCounts) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetBySeverity sets the bySeverity property value. The alert counts grouped by incident severity. +func (m *AlertCounts) SetBySeverity(value IncidentSeverityCountsable)() { + err := m.GetBackingStore().Set("bySeverity", value) + if err != nil { + panic(err) + } +} +// SetByStatus sets the byStatus property value. The alert counts grouped by alert status. +func (m *AlertCounts) SetByStatus(value AlertStatusCountsable)() { + err := m.GetBackingStore().Set("byStatus", value) + if err != nil { + panic(err) + } +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AlertCounts) SetOdataType(value *string)() { + err := m.GetBackingStore().Set("odataType", value) + if err != nil { + panic(err) + } +} +// SetTotal sets the total property value. The total number of alerts. +func (m *AlertCounts) SetTotal(value *int32)() { + err := m.GetBackingStore().Set("total", value) + if err != nil { + panic(err) + } +} +type AlertCountsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActive()(*int32) + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetBySeverity()(IncidentSeverityCountsable) + GetByStatus()(AlertStatusCountsable) + GetOdataType()(*string) + GetTotal()(*int32) + SetActive(value *int32)() + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetBySeverity(value IncidentSeverityCountsable)() + SetByStatus(value AlertStatusCountsable)() + SetOdataType(value *string)() + SetTotal(value *int32)() +} diff --git a/models/security/casemanagement/alert_status_counts.go b/models/security/casemanagement/alert_status_counts.go new file mode 100644 index 00000000000..46c9db460a1 --- /dev/null +++ b/models/security/casemanagement/alert_status_counts.go @@ -0,0 +1,227 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package casemanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +type AlertStatusCounts struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewAlertStatusCounts instantiates a new AlertStatusCounts and sets the default values. +func NewAlertStatusCounts()(*AlertStatusCounts) { + m := &AlertStatusCounts{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateAlertStatusCountsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateAlertStatusCountsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAlertStatusCounts(), 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. +// returns a map[string]any when successful +func (m *AlertStatusCounts) 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. +// returns a BackingStore when successful +func (m *AlertStatusCounts) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *AlertStatusCounts) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["inProgress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetInProgress(val) + } + return nil + } + res["new"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNew(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["resolved"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetResolved(val) + } + return nil + } + return res +} +// GetInProgress gets the inProgress property value. The number of alerts that are in progress. +// returns a *int32 when successful +func (m *AlertStatusCounts) GetInProgress()(*int32) { + val, err := m.GetBackingStore().Get("inProgress") + if err != nil { + panic(err) + } + if val != nil { + return val.(*int32) + } + return nil +} +// GetNew gets the new property value. The number of new alerts. +// returns a *int32 when successful +func (m *AlertStatusCounts) GetNew()(*int32) { + val, err := m.GetBackingStore().Get("new") + if err != nil { + panic(err) + } + if val != nil { + return val.(*int32) + } + return nil +} +// GetOdataType gets the @odata.type property value. The OdataType property +// returns a *string when successful +func (m *AlertStatusCounts) GetOdataType()(*string) { + val, err := m.GetBackingStore().Get("odataType") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetResolved gets the resolved property value. The number of resolved alerts. +// returns a *int32 when successful +func (m *AlertStatusCounts) GetResolved()(*int32) { + val, err := m.GetBackingStore().Get("resolved") + if err != nil { + panic(err) + } + if val != nil { + return val.(*int32) + } + return nil +} +// Serialize serializes information the current object +func (m *AlertStatusCounts) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("inProgress", m.GetInProgress()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("new", m.GetNew()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("resolved", m.GetResolved()) + 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 *AlertStatusCounts) 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 *AlertStatusCounts) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetInProgress sets the inProgress property value. The number of alerts that are in progress. +func (m *AlertStatusCounts) SetInProgress(value *int32)() { + err := m.GetBackingStore().Set("inProgress", value) + if err != nil { + panic(err) + } +} +// SetNew sets the new property value. The number of new alerts. +func (m *AlertStatusCounts) SetNew(value *int32)() { + err := m.GetBackingStore().Set("new", value) + if err != nil { + panic(err) + } +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AlertStatusCounts) SetOdataType(value *string)() { + err := m.GetBackingStore().Set("odataType", value) + if err != nil { + panic(err) + } +} +// SetResolved sets the resolved property value. The number of resolved alerts. +func (m *AlertStatusCounts) SetResolved(value *int32)() { + err := m.GetBackingStore().Set("resolved", value) + if err != nil { + panic(err) + } +} +type AlertStatusCountsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetInProgress()(*int32) + GetNew()(*int32) + GetOdataType()(*string) + GetResolved()(*int32) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetInProgress(value *int32)() + SetNew(value *int32)() + SetOdataType(value *string)() + SetResolved(value *int32)() +} diff --git a/models/security/casemanagement/attachment.go b/models/security/casemanagement/attachment.go new file mode 100644 index 00000000000..88db7c6491b --- /dev/null +++ b/models/security/casemanagement/attachment.go @@ -0,0 +1,304 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package casemanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Attachment struct { + CaseManagementEntity +} +// NewAttachment instantiates a new Attachment and sets the default values. +func NewAttachment()(*Attachment) { + m := &Attachment{ + CaseManagementEntity: *NewCaseManagementEntity(), + } + odataTypeValue := "#microsoft.graph.security.caseManagement.attachment" + m.SetOdataType(&odataTypeValue) + return m +} +// CreateAttachmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateAttachmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAttachment(), nil +} +// GetContent gets the content property value. The binary content stream for the attachment. +// returns a []byte when successful +func (m *Attachment) GetContent()([]byte) { + val, err := m.GetBackingStore().Get("content") + if err != nil { + panic(err) + } + if val != nil { + return val.([]byte) + } + return nil +} +// GetDescription gets the description property value. The description of the attachment. +// returns a *string when successful +func (m *Attachment) GetDescription()(*string) { + val, err := m.GetBackingStore().Get("description") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetDisplayName gets the displayName property value. The display name of the attachment. +// returns a *string when successful +func (m *Attachment) GetDisplayName()(*string) { + val, err := m.GetBackingStore().Get("displayName") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Attachment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.CaseManagementEntity.GetFieldDeserializers() + res["content"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetContent(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + 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["fileExtension"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFileExtension(val) + } + return nil + } + res["fileSize"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetFileSize(val) + } + return nil + } + res["origin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAttachmentOriginFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOrigin(val.(AttachmentOriginable)) + } + return nil + } + res["scanResult"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAttachmentScanResult) + if err != nil { + return err + } + if val != nil { + m.SetScanResult(val.(*AttachmentScanResult)) + } + return nil + } + return res +} +// GetFileExtension gets the fileExtension property value. The file extension of the attachment. +// returns a *string when successful +func (m *Attachment) GetFileExtension()(*string) { + val, err := m.GetBackingStore().Get("fileExtension") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetFileSize gets the fileSize property value. The size of the attachment in bytes. +// returns a *int64 when successful +func (m *Attachment) GetFileSize()(*int64) { + val, err := m.GetBackingStore().Get("fileSize") + if err != nil { + panic(err) + } + if val != nil { + return val.(*int64) + } + return nil +} +// GetOrigin gets the origin property value. The origin reference for the attachment. +// returns a AttachmentOriginable when successful +func (m *Attachment) GetOrigin()(AttachmentOriginable) { + val, err := m.GetBackingStore().Get("origin") + if err != nil { + panic(err) + } + if val != nil { + return val.(AttachmentOriginable) + } + return nil +} +// GetScanResult gets the scanResult property value. The scanResult property +// returns a *AttachmentScanResult when successful +func (m *Attachment) GetScanResult()(*AttachmentScanResult) { + val, err := m.GetBackingStore().Get("scanResult") + if err != nil { + panic(err) + } + if val != nil { + return val.(*AttachmentScanResult) + } + return nil +} +// Serialize serializes information the current object +func (m *Attachment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.CaseManagementEntity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteByteArrayValue("content", m.GetContent()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("fileExtension", m.GetFileExtension()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("fileSize", m.GetFileSize()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("origin", m.GetOrigin()) + if err != nil { + return err + } + } + if m.GetScanResult() != nil { + cast := (*m.GetScanResult()).String() + err = writer.WriteStringValue("scanResult", &cast) + if err != nil { + return err + } + } + return nil +} +// SetContent sets the content property value. The binary content stream for the attachment. +func (m *Attachment) SetContent(value []byte)() { + err := m.GetBackingStore().Set("content", value) + if err != nil { + panic(err) + } +} +// SetDescription sets the description property value. The description of the attachment. +func (m *Attachment) 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 attachment. +func (m *Attachment) SetDisplayName(value *string)() { + err := m.GetBackingStore().Set("displayName", value) + if err != nil { + panic(err) + } +} +// SetFileExtension sets the fileExtension property value. The file extension of the attachment. +func (m *Attachment) SetFileExtension(value *string)() { + err := m.GetBackingStore().Set("fileExtension", value) + if err != nil { + panic(err) + } +} +// SetFileSize sets the fileSize property value. The size of the attachment in bytes. +func (m *Attachment) SetFileSize(value *int64)() { + err := m.GetBackingStore().Set("fileSize", value) + if err != nil { + panic(err) + } +} +// SetOrigin sets the origin property value. The origin reference for the attachment. +func (m *Attachment) SetOrigin(value AttachmentOriginable)() { + err := m.GetBackingStore().Set("origin", value) + if err != nil { + panic(err) + } +} +// SetScanResult sets the scanResult property value. The scanResult property +func (m *Attachment) SetScanResult(value *AttachmentScanResult)() { + err := m.GetBackingStore().Set("scanResult", value) + if err != nil { + panic(err) + } +} +type Attachmentable interface { + CaseManagementEntityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContent()([]byte) + GetDescription()(*string) + GetDisplayName()(*string) + GetFileExtension()(*string) + GetFileSize()(*int64) + GetOrigin()(AttachmentOriginable) + GetScanResult()(*AttachmentScanResult) + SetContent(value []byte)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetFileExtension(value *string)() + SetFileSize(value *int64)() + SetOrigin(value AttachmentOriginable)() + SetScanResult(value *AttachmentScanResult)() +} diff --git a/models/security/casemanagement/attachment_collection_response.go b/models/security/casemanagement/attachment_collection_response.go new file mode 100644 index 00000000000..b5281fa6324 --- /dev/null +++ b/models/security/casemanagement/attachment_collection_response.go @@ -0,0 +1,92 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package casemanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" +) + +type AttachmentCollectionResponse struct { + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BaseCollectionPaginationCountResponse +} +// NewAttachmentCollectionResponse instantiates a new AttachmentCollectionResponse and sets the default values. +func NewAttachmentCollectionResponse()(*AttachmentCollectionResponse) { + m := &AttachmentCollectionResponse{ + BaseCollectionPaginationCountResponse: *ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAttachmentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateAttachmentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAttachmentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *AttachmentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAttachmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Attachmentable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(Attachmentable) + } + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +// returns a []Attachmentable when successful +func (m *AttachmentCollectionResponse) GetValue()([]Attachmentable) { + val, err := m.GetBackingStore().Get("value") + if err != nil { + panic(err) + } + if val != nil { + return val.([]Attachmentable) + } + return nil +} +// Serialize serializes information the current object +func (m *AttachmentCollectionResponse) 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 *AttachmentCollectionResponse) SetValue(value []Attachmentable)() { + err := m.GetBackingStore().Set("value", value) + if err != nil { + panic(err) + } +} +type AttachmentCollectionResponseable interface { + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Attachmentable) + SetValue(value []Attachmentable)() +} diff --git a/models/security/casemanagement/attachment_origin.go b/models/security/casemanagement/attachment_origin.go new file mode 100644 index 00000000000..7ee4e263b82 --- /dev/null +++ b/models/security/casemanagement/attachment_origin.go @@ -0,0 +1,191 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package casemanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +type AttachmentOrigin struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewAttachmentOrigin instantiates a new AttachmentOrigin and sets the default values. +func NewAttachmentOrigin()(*AttachmentOrigin) { + m := &AttachmentOrigin{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateAttachmentOriginFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateAttachmentOriginFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAttachmentOrigin(), 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. +// returns a map[string]any when successful +func (m *AttachmentOrigin) 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. +// returns a BackingStore when successful +func (m *AttachmentOrigin) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *AttachmentOrigin) 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["resourceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetResourceId(val) + } + return nil + } + res["resourceType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAttachmentOriginType) + if err != nil { + return err + } + if val != nil { + m.SetResourceType(val.(*AttachmentOriginType)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +// returns a *string when successful +func (m *AttachmentOrigin) GetOdataType()(*string) { + val, err := m.GetBackingStore().Get("odataType") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetResourceId gets the resourceId property value. The identifier of the origin resource. +// returns a *string when successful +func (m *AttachmentOrigin) GetResourceId()(*string) { + val, err := m.GetBackingStore().Get("resourceId") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetResourceType gets the resourceType property value. The resourceType property +// returns a *AttachmentOriginType when successful +func (m *AttachmentOrigin) GetResourceType()(*AttachmentOriginType) { + val, err := m.GetBackingStore().Get("resourceType") + if err != nil { + panic(err) + } + if val != nil { + return val.(*AttachmentOriginType) + } + return nil +} +// Serialize serializes information the current object +func (m *AttachmentOrigin) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("resourceId", m.GetResourceId()) + if err != nil { + return err + } + } + if m.GetResourceType() != nil { + cast := (*m.GetResourceType()).String() + err := writer.WriteStringValue("resourceType", &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 *AttachmentOrigin) 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 *AttachmentOrigin) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AttachmentOrigin) SetOdataType(value *string)() { + err := m.GetBackingStore().Set("odataType", value) + if err != nil { + panic(err) + } +} +// SetResourceId sets the resourceId property value. The identifier of the origin resource. +func (m *AttachmentOrigin) SetResourceId(value *string)() { + err := m.GetBackingStore().Set("resourceId", value) + if err != nil { + panic(err) + } +} +// SetResourceType sets the resourceType property value. The resourceType property +func (m *AttachmentOrigin) SetResourceType(value *AttachmentOriginType)() { + err := m.GetBackingStore().Set("resourceType", value) + if err != nil { + panic(err) + } +} +type AttachmentOriginable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetOdataType()(*string) + GetResourceId()(*string) + GetResourceType()(*AttachmentOriginType) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetOdataType(value *string)() + SetResourceId(value *string)() + SetResourceType(value *AttachmentOriginType)() +} diff --git a/models/security/casemanagement/attachment_origin_type.go b/models/security/casemanagement/attachment_origin_type.go new file mode 100644 index 00000000000..cb738377f0e --- /dev/null +++ b/models/security/casemanagement/attachment_origin_type.go @@ -0,0 +1,42 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package casemanagement +type AttachmentOriginType int + +const ( + CASE_ATTACHMENTORIGINTYPE AttachmentOriginType = iota + COMMENT_ATTACHMENTORIGINTYPE + TASK_ATTACHMENTORIGINTYPE + UNKNOWNFUTUREVALUE_ATTACHMENTORIGINTYPE +) + +func (i AttachmentOriginType) String() string { + return []string{"case", "comment", "task", "unknownFutureValue"}[i] +} +func ParseAttachmentOriginType(v string) (any, error) { + result := CASE_ATTACHMENTORIGINTYPE + switch v { + case "case": + result = CASE_ATTACHMENTORIGINTYPE + case "comment": + result = COMMENT_ATTACHMENTORIGINTYPE + case "task": + result = TASK_ATTACHMENTORIGINTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_ATTACHMENTORIGINTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeAttachmentOriginType(values []AttachmentOriginType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AttachmentOriginType) isMultiValue() bool { + return false +} diff --git a/models/security/casemanagement/attachment_scan_result.go b/models/security/casemanagement/attachment_scan_result.go new file mode 100644 index 00000000000..d8bdcd3b26f --- /dev/null +++ b/models/security/casemanagement/attachment_scan_result.go @@ -0,0 +1,42 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package casemanagement +type AttachmentScanResult int + +const ( + UNSCANNED_ATTACHMENTSCANRESULT AttachmentScanResult = iota + NOTHREATSFOUND_ATTACHMENTSCANRESULT + MALICIOUS_ATTACHMENTSCANRESULT + UNKNOWNFUTUREVALUE_ATTACHMENTSCANRESULT +) + +func (i AttachmentScanResult) String() string { + return []string{"unscanned", "noThreatsFound", "malicious", "unknownFutureValue"}[i] +} +func ParseAttachmentScanResult(v string) (any, error) { + result := UNSCANNED_ATTACHMENTSCANRESULT + switch v { + case "unscanned": + result = UNSCANNED_ATTACHMENTSCANRESULT + case "noThreatsFound": + result = NOTHREATSFOUND_ATTACHMENTSCANRESULT + case "malicious": + result = MALICIOUS_ATTACHMENTSCANRESULT + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_ATTACHMENTSCANRESULT + default: + return nil, nil + } + return &result, nil +} +func SerializeAttachmentScanResult(values []AttachmentScanResult) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AttachmentScanResult) isMultiValue() bool { + return false +} diff --git a/models/security/casemanagement/audit_action.go b/models/security/casemanagement/audit_action.go new file mode 100644 index 00000000000..ff5b603fcfa --- /dev/null +++ b/models/security/casemanagement/audit_action.go @@ -0,0 +1,57 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package casemanagement +type AuditAction int + +const ( + LINK_AUDITACTION AuditAction = iota + UNLINK_AUDITACTION + UPDATE_AUDITACTION + DELETE_AUDITACTION + CREATE_AUDITACTION + UPLOAD_AUDITACTION + DOWNLOAD_AUDITACTION + FILEUPLOADMALWAREDETECTED_AUDITACTION + UNKNOWNFUTUREVALUE_AUDITACTION +) + +func (i AuditAction) String() string { + return []string{"link", "unlink", "update", "delete", "create", "upload", "download", "fileUploadMalwareDetected", "unknownFutureValue"}[i] +} +func ParseAuditAction(v string) (any, error) { + result := LINK_AUDITACTION + switch v { + case "link": + result = LINK_AUDITACTION + case "unlink": + result = UNLINK_AUDITACTION + case "update": + result = UPDATE_AUDITACTION + case "delete": + result = DELETE_AUDITACTION + case "create": + result = CREATE_AUDITACTION + case "upload": + result = UPLOAD_AUDITACTION + case "download": + result = DOWNLOAD_AUDITACTION + case "fileUploadMalwareDetected": + result = FILEUPLOADMALWAREDETECTED_AUDITACTION + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_AUDITACTION + default: + return nil, nil + } + return &result, nil +} +func SerializeAuditAction(values []AuditAction) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AuditAction) isMultiValue() bool { + return false +} diff --git a/models/security/casemanagement/audit_log.go b/models/security/casemanagement/audit_log.go new file mode 100644 index 00000000000..f6bbb18b6a6 --- /dev/null +++ b/models/security/casemanagement/audit_log.go @@ -0,0 +1,168 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package casemanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type AuditLog struct { + Activity +} +// NewAuditLog instantiates a new AuditLog and sets the default values. +func NewAuditLog()(*AuditLog) { + m := &AuditLog{ + Activity: *NewActivity(), + } + odataTypeValue := "#microsoft.graph.security.caseManagement.auditLog" + m.SetOdataType(&odataTypeValue) + return m +} +// CreateAuditLogFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateAuditLogFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuditLog(), nil +} +// GetAction gets the action property value. The action property +// returns a *AuditAction when successful +func (m *AuditLog) GetAction()(*AuditAction) { + val, err := m.GetBackingStore().Get("action") + if err != nil { + panic(err) + } + if val != nil { + return val.(*AuditAction) + } + return nil +} +// GetDetails gets the details property value. The target resource details for the audit activity. +// returns a ActivityResourceDetailsable when successful +func (m *AuditLog) GetDetails()(ActivityResourceDetailsable) { + val, err := m.GetBackingStore().Get("details") + if err != nil { + panic(err) + } + if val != nil { + return val.(ActivityResourceDetailsable) + } + return nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *AuditLog) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Activity.GetFieldDeserializers() + res["action"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAuditAction) + if err != nil { + return err + } + if val != nil { + m.SetAction(val.(*AuditAction)) + } + return nil + } + res["details"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateActivityResourceDetailsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDetails(val.(ActivityResourceDetailsable)) + } + return nil + } + res["modifiedProperties"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateModifiedPropertyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ModifiedPropertyable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ModifiedPropertyable) + } + } + m.SetModifiedProperties(res) + } + return nil + } + return res +} +// GetModifiedProperties gets the modifiedProperties property value. The collection of property changes recorded in the audit log. +// returns a []ModifiedPropertyable when successful +func (m *AuditLog) GetModifiedProperties()([]ModifiedPropertyable) { + val, err := m.GetBackingStore().Get("modifiedProperties") + if err != nil { + panic(err) + } + if val != nil { + return val.([]ModifiedPropertyable) + } + return nil +} +// Serialize serializes information the current object +func (m *AuditLog) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Activity.Serialize(writer) + if err != nil { + return err + } + if m.GetAction() != nil { + cast := (*m.GetAction()).String() + err = writer.WriteStringValue("action", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("details", m.GetDetails()) + if err != nil { + return err + } + } + if m.GetModifiedProperties() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetModifiedProperties())) + for i, v := range m.GetModifiedProperties() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err = writer.WriteCollectionOfObjectValues("modifiedProperties", cast) + if err != nil { + return err + } + } + return nil +} +// SetAction sets the action property value. The action property +func (m *AuditLog) SetAction(value *AuditAction)() { + err := m.GetBackingStore().Set("action", value) + if err != nil { + panic(err) + } +} +// SetDetails sets the details property value. The target resource details for the audit activity. +func (m *AuditLog) SetDetails(value ActivityResourceDetailsable)() { + err := m.GetBackingStore().Set("details", value) + if err != nil { + panic(err) + } +} +// SetModifiedProperties sets the modifiedProperties property value. The collection of property changes recorded in the audit log. +func (m *AuditLog) SetModifiedProperties(value []ModifiedPropertyable)() { + err := m.GetBackingStore().Set("modifiedProperties", value) + if err != nil { + panic(err) + } +} +type AuditLogable interface { + Activityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAction()(*AuditAction) + GetDetails()(ActivityResourceDetailsable) + GetModifiedProperties()([]ModifiedPropertyable) + SetAction(value *AuditAction)() + SetDetails(value ActivityResourceDetailsable)() + SetModifiedProperties(value []ModifiedPropertyable)() +} diff --git a/models/security/casemanagement/boolean_value_property.go b/models/security/casemanagement/boolean_value_property.go new file mode 100644 index 00000000000..6701e5cc5ce --- /dev/null +++ b/models/security/casemanagement/boolean_value_property.go @@ -0,0 +1,81 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package casemanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type BooleanValueProperty struct { + ValueProperty +} +// NewBooleanValueProperty instantiates a new BooleanValueProperty and sets the default values. +func NewBooleanValueProperty()(*BooleanValueProperty) { + m := &BooleanValueProperty{ + ValueProperty: *NewValueProperty(), + } + odataTypeValue := "#microsoft.graph.security.caseManagement.booleanValueProperty" + m.SetOdataType(&odataTypeValue) + return m +} +// CreateBooleanValuePropertyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateBooleanValuePropertyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBooleanValueProperty(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *BooleanValueProperty) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ValueProperty.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetValue(val) + } + return nil + } + return res +} +// GetValue gets the value property value. The Boolean value. +// returns a *bool when successful +func (m *BooleanValueProperty) GetValue()(*bool) { + val, err := m.GetBackingStore().Get("value") + if err != nil { + panic(err) + } + if val != nil { + return val.(*bool) + } + return nil +} +// Serialize serializes information the current object +func (m *BooleanValueProperty) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ValueProperty.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("value", m.GetValue()) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The Boolean value. +func (m *BooleanValueProperty) SetValue(value *bool)() { + err := m.GetBackingStore().Set("value", value) + if err != nil { + panic(err) + } +} +type BooleanValuePropertyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + ValuePropertyable + GetValue()(*bool) + SetValue(value *bool)() +} diff --git a/models/security/casemanagement/case_collection_response.go b/models/security/casemanagement/case_collection_response.go new file mode 100644 index 00000000000..a55851f6dd6 --- /dev/null +++ b/models/security/casemanagement/case_collection_response.go @@ -0,0 +1,92 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package casemanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" +) + +type CaseCollectionResponse struct { + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BaseCollectionPaginationCountResponse +} +// NewCaseCollectionResponse instantiates a new CaseCollectionResponse and sets the default values. +func NewCaseCollectionResponse()(*CaseCollectionResponse) { + m := &CaseCollectionResponse{ + BaseCollectionPaginationCountResponse: *ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCaseCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCaseCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCaseCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CaseCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCaseEscapedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CaseEscapedable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(CaseEscapedable) + } + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +// returns a []CaseEscapedable when successful +func (m *CaseCollectionResponse) GetValue()([]CaseEscapedable) { + val, err := m.GetBackingStore().Get("value") + if err != nil { + panic(err) + } + if val != nil { + return val.([]CaseEscapedable) + } + return nil +} +// Serialize serializes information the current object +func (m *CaseCollectionResponse) 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 *CaseCollectionResponse) SetValue(value []CaseEscapedable)() { + err := m.GetBackingStore().Set("value", value) + if err != nil { + panic(err) + } +} +type CaseCollectionResponseable interface { + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CaseEscapedable) + SetValue(value []CaseEscapedable)() +} diff --git a/models/security/casemanagement/case_escaped.go b/models/security/casemanagement/case_escaped.go new file mode 100644 index 00000000000..d6d32a41996 --- /dev/null +++ b/models/security/casemanagement/case_escaped.go @@ -0,0 +1,373 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package casemanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CaseEscaped struct { + CaseManagementEntity +} +// NewCaseEscaped instantiates a new CaseEscaped and sets the default values. +func NewCaseEscaped()(*CaseEscaped) { + m := &CaseEscaped{ + CaseManagementEntity: *NewCaseManagementEntity(), + } + odataTypeValue := "#microsoft.graph.security.caseManagement.case" + m.SetOdataType(&odataTypeValue) + return m +} +// CreateCaseEscapedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCaseEscapedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.security.caseManagement.exposureCase": + return NewExposureCase(), nil + case "#microsoft.graph.security.caseManagement.genericCase": + return NewGenericCase(), nil + case "#microsoft.graph.security.caseManagement.incidentCase": + return NewIncidentCase(), nil + } + } + } + } + return NewCaseEscaped(), nil +} +// GetActivities gets the activities property value. The timeline of comments and audit events associated with the case. Supports $expand. +// returns a []Activityable when successful +func (m *CaseEscaped) GetActivities()([]Activityable) { + val, err := m.GetBackingStore().Get("activities") + if err != nil { + panic(err) + } + if val != nil { + return val.([]Activityable) + } + return nil +} +// GetAttachments gets the attachments property value. Evidence files and metadata associated with the case. Supports $expand. +// returns a []Attachmentable when successful +func (m *CaseEscaped) GetAttachments()([]Attachmentable) { + val, err := m.GetBackingStore().Get("attachments") + if err != nil { + panic(err) + } + if val != nil { + return val.([]Attachmentable) + } + return nil +} +// GetCustomFields gets the customFields property value. Tenant-defined custom field values keyed by custom field identifier. +// returns a CustomFieldValuesable when successful +func (m *CaseEscaped) GetCustomFields()(CustomFieldValuesable) { + val, err := m.GetBackingStore().Get("customFields") + if err != nil { + panic(err) + } + if val != nil { + return val.(CustomFieldValuesable) + } + return nil +} +// GetDisplayName gets the displayName property value. The display name of the case. Supports $filter (eq, ne) and $orderby. +// returns a *string when successful +func (m *CaseEscaped) GetDisplayName()(*string) { + val, err := m.GetBackingStore().Get("displayName") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CaseEscaped) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.CaseManagementEntity.GetFieldDeserializers() + res["activities"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateActivityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Activityable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(Activityable) + } + } + m.SetActivities(res) + } + return nil + } + res["attachments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAttachmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Attachmentable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(Attachmentable) + } + } + m.SetAttachments(res) + } + return nil + } + res["customFields"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCustomFieldValuesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCustomFields(val.(CustomFieldValuesable)) + } + return nil + } + 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["relations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRelationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Relationable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(Relationable) + } + } + m.SetRelations(res) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatus(val) + } + return nil + } + res["tasks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTaskFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Taskable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(Taskable) + } + } + m.SetTasks(res) + } + return nil + } + return res +} +// GetRelations gets the relations property value. Links from the case to related security resources. Supports $expand. +// returns a []Relationable when successful +func (m *CaseEscaped) GetRelations()([]Relationable) { + val, err := m.GetBackingStore().Get("relations") + if err != nil { + panic(err) + } + if val != nil { + return val.([]Relationable) + } + return nil +} +// GetStatus gets the status property value. The lifecycle status of the case, such as open, in progress, or closed. Supports $filter (eq, ne) and $orderby. +// returns a *string when successful +func (m *CaseEscaped) GetStatus()(*string) { + val, err := m.GetBackingStore().Get("status") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetTasks gets the tasks property value. Tasks used to track work required to resolve the case. Supports $expand. +// returns a []Taskable when successful +func (m *CaseEscaped) GetTasks()([]Taskable) { + val, err := m.GetBackingStore().Get("tasks") + if err != nil { + panic(err) + } + if val != nil { + return val.([]Taskable) + } + return nil +} +// Serialize serializes information the current object +func (m *CaseEscaped) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.CaseManagementEntity.Serialize(writer) + if err != nil { + return err + } + if m.GetActivities() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetActivities())) + for i, v := range m.GetActivities() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err = writer.WriteCollectionOfObjectValues("activities", cast) + if err != nil { + return err + } + } + if m.GetAttachments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAttachments())) + for i, v := range m.GetAttachments() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err = writer.WriteCollectionOfObjectValues("attachments", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("customFields", m.GetCustomFields()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetRelations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRelations())) + for i, v := range m.GetRelations() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err = writer.WriteCollectionOfObjectValues("relations", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("status", m.GetStatus()) + if err != nil { + return err + } + } + if m.GetTasks() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTasks())) + for i, v := range m.GetTasks() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err = writer.WriteCollectionOfObjectValues("tasks", cast) + if err != nil { + return err + } + } + return nil +} +// SetActivities sets the activities property value. The timeline of comments and audit events associated with the case. Supports $expand. +func (m *CaseEscaped) SetActivities(value []Activityable)() { + err := m.GetBackingStore().Set("activities", value) + if err != nil { + panic(err) + } +} +// SetAttachments sets the attachments property value. Evidence files and metadata associated with the case. Supports $expand. +func (m *CaseEscaped) SetAttachments(value []Attachmentable)() { + err := m.GetBackingStore().Set("attachments", value) + if err != nil { + panic(err) + } +} +// SetCustomFields sets the customFields property value. Tenant-defined custom field values keyed by custom field identifier. +func (m *CaseEscaped) SetCustomFields(value CustomFieldValuesable)() { + err := m.GetBackingStore().Set("customFields", value) + if err != nil { + panic(err) + } +} +// SetDisplayName sets the displayName property value. The display name of the case. Supports $filter (eq, ne) and $orderby. +func (m *CaseEscaped) SetDisplayName(value *string)() { + err := m.GetBackingStore().Set("displayName", value) + if err != nil { + panic(err) + } +} +// SetRelations sets the relations property value. Links from the case to related security resources. Supports $expand. +func (m *CaseEscaped) SetRelations(value []Relationable)() { + err := m.GetBackingStore().Set("relations", value) + if err != nil { + panic(err) + } +} +// SetStatus sets the status property value. The lifecycle status of the case, such as open, in progress, or closed. Supports $filter (eq, ne) and $orderby. +func (m *CaseEscaped) SetStatus(value *string)() { + err := m.GetBackingStore().Set("status", value) + if err != nil { + panic(err) + } +} +// SetTasks sets the tasks property value. Tasks used to track work required to resolve the case. Supports $expand. +func (m *CaseEscaped) SetTasks(value []Taskable)() { + err := m.GetBackingStore().Set("tasks", value) + if err != nil { + panic(err) + } +} +type CaseEscapedable interface { + CaseManagementEntityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActivities()([]Activityable) + GetAttachments()([]Attachmentable) + GetCustomFields()(CustomFieldValuesable) + GetDisplayName()(*string) + GetRelations()([]Relationable) + GetStatus()(*string) + GetTasks()([]Taskable) + SetActivities(value []Activityable)() + SetAttachments(value []Attachmentable)() + SetCustomFields(value CustomFieldValuesable)() + SetDisplayName(value *string)() + SetRelations(value []Relationable)() + SetStatus(value *string)() + SetTasks(value []Taskable)() +} diff --git a/models/security/casemanagement/case_management_entity.go b/models/security/casemanagement/case_management_entity.go new file mode 100644 index 00000000000..b95daafcd87 --- /dev/null +++ b/models/security/casemanagement/case_management_entity.go @@ -0,0 +1,234 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package casemanagement + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" +) + +type CaseManagementEntity struct { + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Entity +} +// NewCaseManagementEntity instantiates a new CaseManagementEntity and sets the default values. +func NewCaseManagementEntity()(*CaseManagementEntity) { + m := &CaseManagementEntity{ + Entity: *ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.NewEntity(), + } + return m +} +// CreateCaseManagementEntityFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCaseManagementEntityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.security.caseManagement.activity": + return NewActivity(), nil + case "#microsoft.graph.security.caseManagement.attachment": + return NewAttachment(), nil + case "#microsoft.graph.security.caseManagement.auditLog": + return NewAuditLog(), nil + case "#microsoft.graph.security.caseManagement.case": + return NewCaseEscaped(), nil + case "#microsoft.graph.security.caseManagement.comment": + return NewComment(), nil + case "#microsoft.graph.security.caseManagement.exposureCase": + return NewExposureCase(), nil + case "#microsoft.graph.security.caseManagement.genericCase": + return NewGenericCase(), nil + case "#microsoft.graph.security.caseManagement.incidentCase": + return NewIncidentCase(), nil + case "#microsoft.graph.security.caseManagement.incidentRelation": + return NewIncidentRelation(), nil + case "#microsoft.graph.security.caseManagement.recommendationRelation": + return NewRecommendationRelation(), nil + case "#microsoft.graph.security.caseManagement.relation": + return NewRelation(), nil + case "#microsoft.graph.security.caseManagement.task": + return NewTask(), nil + case "#microsoft.graph.security.caseManagement.workspaceIndicatorRelation": + return NewWorkspaceIndicatorRelation(), nil + } + } + } + } + return NewCaseManagementEntity(), nil +} +// GetCreatedBy gets the createdBy property value. The user or service that created the resource. +// returns a *string when successful +func (m *CaseManagementEntity) GetCreatedBy()(*string) { + val, err := m.GetBackingStore().Get("createdBy") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetCreatedDateTime gets the createdDateTime property value. The date and time when the resource was created. +// returns a *Time when successful +func (m *CaseManagementEntity) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + val, err := m.GetBackingStore().Get("createdDateTime") + if err != nil { + panic(err) + } + if val != nil { + return val.(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + } + return nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CaseManagementEntity) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["createdBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedBy(val) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["lastModifiedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedBy(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + return res +} +// GetLastModifiedBy gets the lastModifiedBy property value. The user or service that last modified the resource. +// returns a *string when successful +func (m *CaseManagementEntity) GetLastModifiedBy()(*string) { + val, err := m.GetBackingStore().Get("lastModifiedBy") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The date and time when the resource was last modified. +// returns a *Time when successful +func (m *CaseManagementEntity) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + val, err := m.GetBackingStore().Get("lastModifiedDateTime") + if err != nil { + panic(err) + } + if val != nil { + return val.(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + } + return nil +} +// Serialize serializes information the current object +func (m *CaseManagementEntity) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("createdBy", m.GetCreatedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("lastModifiedBy", m.GetLastModifiedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + return nil +} +// SetCreatedBy sets the createdBy property value. The user or service that created the resource. +func (m *CaseManagementEntity) SetCreatedBy(value *string)() { + err := m.GetBackingStore().Set("createdBy", value) + if err != nil { + panic(err) + } +} +// SetCreatedDateTime sets the createdDateTime property value. The date and time when the resource was created. +func (m *CaseManagementEntity) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + err := m.GetBackingStore().Set("createdDateTime", value) + if err != nil { + panic(err) + } +} +// SetLastModifiedBy sets the lastModifiedBy property value. The user or service that last modified the resource. +func (m *CaseManagementEntity) SetLastModifiedBy(value *string)() { + err := m.GetBackingStore().Set("lastModifiedBy", value) + if err != nil { + panic(err) + } +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The date and time when the resource was last modified. +func (m *CaseManagementEntity) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + err := m.GetBackingStore().Set("lastModifiedDateTime", value) + if err != nil { + panic(err) + } +} +type CaseManagementEntityable interface { + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedBy()(*string) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLastModifiedBy()(*string) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetCreatedBy(value *string)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLastModifiedBy(value *string)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/models/security/casemanagement/case_task_category.go b/models/security/casemanagement/case_task_category.go new file mode 100644 index 00000000000..133ea9c4760 --- /dev/null +++ b/models/security/casemanagement/case_task_category.go @@ -0,0 +1,51 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package casemanagement +type CaseTaskCategory int + +const ( + UNCATEGORIZED_CASETASKCATEGORY CaseTaskCategory = iota + TRIAGE_CASETASKCATEGORY + CONTAIN_CASETASKCATEGORY + INVESTIGATE_CASETASKCATEGORY + REMEDIATE_CASETASKCATEGORY + PREVENT_CASETASKCATEGORY + UNKNOWNFUTUREVALUE_CASETASKCATEGORY +) + +func (i CaseTaskCategory) String() string { + return []string{"uncategorized", "triage", "contain", "investigate", "remediate", "prevent", "unknownFutureValue"}[i] +} +func ParseCaseTaskCategory(v string) (any, error) { + result := UNCATEGORIZED_CASETASKCATEGORY + switch v { + case "uncategorized": + result = UNCATEGORIZED_CASETASKCATEGORY + case "triage": + result = TRIAGE_CASETASKCATEGORY + case "contain": + result = CONTAIN_CASETASKCATEGORY + case "investigate": + result = INVESTIGATE_CASETASKCATEGORY + case "remediate": + result = REMEDIATE_CASETASKCATEGORY + case "prevent": + result = PREVENT_CASETASKCATEGORY + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CASETASKCATEGORY + default: + return nil, nil + } + return &result, nil +} +func SerializeCaseTaskCategory(values []CaseTaskCategory) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CaseTaskCategory) isMultiValue() bool { + return false +} diff --git a/models/security/casemanagement/case_task_priority.go b/models/security/casemanagement/case_task_priority.go new file mode 100644 index 00000000000..cd0cede30ad --- /dev/null +++ b/models/security/casemanagement/case_task_priority.go @@ -0,0 +1,51 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package casemanagement +type CaseTaskPriority int + +const ( + NOTSET_CASETASKPRIORITY CaseTaskPriority = iota + VERYLOW_CASETASKPRIORITY + LOW_CASETASKPRIORITY + MEDIUM_CASETASKPRIORITY + HIGH_CASETASKPRIORITY + CRITICAL_CASETASKPRIORITY + UNKNOWNFUTUREVALUE_CASETASKPRIORITY +) + +func (i CaseTaskPriority) String() string { + return []string{"notSet", "veryLow", "low", "medium", "high", "critical", "unknownFutureValue"}[i] +} +func ParseCaseTaskPriority(v string) (any, error) { + result := NOTSET_CASETASKPRIORITY + switch v { + case "notSet": + result = NOTSET_CASETASKPRIORITY + case "veryLow": + result = VERYLOW_CASETASKPRIORITY + case "low": + result = LOW_CASETASKPRIORITY + case "medium": + result = MEDIUM_CASETASKPRIORITY + case "high": + result = HIGH_CASETASKPRIORITY + case "critical": + result = CRITICAL_CASETASKPRIORITY + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CASETASKPRIORITY + default: + return nil, nil + } + return &result, nil +} +func SerializeCaseTaskPriority(values []CaseTaskPriority) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CaseTaskPriority) isMultiValue() bool { + return false +} diff --git a/models/security/casemanagement/comment.go b/models/security/casemanagement/comment.go new file mode 100644 index 00000000000..967485d6be6 --- /dev/null +++ b/models/security/casemanagement/comment.go @@ -0,0 +1,81 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package casemanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Comment struct { + Activity +} +// NewComment instantiates a new Comment and sets the default values. +func NewComment()(*Comment) { + m := &Comment{ + Activity: *NewActivity(), + } + odataTypeValue := "#microsoft.graph.security.caseManagement.comment" + m.SetOdataType(&odataTypeValue) + return m +} +// CreateCommentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCommentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewComment(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Comment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Activity.GetFieldDeserializers() + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The comment body. +// returns a *string when successful +func (m *Comment) GetMessage()(*string) { + val, err := m.GetBackingStore().Get("message") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// Serialize serializes information the current object +func (m *Comment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Activity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + return nil +} +// SetMessage sets the message property value. The comment body. +func (m *Comment) SetMessage(value *string)() { + err := m.GetBackingStore().Set("message", value) + if err != nil { + panic(err) + } +} +type Commentable interface { + Activityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMessage()(*string) + SetMessage(value *string)() +} diff --git a/models/security/casemanagement/custom_field_values.go b/models/security/casemanagement/custom_field_values.go new file mode 100644 index 00000000000..b4799f7c2a4 --- /dev/null +++ b/models/security/casemanagement/custom_field_values.go @@ -0,0 +1,116 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package casemanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +type CustomFieldValues struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewCustomFieldValues instantiates a new CustomFieldValues and sets the default values. +func NewCustomFieldValues()(*CustomFieldValues) { + m := &CustomFieldValues{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCustomFieldValuesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCustomFieldValuesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCustomFieldValues(), 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. +// returns a map[string]any when successful +func (m *CustomFieldValues) 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. +// returns a BackingStore when successful +func (m *CustomFieldValues) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CustomFieldValues) 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +// returns a *string when successful +func (m *CustomFieldValues) GetOdataType()(*string) { + val, err := m.GetBackingStore().Get("odataType") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// Serialize serializes information the current object +func (m *CustomFieldValues) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *CustomFieldValues) 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 *CustomFieldValues) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *CustomFieldValues) SetOdataType(value *string)() { + err := m.GetBackingStore().Set("odataType", value) + if err != nil { + panic(err) + } +} +type CustomFieldValuesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetOdataType()(*string) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetOdataType(value *string)() +} diff --git a/models/security/casemanagement/exposure_case.go b/models/security/casemanagement/exposure_case.go new file mode 100644 index 00000000000..a53e01fa3f4 --- /dev/null +++ b/models/security/casemanagement/exposure_case.go @@ -0,0 +1,421 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package casemanagement + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ExposureCase struct { + CaseEscaped +} +// NewExposureCase instantiates a new ExposureCase and sets the default values. +func NewExposureCase()(*ExposureCase) { + m := &ExposureCase{ + CaseEscaped: *NewCaseEscaped(), + } + odataTypeValue := "#microsoft.graph.security.caseManagement.exposureCase" + m.SetOdataType(&odataTypeValue) + return m +} +// CreateExposureCaseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateExposureCaseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExposureCase(), nil +} +// GetAssignedTo gets the assignedTo property value. The assignedTo property +// returns a *string when successful +func (m *ExposureCase) GetAssignedTo()(*string) { + val, err := m.GetBackingStore().Get("assignedTo") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetAutomation gets the automation property value. The automation property +// returns a ExposureCaseAutomationable when successful +func (m *ExposureCase) GetAutomation()(ExposureCaseAutomationable) { + val, err := m.GetBackingStore().Get("automation") + if err != nil { + panic(err) + } + if val != nil { + return val.(ExposureCaseAutomationable) + } + return nil +} +// GetDescription gets the description property value. The description property +// returns a *string when successful +func (m *ExposureCase) GetDescription()(*string) { + val, err := m.GetBackingStore().Get("description") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetDueDateTime gets the dueDateTime property value. The dueDateTime property +// returns a *Time when successful +func (m *ExposureCase) GetDueDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + val, err := m.GetBackingStore().Get("dueDateTime") + if err != nil { + panic(err) + } + if val != nil { + return val.(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + } + return nil +} +// GetEmailNotificationRecipients gets the emailNotificationRecipients property value. The emailNotificationRecipients property +// returns a []string when successful +func (m *ExposureCase) GetEmailNotificationRecipients()([]string) { + val, err := m.GetBackingStore().Get("emailNotificationRecipients") + if err != nil { + panic(err) + } + if val != nil { + return val.([]string) + } + return nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ExposureCase) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.CaseEscaped.GetFieldDeserializers() + res["assignedTo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAssignedTo(val) + } + return nil + } + res["automation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateExposureCaseAutomationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAutomation(val.(ExposureCaseAutomationable)) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["dueDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetDueDateTime(val) + } + return nil + } + res["emailNotificationRecipients"] = 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.SetEmailNotificationRecipients(res) + } + return nil + } + res["github"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateExposureCaseGitHubFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetGithub(val.(ExposureCaseGitHubable)) + } + return nil + } + res["isGracePeriodEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsGracePeriodEnabled(val) + } + return nil + } + res["priority"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPriority(val) + } + return nil + } + res["seemplicity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateExposureCaseSeemplicityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSeemplicity(val.(ExposureCaseSeemplicityable)) + } + return nil + } + res["thirdPartyWorkItem"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateThirdPartyWorkItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetThirdPartyWorkItem(val.(ThirdPartyWorkItemable)) + } + return nil + } + return res +} +// GetGithub gets the github property value. The github property +// returns a ExposureCaseGitHubable when successful +func (m *ExposureCase) GetGithub()(ExposureCaseGitHubable) { + val, err := m.GetBackingStore().Get("github") + if err != nil { + panic(err) + } + if val != nil { + return val.(ExposureCaseGitHubable) + } + return nil +} +// GetIsGracePeriodEnabled gets the isGracePeriodEnabled property value. The isGracePeriodEnabled property +// returns a *bool when successful +func (m *ExposureCase) GetIsGracePeriodEnabled()(*bool) { + val, err := m.GetBackingStore().Get("isGracePeriodEnabled") + if err != nil { + panic(err) + } + if val != nil { + return val.(*bool) + } + return nil +} +// GetPriority gets the priority property value. The priority property +// returns a *string when successful +func (m *ExposureCase) GetPriority()(*string) { + val, err := m.GetBackingStore().Get("priority") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetSeemplicity gets the seemplicity property value. The seemplicity property +// returns a ExposureCaseSeemplicityable when successful +func (m *ExposureCase) GetSeemplicity()(ExposureCaseSeemplicityable) { + val, err := m.GetBackingStore().Get("seemplicity") + if err != nil { + panic(err) + } + if val != nil { + return val.(ExposureCaseSeemplicityable) + } + return nil +} +// GetThirdPartyWorkItem gets the thirdPartyWorkItem property value. The thirdPartyWorkItem property +// returns a ThirdPartyWorkItemable when successful +func (m *ExposureCase) GetThirdPartyWorkItem()(ThirdPartyWorkItemable) { + val, err := m.GetBackingStore().Get("thirdPartyWorkItem") + if err != nil { + panic(err) + } + if val != nil { + return val.(ThirdPartyWorkItemable) + } + return nil +} +// Serialize serializes information the current object +func (m *ExposureCase) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.CaseEscaped.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("assignedTo", m.GetAssignedTo()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("automation", m.GetAutomation()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("dueDateTime", m.GetDueDateTime()) + if err != nil { + return err + } + } + if m.GetEmailNotificationRecipients() != nil { + err = writer.WriteCollectionOfStringValues("emailNotificationRecipients", m.GetEmailNotificationRecipients()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("github", m.GetGithub()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isGracePeriodEnabled", m.GetIsGracePeriodEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("priority", m.GetPriority()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("seemplicity", m.GetSeemplicity()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("thirdPartyWorkItem", m.GetThirdPartyWorkItem()) + if err != nil { + return err + } + } + return nil +} +// SetAssignedTo sets the assignedTo property value. The assignedTo property +func (m *ExposureCase) SetAssignedTo(value *string)() { + err := m.GetBackingStore().Set("assignedTo", value) + if err != nil { + panic(err) + } +} +// SetAutomation sets the automation property value. The automation property +func (m *ExposureCase) SetAutomation(value ExposureCaseAutomationable)() { + err := m.GetBackingStore().Set("automation", value) + if err != nil { + panic(err) + } +} +// SetDescription sets the description property value. The description property +func (m *ExposureCase) SetDescription(value *string)() { + err := m.GetBackingStore().Set("description", value) + if err != nil { + panic(err) + } +} +// SetDueDateTime sets the dueDateTime property value. The dueDateTime property +func (m *ExposureCase) SetDueDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + err := m.GetBackingStore().Set("dueDateTime", value) + if err != nil { + panic(err) + } +} +// SetEmailNotificationRecipients sets the emailNotificationRecipients property value. The emailNotificationRecipients property +func (m *ExposureCase) SetEmailNotificationRecipients(value []string)() { + err := m.GetBackingStore().Set("emailNotificationRecipients", value) + if err != nil { + panic(err) + } +} +// SetGithub sets the github property value. The github property +func (m *ExposureCase) SetGithub(value ExposureCaseGitHubable)() { + err := m.GetBackingStore().Set("github", value) + if err != nil { + panic(err) + } +} +// SetIsGracePeriodEnabled sets the isGracePeriodEnabled property value. The isGracePeriodEnabled property +func (m *ExposureCase) SetIsGracePeriodEnabled(value *bool)() { + err := m.GetBackingStore().Set("isGracePeriodEnabled", value) + if err != nil { + panic(err) + } +} +// SetPriority sets the priority property value. The priority property +func (m *ExposureCase) SetPriority(value *string)() { + err := m.GetBackingStore().Set("priority", value) + if err != nil { + panic(err) + } +} +// SetSeemplicity sets the seemplicity property value. The seemplicity property +func (m *ExposureCase) SetSeemplicity(value ExposureCaseSeemplicityable)() { + err := m.GetBackingStore().Set("seemplicity", value) + if err != nil { + panic(err) + } +} +// SetThirdPartyWorkItem sets the thirdPartyWorkItem property value. The thirdPartyWorkItem property +func (m *ExposureCase) SetThirdPartyWorkItem(value ThirdPartyWorkItemable)() { + err := m.GetBackingStore().Set("thirdPartyWorkItem", value) + if err != nil { + panic(err) + } +} +type ExposureCaseable interface { + CaseEscapedable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignedTo()(*string) + GetAutomation()(ExposureCaseAutomationable) + GetDescription()(*string) + GetDueDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetEmailNotificationRecipients()([]string) + GetGithub()(ExposureCaseGitHubable) + GetIsGracePeriodEnabled()(*bool) + GetPriority()(*string) + GetSeemplicity()(ExposureCaseSeemplicityable) + GetThirdPartyWorkItem()(ThirdPartyWorkItemable) + SetAssignedTo(value *string)() + SetAutomation(value ExposureCaseAutomationable)() + SetDescription(value *string)() + SetDueDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetEmailNotificationRecipients(value []string)() + SetGithub(value ExposureCaseGitHubable)() + SetIsGracePeriodEnabled(value *bool)() + SetPriority(value *string)() + SetSeemplicity(value ExposureCaseSeemplicityable)() + SetThirdPartyWorkItem(value ThirdPartyWorkItemable)() +} diff --git a/models/security/casemanagement/exposure_case_automation.go b/models/security/casemanagement/exposure_case_automation.go new file mode 100644 index 00000000000..e0c998adfa0 --- /dev/null +++ b/models/security/casemanagement/exposure_case_automation.go @@ -0,0 +1,153 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package casemanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +type ExposureCaseAutomation struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewExposureCaseAutomation instantiates a new ExposureCaseAutomation and sets the default values. +func NewExposureCaseAutomation()(*ExposureCaseAutomation) { + m := &ExposureCaseAutomation{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateExposureCaseAutomationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateExposureCaseAutomationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExposureCaseAutomation(), 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. +// returns a map[string]any when successful +func (m *ExposureCaseAutomation) 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. +// returns a BackingStore when successful +func (m *ExposureCaseAutomation) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ExposureCaseAutomation) 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["ruleId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRuleId(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +// returns a *string when successful +func (m *ExposureCaseAutomation) GetOdataType()(*string) { + val, err := m.GetBackingStore().Get("odataType") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetRuleId gets the ruleId property value. The ruleId property +// returns a *string when successful +func (m *ExposureCaseAutomation) GetRuleId()(*string) { + val, err := m.GetBackingStore().Get("ruleId") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// Serialize serializes information the current object +func (m *ExposureCaseAutomation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("ruleId", m.GetRuleId()) + 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 *ExposureCaseAutomation) 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 *ExposureCaseAutomation) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ExposureCaseAutomation) SetOdataType(value *string)() { + err := m.GetBackingStore().Set("odataType", value) + if err != nil { + panic(err) + } +} +// SetRuleId sets the ruleId property value. The ruleId property +func (m *ExposureCaseAutomation) SetRuleId(value *string)() { + err := m.GetBackingStore().Set("ruleId", value) + if err != nil { + panic(err) + } +} +type ExposureCaseAutomationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetOdataType()(*string) + GetRuleId()(*string) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetOdataType(value *string)() + SetRuleId(value *string)() +} diff --git a/models/security/casemanagement/exposure_case_git_hub.go b/models/security/casemanagement/exposure_case_git_hub.go new file mode 100644 index 00000000000..64bfc88ca77 --- /dev/null +++ b/models/security/casemanagement/exposure_case_git_hub.go @@ -0,0 +1,301 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package casemanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +type ExposureCaseGitHub struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewExposureCaseGitHub instantiates a new ExposureCaseGitHub and sets the default values. +func NewExposureCaseGitHub()(*ExposureCaseGitHub) { + m := &ExposureCaseGitHub{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateExposureCaseGitHubFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateExposureCaseGitHubFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExposureCaseGitHub(), 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. +// returns a map[string]any when successful +func (m *ExposureCaseGitHub) 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. +// returns a BackingStore when successful +func (m *ExposureCaseGitHub) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetEnvironmentId gets the environmentId property value. The environmentId property +// returns a *string when successful +func (m *ExposureCaseGitHub) GetEnvironmentId()(*string) { + val, err := m.GetBackingStore().Get("environmentId") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ExposureCaseGitHub) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["environmentId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEnvironmentId(val) + } + return nil + } + res["issueNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetIssueNumber(val) + } + return nil + } + res["issueUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssueUrl(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["primaryAssessmentId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPrimaryAssessmentId(val) + } + return nil + } + res["repoName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRepoName(val) + } + return nil + } + return res +} +// GetIssueNumber gets the issueNumber property value. The issueNumber property +// returns a *int32 when successful +func (m *ExposureCaseGitHub) GetIssueNumber()(*int32) { + val, err := m.GetBackingStore().Get("issueNumber") + if err != nil { + panic(err) + } + if val != nil { + return val.(*int32) + } + return nil +} +// GetIssueUrl gets the issueUrl property value. The issueUrl property +// returns a *string when successful +func (m *ExposureCaseGitHub) GetIssueUrl()(*string) { + val, err := m.GetBackingStore().Get("issueUrl") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetOdataType gets the @odata.type property value. The OdataType property +// returns a *string when successful +func (m *ExposureCaseGitHub) GetOdataType()(*string) { + val, err := m.GetBackingStore().Get("odataType") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetPrimaryAssessmentId gets the primaryAssessmentId property value. The primaryAssessmentId property +// returns a *string when successful +func (m *ExposureCaseGitHub) GetPrimaryAssessmentId()(*string) { + val, err := m.GetBackingStore().Get("primaryAssessmentId") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetRepoName gets the repoName property value. The repoName property +// returns a *string when successful +func (m *ExposureCaseGitHub) GetRepoName()(*string) { + val, err := m.GetBackingStore().Get("repoName") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// Serialize serializes information the current object +func (m *ExposureCaseGitHub) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("environmentId", m.GetEnvironmentId()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("issueNumber", m.GetIssueNumber()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("issueUrl", m.GetIssueUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("primaryAssessmentId", m.GetPrimaryAssessmentId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("repoName", m.GetRepoName()) + 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 *ExposureCaseGitHub) 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 *ExposureCaseGitHub) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetEnvironmentId sets the environmentId property value. The environmentId property +func (m *ExposureCaseGitHub) SetEnvironmentId(value *string)() { + err := m.GetBackingStore().Set("environmentId", value) + if err != nil { + panic(err) + } +} +// SetIssueNumber sets the issueNumber property value. The issueNumber property +func (m *ExposureCaseGitHub) SetIssueNumber(value *int32)() { + err := m.GetBackingStore().Set("issueNumber", value) + if err != nil { + panic(err) + } +} +// SetIssueUrl sets the issueUrl property value. The issueUrl property +func (m *ExposureCaseGitHub) SetIssueUrl(value *string)() { + err := m.GetBackingStore().Set("issueUrl", value) + if err != nil { + panic(err) + } +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ExposureCaseGitHub) SetOdataType(value *string)() { + err := m.GetBackingStore().Set("odataType", value) + if err != nil { + panic(err) + } +} +// SetPrimaryAssessmentId sets the primaryAssessmentId property value. The primaryAssessmentId property +func (m *ExposureCaseGitHub) SetPrimaryAssessmentId(value *string)() { + err := m.GetBackingStore().Set("primaryAssessmentId", value) + if err != nil { + panic(err) + } +} +// SetRepoName sets the repoName property value. The repoName property +func (m *ExposureCaseGitHub) SetRepoName(value *string)() { + err := m.GetBackingStore().Set("repoName", value) + if err != nil { + panic(err) + } +} +type ExposureCaseGitHubable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetEnvironmentId()(*string) + GetIssueNumber()(*int32) + GetIssueUrl()(*string) + GetOdataType()(*string) + GetPrimaryAssessmentId()(*string) + GetRepoName()(*string) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetEnvironmentId(value *string)() + SetIssueNumber(value *int32)() + SetIssueUrl(value *string)() + SetOdataType(value *string)() + SetPrimaryAssessmentId(value *string)() + SetRepoName(value *string)() +} diff --git a/models/security/casemanagement/exposure_case_seemplicity.go b/models/security/casemanagement/exposure_case_seemplicity.go new file mode 100644 index 00000000000..36156ad8b2a --- /dev/null +++ b/models/security/casemanagement/exposure_case_seemplicity.go @@ -0,0 +1,376 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package casemanagement + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +type ExposureCaseSeemplicity struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewExposureCaseSeemplicity instantiates a new ExposureCaseSeemplicity and sets the default values. +func NewExposureCaseSeemplicity()(*ExposureCaseSeemplicity) { + m := &ExposureCaseSeemplicity{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateExposureCaseSeemplicityFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateExposureCaseSeemplicityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExposureCaseSeemplicity(), 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. +// returns a map[string]any when successful +func (m *ExposureCaseSeemplicity) 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. +// returns a BackingStore when successful +func (m *ExposureCaseSeemplicity) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetConfigurationId gets the configurationId property value. The configurationId property +// returns a *string when successful +func (m *ExposureCaseSeemplicity) GetConfigurationId()(*string) { + val, err := m.GetBackingStore().Get("configurationId") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetConfigurationName gets the configurationName property value. The configurationName property +// returns a *string when successful +func (m *ExposureCaseSeemplicity) GetConfigurationName()(*string) { + val, err := m.GetBackingStore().Get("configurationName") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ExposureCaseSeemplicity) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["configurationId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetConfigurationId(val) + } + return nil + } + res["configurationName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetConfigurationName(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["providerType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProviderType(val) + } + return nil + } + res["syncStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSyncStatus(val) + } + return nil + } + res["ticketCreationTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetTicketCreationTime(val) + } + return nil + } + res["ticketId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTicketId(val) + } + return nil + } + res["ticketLink"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTicketLink(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +// returns a *string when successful +func (m *ExposureCaseSeemplicity) GetOdataType()(*string) { + val, err := m.GetBackingStore().Get("odataType") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetProviderType gets the providerType property value. The providerType property +// returns a *string when successful +func (m *ExposureCaseSeemplicity) GetProviderType()(*string) { + val, err := m.GetBackingStore().Get("providerType") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetSyncStatus gets the syncStatus property value. The syncStatus property +// returns a *string when successful +func (m *ExposureCaseSeemplicity) GetSyncStatus()(*string) { + val, err := m.GetBackingStore().Get("syncStatus") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetTicketCreationTime gets the ticketCreationTime property value. The ticketCreationTime property +// returns a *Time when successful +func (m *ExposureCaseSeemplicity) GetTicketCreationTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + val, err := m.GetBackingStore().Get("ticketCreationTime") + if err != nil { + panic(err) + } + if val != nil { + return val.(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + } + return nil +} +// GetTicketId gets the ticketId property value. The ticketId property +// returns a *string when successful +func (m *ExposureCaseSeemplicity) GetTicketId()(*string) { + val, err := m.GetBackingStore().Get("ticketId") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetTicketLink gets the ticketLink property value. The ticketLink property +// returns a *string when successful +func (m *ExposureCaseSeemplicity) GetTicketLink()(*string) { + val, err := m.GetBackingStore().Get("ticketLink") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// Serialize serializes information the current object +func (m *ExposureCaseSeemplicity) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("configurationId", m.GetConfigurationId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("configurationName", m.GetConfigurationName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("providerType", m.GetProviderType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("syncStatus", m.GetSyncStatus()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("ticketCreationTime", m.GetTicketCreationTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("ticketId", m.GetTicketId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("ticketLink", m.GetTicketLink()) + 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 *ExposureCaseSeemplicity) 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 *ExposureCaseSeemplicity) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetConfigurationId sets the configurationId property value. The configurationId property +func (m *ExposureCaseSeemplicity) SetConfigurationId(value *string)() { + err := m.GetBackingStore().Set("configurationId", value) + if err != nil { + panic(err) + } +} +// SetConfigurationName sets the configurationName property value. The configurationName property +func (m *ExposureCaseSeemplicity) SetConfigurationName(value *string)() { + err := m.GetBackingStore().Set("configurationName", value) + if err != nil { + panic(err) + } +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ExposureCaseSeemplicity) SetOdataType(value *string)() { + err := m.GetBackingStore().Set("odataType", value) + if err != nil { + panic(err) + } +} +// SetProviderType sets the providerType property value. The providerType property +func (m *ExposureCaseSeemplicity) SetProviderType(value *string)() { + err := m.GetBackingStore().Set("providerType", value) + if err != nil { + panic(err) + } +} +// SetSyncStatus sets the syncStatus property value. The syncStatus property +func (m *ExposureCaseSeemplicity) SetSyncStatus(value *string)() { + err := m.GetBackingStore().Set("syncStatus", value) + if err != nil { + panic(err) + } +} +// SetTicketCreationTime sets the ticketCreationTime property value. The ticketCreationTime property +func (m *ExposureCaseSeemplicity) SetTicketCreationTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + err := m.GetBackingStore().Set("ticketCreationTime", value) + if err != nil { + panic(err) + } +} +// SetTicketId sets the ticketId property value. The ticketId property +func (m *ExposureCaseSeemplicity) SetTicketId(value *string)() { + err := m.GetBackingStore().Set("ticketId", value) + if err != nil { + panic(err) + } +} +// SetTicketLink sets the ticketLink property value. The ticketLink property +func (m *ExposureCaseSeemplicity) SetTicketLink(value *string)() { + err := m.GetBackingStore().Set("ticketLink", value) + if err != nil { + panic(err) + } +} +type ExposureCaseSeemplicityable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetConfigurationId()(*string) + GetConfigurationName()(*string) + GetOdataType()(*string) + GetProviderType()(*string) + GetSyncStatus()(*string) + GetTicketCreationTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetTicketId()(*string) + GetTicketLink()(*string) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetConfigurationId(value *string)() + SetConfigurationName(value *string)() + SetOdataType(value *string)() + SetProviderType(value *string)() + SetSyncStatus(value *string)() + SetTicketCreationTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetTicketId(value *string)() + SetTicketLink(value *string)() +} diff --git a/models/security/casemanagement/generic_case.go b/models/security/casemanagement/generic_case.go new file mode 100644 index 00000000000..0c25b78eef0 --- /dev/null +++ b/models/security/casemanagement/generic_case.go @@ -0,0 +1,230 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package casemanagement + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type GenericCase struct { + CaseEscaped +} +// NewGenericCase instantiates a new GenericCase and sets the default values. +func NewGenericCase()(*GenericCase) { + m := &GenericCase{ + CaseEscaped: *NewCaseEscaped(), + } + odataTypeValue := "#microsoft.graph.security.caseManagement.genericCase" + m.SetOdataType(&odataTypeValue) + return m +} +// CreateGenericCaseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateGenericCaseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGenericCase(), nil +} +// GetAssignedTo gets the assignedTo property value. The user assigned to the generic case. +// returns a *string when successful +func (m *GenericCase) GetAssignedTo()(*string) { + val, err := m.GetBackingStore().Get("assignedTo") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetClosingNotes gets the closingNotes property value. Notes recorded when the generic case is closed. +// returns a *string when successful +func (m *GenericCase) GetClosingNotes()(*string) { + val, err := m.GetBackingStore().Get("closingNotes") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetDescription gets the description property value. The description of the generic case. +// returns a *string when successful +func (m *GenericCase) GetDescription()(*string) { + val, err := m.GetBackingStore().Get("description") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetDueDateTime gets the dueDateTime property value. The target completion date and time for the generic case. +// returns a *Time when successful +func (m *GenericCase) GetDueDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + val, err := m.GetBackingStore().Get("dueDateTime") + if err != nil { + panic(err) + } + if val != nil { + return val.(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + } + return nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *GenericCase) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.CaseEscaped.GetFieldDeserializers() + res["assignedTo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAssignedTo(val) + } + return nil + } + res["closingNotes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetClosingNotes(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["dueDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetDueDateTime(val) + } + return nil + } + res["priority"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPriority(val) + } + return nil + } + return res +} +// GetPriority gets the priority property value. The priority assigned to the generic case. +// returns a *string when successful +func (m *GenericCase) GetPriority()(*string) { + val, err := m.GetBackingStore().Get("priority") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// Serialize serializes information the current object +func (m *GenericCase) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.CaseEscaped.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("assignedTo", m.GetAssignedTo()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("closingNotes", m.GetClosingNotes()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("dueDateTime", m.GetDueDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("priority", m.GetPriority()) + if err != nil { + return err + } + } + return nil +} +// SetAssignedTo sets the assignedTo property value. The user assigned to the generic case. +func (m *GenericCase) SetAssignedTo(value *string)() { + err := m.GetBackingStore().Set("assignedTo", value) + if err != nil { + panic(err) + } +} +// SetClosingNotes sets the closingNotes property value. Notes recorded when the generic case is closed. +func (m *GenericCase) SetClosingNotes(value *string)() { + err := m.GetBackingStore().Set("closingNotes", value) + if err != nil { + panic(err) + } +} +// SetDescription sets the description property value. The description of the generic case. +func (m *GenericCase) SetDescription(value *string)() { + err := m.GetBackingStore().Set("description", value) + if err != nil { + panic(err) + } +} +// SetDueDateTime sets the dueDateTime property value. The target completion date and time for the generic case. +func (m *GenericCase) SetDueDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + err := m.GetBackingStore().Set("dueDateTime", value) + if err != nil { + panic(err) + } +} +// SetPriority sets the priority property value. The priority assigned to the generic case. +func (m *GenericCase) SetPriority(value *string)() { + err := m.GetBackingStore().Set("priority", value) + if err != nil { + panic(err) + } +} +type GenericCaseable interface { + CaseEscapedable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignedTo()(*string) + GetClosingNotes()(*string) + GetDescription()(*string) + GetDueDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetPriority()(*string) + SetAssignedTo(value *string)() + SetClosingNotes(value *string)() + SetDescription(value *string)() + SetDueDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetPriority(value *string)() +} diff --git a/models/security/casemanagement/impacted_assets_counts.go b/models/security/casemanagement/impacted_assets_counts.go new file mode 100644 index 00000000000..5498d3f8000 --- /dev/null +++ b/models/security/casemanagement/impacted_assets_counts.go @@ -0,0 +1,634 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package casemanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +type ImpactedAssetsCounts struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewImpactedAssetsCounts instantiates a new ImpactedAssetsCounts and sets the default values. +func NewImpactedAssetsCounts()(*ImpactedAssetsCounts) { + m := &ImpactedAssetsCounts{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateImpactedAssetsCountsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateImpactedAssetsCountsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewImpactedAssetsCounts(), 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. +// returns a map[string]any when successful +func (m *ImpactedAssetsCounts) 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) +} +// GetAiAgents gets the aiAgents property value. The number of impacted AI agents. +// returns a *int32 when successful +func (m *ImpactedAssetsCounts) GetAiAgents()(*int32) { + val, err := m.GetBackingStore().Get("aiAgents") + if err != nil { + panic(err) + } + if val != nil { + return val.(*int32) + } + return nil +} +// GetApps gets the apps property value. The number of impacted apps. +// returns a *int32 when successful +func (m *ImpactedAssetsCounts) GetApps()(*int32) { + val, err := m.GetBackingStore().Get("apps") + if err != nil { + panic(err) + } + if val != nil { + return val.(*int32) + } + return nil +} +// GetBackingStore gets the BackingStore property value. Stores model information. +// returns a BackingStore when successful +func (m *ImpactedAssetsCounts) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetCloudResources gets the cloudResources property value. The number of impacted cloud resources. +// returns a *int32 when successful +func (m *ImpactedAssetsCounts) GetCloudResources()(*int32) { + val, err := m.GetBackingStore().Get("cloudResources") + if err != nil { + panic(err) + } + if val != nil { + return val.(*int32) + } + return nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ImpactedAssetsCounts) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["aiAgents"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetAiAgents(val) + } + return nil + } + res["apps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetApps(val) + } + return nil + } + res["cloudResources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCloudResources(val) + } + return nil + } + res["files"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetFiles(val) + } + return nil + } + res["ips"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetIps(val) + } + return nil + } + res["machines"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMachines(val) + } + return nil + } + res["mailboxes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMailboxes(val) + } + return nil + } + res["oauthApps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetOauthApps(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["processes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetProcesses(val) + } + return nil + } + res["registryKeys"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRegistryKeys(val) + } + return nil + } + res["securityGroups"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSecurityGroups(val) + } + return nil + } + res["total"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotal(val) + } + return nil + } + res["urls"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetUrls(val) + } + return nil + } + res["users"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetUsers(val) + } + return nil + } + return res +} +// GetFiles gets the files property value. The number of impacted files. +// returns a *int32 when successful +func (m *ImpactedAssetsCounts) GetFiles()(*int32) { + val, err := m.GetBackingStore().Get("files") + if err != nil { + panic(err) + } + if val != nil { + return val.(*int32) + } + return nil +} +// GetIps gets the ips property value. The number of impacted IP addresses. +// returns a *int32 when successful +func (m *ImpactedAssetsCounts) GetIps()(*int32) { + val, err := m.GetBackingStore().Get("ips") + if err != nil { + panic(err) + } + if val != nil { + return val.(*int32) + } + return nil +} +// GetMachines gets the machines property value. The number of impacted machines. +// returns a *int32 when successful +func (m *ImpactedAssetsCounts) GetMachines()(*int32) { + val, err := m.GetBackingStore().Get("machines") + if err != nil { + panic(err) + } + if val != nil { + return val.(*int32) + } + return nil +} +// GetMailboxes gets the mailboxes property value. The number of impacted mailboxes. +// returns a *int32 when successful +func (m *ImpactedAssetsCounts) GetMailboxes()(*int32) { + val, err := m.GetBackingStore().Get("mailboxes") + if err != nil { + panic(err) + } + if val != nil { + return val.(*int32) + } + return nil +} +// GetOauthApps gets the oauthApps property value. The number of impacted OAuth apps. +// returns a *int32 when successful +func (m *ImpactedAssetsCounts) GetOauthApps()(*int32) { + val, err := m.GetBackingStore().Get("oauthApps") + if err != nil { + panic(err) + } + if val != nil { + return val.(*int32) + } + return nil +} +// GetOdataType gets the @odata.type property value. The OdataType property +// returns a *string when successful +func (m *ImpactedAssetsCounts) GetOdataType()(*string) { + val, err := m.GetBackingStore().Get("odataType") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetProcesses gets the processes property value. The number of impacted processes. +// returns a *int32 when successful +func (m *ImpactedAssetsCounts) GetProcesses()(*int32) { + val, err := m.GetBackingStore().Get("processes") + if err != nil { + panic(err) + } + if val != nil { + return val.(*int32) + } + return nil +} +// GetRegistryKeys gets the registryKeys property value. The number of impacted registry keys. +// returns a *int32 when successful +func (m *ImpactedAssetsCounts) GetRegistryKeys()(*int32) { + val, err := m.GetBackingStore().Get("registryKeys") + if err != nil { + panic(err) + } + if val != nil { + return val.(*int32) + } + return nil +} +// GetSecurityGroups gets the securityGroups property value. The number of impacted security groups. +// returns a *int32 when successful +func (m *ImpactedAssetsCounts) GetSecurityGroups()(*int32) { + val, err := m.GetBackingStore().Get("securityGroups") + if err != nil { + panic(err) + } + if val != nil { + return val.(*int32) + } + return nil +} +// GetTotal gets the total property value. The total number of impacted assets. +// returns a *int32 when successful +func (m *ImpactedAssetsCounts) GetTotal()(*int32) { + val, err := m.GetBackingStore().Get("total") + if err != nil { + panic(err) + } + if val != nil { + return val.(*int32) + } + return nil +} +// GetUrls gets the urls property value. The number of impacted URLs. +// returns a *int32 when successful +func (m *ImpactedAssetsCounts) GetUrls()(*int32) { + val, err := m.GetBackingStore().Get("urls") + if err != nil { + panic(err) + } + if val != nil { + return val.(*int32) + } + return nil +} +// GetUsers gets the users property value. The number of impacted users. +// returns a *int32 when successful +func (m *ImpactedAssetsCounts) GetUsers()(*int32) { + val, err := m.GetBackingStore().Get("users") + if err != nil { + panic(err) + } + if val != nil { + return val.(*int32) + } + return nil +} +// Serialize serializes information the current object +func (m *ImpactedAssetsCounts) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("aiAgents", m.GetAiAgents()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("apps", m.GetApps()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("cloudResources", m.GetCloudResources()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("files", m.GetFiles()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("ips", m.GetIps()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("machines", m.GetMachines()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("mailboxes", m.GetMailboxes()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("oauthApps", m.GetOauthApps()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("processes", m.GetProcesses()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("registryKeys", m.GetRegistryKeys()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("securityGroups", m.GetSecurityGroups()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total", m.GetTotal()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("urls", m.GetUrls()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("users", m.GetUsers()) + 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 *ImpactedAssetsCounts) SetAdditionalData(value map[string]any)() { + err := m.GetBackingStore().Set("additionalData", value) + if err != nil { + panic(err) + } +} +// SetAiAgents sets the aiAgents property value. The number of impacted AI agents. +func (m *ImpactedAssetsCounts) SetAiAgents(value *int32)() { + err := m.GetBackingStore().Set("aiAgents", value) + if err != nil { + panic(err) + } +} +// SetApps sets the apps property value. The number of impacted apps. +func (m *ImpactedAssetsCounts) SetApps(value *int32)() { + err := m.GetBackingStore().Set("apps", value) + if err != nil { + panic(err) + } +} +// SetBackingStore sets the BackingStore property value. Stores model information. +func (m *ImpactedAssetsCounts) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetCloudResources sets the cloudResources property value. The number of impacted cloud resources. +func (m *ImpactedAssetsCounts) SetCloudResources(value *int32)() { + err := m.GetBackingStore().Set("cloudResources", value) + if err != nil { + panic(err) + } +} +// SetFiles sets the files property value. The number of impacted files. +func (m *ImpactedAssetsCounts) SetFiles(value *int32)() { + err := m.GetBackingStore().Set("files", value) + if err != nil { + panic(err) + } +} +// SetIps sets the ips property value. The number of impacted IP addresses. +func (m *ImpactedAssetsCounts) SetIps(value *int32)() { + err := m.GetBackingStore().Set("ips", value) + if err != nil { + panic(err) + } +} +// SetMachines sets the machines property value. The number of impacted machines. +func (m *ImpactedAssetsCounts) SetMachines(value *int32)() { + err := m.GetBackingStore().Set("machines", value) + if err != nil { + panic(err) + } +} +// SetMailboxes sets the mailboxes property value. The number of impacted mailboxes. +func (m *ImpactedAssetsCounts) SetMailboxes(value *int32)() { + err := m.GetBackingStore().Set("mailboxes", value) + if err != nil { + panic(err) + } +} +// SetOauthApps sets the oauthApps property value. The number of impacted OAuth apps. +func (m *ImpactedAssetsCounts) SetOauthApps(value *int32)() { + err := m.GetBackingStore().Set("oauthApps", value) + if err != nil { + panic(err) + } +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ImpactedAssetsCounts) SetOdataType(value *string)() { + err := m.GetBackingStore().Set("odataType", value) + if err != nil { + panic(err) + } +} +// SetProcesses sets the processes property value. The number of impacted processes. +func (m *ImpactedAssetsCounts) SetProcesses(value *int32)() { + err := m.GetBackingStore().Set("processes", value) + if err != nil { + panic(err) + } +} +// SetRegistryKeys sets the registryKeys property value. The number of impacted registry keys. +func (m *ImpactedAssetsCounts) SetRegistryKeys(value *int32)() { + err := m.GetBackingStore().Set("registryKeys", value) + if err != nil { + panic(err) + } +} +// SetSecurityGroups sets the securityGroups property value. The number of impacted security groups. +func (m *ImpactedAssetsCounts) SetSecurityGroups(value *int32)() { + err := m.GetBackingStore().Set("securityGroups", value) + if err != nil { + panic(err) + } +} +// SetTotal sets the total property value. The total number of impacted assets. +func (m *ImpactedAssetsCounts) SetTotal(value *int32)() { + err := m.GetBackingStore().Set("total", value) + if err != nil { + panic(err) + } +} +// SetUrls sets the urls property value. The number of impacted URLs. +func (m *ImpactedAssetsCounts) SetUrls(value *int32)() { + err := m.GetBackingStore().Set("urls", value) + if err != nil { + panic(err) + } +} +// SetUsers sets the users property value. The number of impacted users. +func (m *ImpactedAssetsCounts) SetUsers(value *int32)() { + err := m.GetBackingStore().Set("users", value) + if err != nil { + panic(err) + } +} +type ImpactedAssetsCountsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAiAgents()(*int32) + GetApps()(*int32) + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetCloudResources()(*int32) + GetFiles()(*int32) + GetIps()(*int32) + GetMachines()(*int32) + GetMailboxes()(*int32) + GetOauthApps()(*int32) + GetOdataType()(*string) + GetProcesses()(*int32) + GetRegistryKeys()(*int32) + GetSecurityGroups()(*int32) + GetTotal()(*int32) + GetUrls()(*int32) + GetUsers()(*int32) + SetAiAgents(value *int32)() + SetApps(value *int32)() + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetCloudResources(value *int32)() + SetFiles(value *int32)() + SetIps(value *int32)() + SetMachines(value *int32)() + SetMailboxes(value *int32)() + SetOauthApps(value *int32)() + SetOdataType(value *string)() + SetProcesses(value *int32)() + SetRegistryKeys(value *int32)() + SetSecurityGroups(value *int32)() + SetTotal(value *int32)() + SetUrls(value *int32)() + SetUsers(value *int32)() +} diff --git a/models/security/casemanagement/incident_case.go b/models/security/casemanagement/incident_case.go new file mode 100644 index 00000000000..46dca406d2e --- /dev/null +++ b/models/security/casemanagement/incident_case.go @@ -0,0 +1,1451 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package casemanagement + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type IncidentCase struct { + CaseEscaped +} +// NewIncidentCase instantiates a new IncidentCase and sets the default values. +func NewIncidentCase()(*IncidentCase) { + m := &IncidentCase{ + CaseEscaped: *NewCaseEscaped(), + } + odataTypeValue := "#microsoft.graph.security.caseManagement.incidentCase" + m.SetOdataType(&odataTypeValue) + return m +} +// CreateIncidentCaseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateIncidentCaseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIncidentCase(), nil +} +// GetAiAgentIds gets the aiAgentIds property value. The list of AI agent identifiers associated with the incident. +// returns a []string when successful +func (m *IncidentCase) GetAiAgentIds()([]string) { + val, err := m.GetBackingStore().Get("aiAgentIds") + if err != nil { + panic(err) + } + if val != nil { + return val.([]string) + } + return nil +} +// GetAlertCounts gets the alertCounts property value. A summary of alert counts grouped by severity and status. +// returns a AlertCountsable when successful +func (m *IncidentCase) GetAlertCounts()(AlertCountsable) { + val, err := m.GetBackingStore().Get("alertCounts") + if err != nil { + panic(err) + } + if val != nil { + return val.(AlertCountsable) + } + return nil +} +// GetAlertPolicyIds gets the alertPolicyIds property value. The list of alert policy identifiers associated with the incident. +// returns a []string when successful +func (m *IncidentCase) GetAlertPolicyIds()([]string) { + val, err := m.GetBackingStore().Get("alertPolicyIds") + if err != nil { + panic(err) + } + if val != nil { + return val.([]string) + } + return nil +} +// GetAssignedTo gets the assignedTo property value. The user assigned to investigate the incident case. +// returns a *string when successful +func (m *IncidentCase) GetAssignedTo()(*string) { + val, err := m.GetBackingStore().Get("assignedTo") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetAssociatedThreatIds gets the associatedThreatIds property value. The list of threat identifiers associated with the incident. +// returns a []string when successful +func (m *IncidentCase) GetAssociatedThreatIds()([]string) { + val, err := m.GetBackingStore().Get("associatedThreatIds") + if err != nil { + panic(err) + } + if val != nil { + return val.([]string) + } + return nil +} +// GetCategories gets the categories property value. The incident categories. +// returns a []string when successful +func (m *IncidentCase) GetCategories()([]string) { + val, err := m.GetBackingStore().Get("categories") + if err != nil { + panic(err) + } + if val != nil { + return val.([]string) + } + return nil +} +// GetClassification gets the classification property value. The classification property +// returns a *IncidentClassification when successful +func (m *IncidentCase) GetClassification()(*IncidentClassification) { + val, err := m.GetBackingStore().Get("classification") + if err != nil { + panic(err) + } + if val != nil { + return val.(*IncidentClassification) + } + return nil +} +// GetCloudScopes gets the cloudScopes property value. The cloud scopes associated with the incident. +// returns a []string when successful +func (m *IncidentCase) GetCloudScopes()([]string) { + val, err := m.GetBackingStore().Get("cloudScopes") + if err != nil { + panic(err) + } + if val != nil { + return val.([]string) + } + return nil +} +// GetDataSensitivityLabels gets the dataSensitivityLabels property value. The data sensitivity labels associated with the incident. +// returns a []string when successful +func (m *IncidentCase) GetDataSensitivityLabels()([]string) { + val, err := m.GetBackingStore().Get("dataSensitivityLabels") + if err != nil { + panic(err) + } + if val != nil { + return val.([]string) + } + return nil +} +// GetDataStreams gets the dataStreams property value. The data streams associated with the incident. +// returns a []string when successful +func (m *IncidentCase) GetDataStreams()([]string) { + val, err := m.GetBackingStore().Get("dataStreams") + if err != nil { + panic(err) + } + if val != nil { + return val.([]string) + } + return nil +} +// GetDetectionSources gets the detectionSources property value. The detection sources that identified the incident. +// returns a []string when successful +func (m *IncidentCase) GetDetectionSources()([]string) { + val, err := m.GetBackingStore().Get("detectionSources") + if err != nil { + panic(err) + } + if val != nil { + return val.([]string) + } + return nil +} +// GetDetermination gets the determination property value. The determination property +// returns a *IncidentDetermination when successful +func (m *IncidentCase) GetDetermination()(*IncidentDetermination) { + val, err := m.GetBackingStore().Get("determination") + if err != nil { + panic(err) + } + if val != nil { + return val.(*IncidentDetermination) + } + return nil +} +// GetDueDateTime gets the dueDateTime property value. The target completion date and time for the incident case. +// returns a *Time when successful +func (m *IncidentCase) GetDueDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + val, err := m.GetBackingStore().Get("dueDateTime") + if err != nil { + panic(err) + } + if val != nil { + return val.(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + } + return nil +} +// GetEmailNotificationRecipients gets the emailNotificationRecipients property value. The email notification recipients for the incident case. +// returns a []string when successful +func (m *IncidentCase) GetEmailNotificationRecipients()([]string) { + val, err := m.GetBackingStore().Get("emailNotificationRecipients") + if err != nil { + panic(err) + } + if val != nil { + return val.([]string) + } + return nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *IncidentCase) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.CaseEscaped.GetFieldDeserializers() + res["aiAgentIds"] = 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.SetAiAgentIds(res) + } + return nil + } + res["alertCounts"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAlertCountsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAlertCounts(val.(AlertCountsable)) + } + return nil + } + res["alertPolicyIds"] = 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.SetAlertPolicyIds(res) + } + return nil + } + res["assignedTo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAssignedTo(val) + } + return nil + } + res["associatedThreatIds"] = 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.SetAssociatedThreatIds(res) + } + return nil + } + res["categories"] = 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.SetCategories(res) + } + return nil + } + res["classification"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseIncidentClassification) + if err != nil { + return err + } + if val != nil { + m.SetClassification(val.(*IncidentClassification)) + } + return nil + } + res["cloudScopes"] = 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.SetCloudScopes(res) + } + return nil + } + res["dataSensitivityLabels"] = 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.SetDataSensitivityLabels(res) + } + return nil + } + res["dataStreams"] = 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.SetDataStreams(res) + } + return nil + } + res["detectionSources"] = 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.SetDetectionSources(res) + } + return nil + } + res["determination"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseIncidentDetermination) + if err != nil { + return err + } + if val != nil { + m.SetDetermination(val.(*IncidentDetermination)) + } + return nil + } + res["dueDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetDueDateTime(val) + } + return nil + } + res["emailNotificationRecipients"] = 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.SetEmailNotificationRecipients(res) + } + return nil + } + res["firstEventTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetFirstEventTime(val) + } + return nil + } + res["impactedAssets"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateImpactedAssetsCountsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetImpactedAssets(val.(ImpactedAssetsCountsable)) + } + return nil + } + res["incidentId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetIncidentId(val) + } + return nil + } + res["incidentWebUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIncidentWebUrl(val) + } + return nil + } + res["investigation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateInvestigationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInvestigation(val.(Investigationable)) + } + return nil + } + res["investigationIds"] = 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.SetInvestigationIds(res) + } + return nil + } + res["investigationStates"] = 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.SetInvestigationStates(res) + } + return nil + } + res["lastEventTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastEventTime(val) + } + return nil + } + res["machineGroupIds"] = 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.SetMachineGroupIds(res) + } + return nil + } + res["osPlatforms"] = 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.SetOsPlatforms(res) + } + return nil + } + res["policyNames"] = 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.SetPolicyNames(res) + } + return nil + } + res["priorityScore"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPriorityScore(val) + } + return nil + } + res["productNames"] = 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.SetProductNames(res) + } + return nil + } + res["redirectCaseId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetRedirectCaseId(val) + } + return nil + } + res["redirectIncidentId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetRedirectIncidentId(val) + } + return nil + } + res["serviceSources"] = 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.SetServiceSources(res) + } + return nil + } + res["severity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseIncidentSeverity) + if err != nil { + return err + } + if val != nil { + m.SetSeverity(val.(*IncidentSeverity)) + } + return nil + } + res["summary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSummary(val) + } + return nil + } + res["systemTags"] = 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.SetSystemTags(res) + } + return nil + } + res["topRiskScore"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTopRiskScore(val) + } + return nil + } + res["workspaceIds"] = 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.SetWorkspaceIds(res) + } + return nil + } + return res +} +// GetFirstEventTime gets the firstEventTime property value. The date and time of the first event in the incident. +// returns a *Time when successful +func (m *IncidentCase) GetFirstEventTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + val, err := m.GetBackingStore().Get("firstEventTime") + if err != nil { + panic(err) + } + if val != nil { + return val.(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + } + return nil +} +// GetImpactedAssets gets the impactedAssets property value. A summary of impacted asset counts for the incident. +// returns a ImpactedAssetsCountsable when successful +func (m *IncidentCase) GetImpactedAssets()(ImpactedAssetsCountsable) { + val, err := m.GetBackingStore().Get("impactedAssets") + if err != nil { + panic(err) + } + if val != nil { + return val.(ImpactedAssetsCountsable) + } + return nil +} +// GetIncidentId gets the incidentId property value. The Microsoft Security incident identifier. +// returns a *int64 when successful +func (m *IncidentCase) GetIncidentId()(*int64) { + val, err := m.GetBackingStore().Get("incidentId") + if err != nil { + panic(err) + } + if val != nil { + return val.(*int64) + } + return nil +} +// GetIncidentWebUrl gets the incidentWebUrl property value. The URL for the incident in the Microsoft Defender portal. +// returns a *string when successful +func (m *IncidentCase) GetIncidentWebUrl()(*string) { + val, err := m.GetBackingStore().Get("incidentWebUrl") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetInvestigation gets the investigation property value. A summary of investigation details associated with the incident. +// returns a Investigationable when successful +func (m *IncidentCase) GetInvestigation()(Investigationable) { + val, err := m.GetBackingStore().Get("investigation") + if err != nil { + panic(err) + } + if val != nil { + return val.(Investigationable) + } + return nil +} +// GetInvestigationIds gets the investigationIds property value. The list of investigation identifiers associated with the incident. +// returns a []string when successful +func (m *IncidentCase) GetInvestigationIds()([]string) { + val, err := m.GetBackingStore().Get("investigationIds") + if err != nil { + panic(err) + } + if val != nil { + return val.([]string) + } + return nil +} +// GetInvestigationStates gets the investigationStates property value. The list of investigation states associated with the incident. +// returns a []string when successful +func (m *IncidentCase) GetInvestigationStates()([]string) { + val, err := m.GetBackingStore().Get("investigationStates") + if err != nil { + panic(err) + } + if val != nil { + return val.([]string) + } + return nil +} +// GetLastEventTime gets the lastEventTime property value. The date and time of the most recent event in the incident. +// returns a *Time when successful +func (m *IncidentCase) GetLastEventTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + val, err := m.GetBackingStore().Get("lastEventTime") + if err != nil { + panic(err) + } + if val != nil { + return val.(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + } + return nil +} +// GetMachineGroupIds gets the machineGroupIds property value. The list of machine group identifiers associated with the incident. +// returns a []string when successful +func (m *IncidentCase) GetMachineGroupIds()([]string) { + val, err := m.GetBackingStore().Get("machineGroupIds") + if err != nil { + panic(err) + } + if val != nil { + return val.([]string) + } + return nil +} +// GetOsPlatforms gets the osPlatforms property value. The operating system platforms associated with the incident. +// returns a []string when successful +func (m *IncidentCase) GetOsPlatforms()([]string) { + val, err := m.GetBackingStore().Get("osPlatforms") + if err != nil { + panic(err) + } + if val != nil { + return val.([]string) + } + return nil +} +// GetPolicyNames gets the policyNames property value. The policy names associated with the incident. +// returns a []string when successful +func (m *IncidentCase) GetPolicyNames()([]string) { + val, err := m.GetBackingStore().Get("policyNames") + if err != nil { + panic(err) + } + if val != nil { + return val.([]string) + } + return nil +} +// GetPriorityScore gets the priorityScore property value. The priority score assigned to the incident. +// returns a *int32 when successful +func (m *IncidentCase) GetPriorityScore()(*int32) { + val, err := m.GetBackingStore().Get("priorityScore") + if err != nil { + panic(err) + } + if val != nil { + return val.(*int32) + } + return nil +} +// GetProductNames gets the productNames property value. The product names associated with the incident. +// returns a []string when successful +func (m *IncidentCase) GetProductNames()([]string) { + val, err := m.GetBackingStore().Get("productNames") + if err != nil { + panic(err) + } + if val != nil { + return val.([]string) + } + return nil +} +// GetRedirectCaseId gets the redirectCaseId property value. The case identifier to which this case redirects when merged. +// returns a *int64 when successful +func (m *IncidentCase) GetRedirectCaseId()(*int64) { + val, err := m.GetBackingStore().Get("redirectCaseId") + if err != nil { + panic(err) + } + if val != nil { + return val.(*int64) + } + return nil +} +// GetRedirectIncidentId gets the redirectIncidentId property value. The incident identifier to which this incident redirects when merged. +// returns a *int64 when successful +func (m *IncidentCase) GetRedirectIncidentId()(*int64) { + val, err := m.GetBackingStore().Get("redirectIncidentId") + if err != nil { + panic(err) + } + if val != nil { + return val.(*int64) + } + return nil +} +// GetServiceSources gets the serviceSources property value. The service sources associated with the incident. +// returns a []string when successful +func (m *IncidentCase) GetServiceSources()([]string) { + val, err := m.GetBackingStore().Get("serviceSources") + if err != nil { + panic(err) + } + if val != nil { + return val.([]string) + } + return nil +} +// GetSeverity gets the severity property value. The severity property +// returns a *IncidentSeverity when successful +func (m *IncidentCase) GetSeverity()(*IncidentSeverity) { + val, err := m.GetBackingStore().Get("severity") + if err != nil { + panic(err) + } + if val != nil { + return val.(*IncidentSeverity) + } + return nil +} +// GetSummary gets the summary property value. A summary of the incident. +// returns a *string when successful +func (m *IncidentCase) GetSummary()(*string) { + val, err := m.GetBackingStore().Get("summary") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetSystemTags gets the systemTags property value. The system tags associated with the incident. +// returns a []string when successful +func (m *IncidentCase) GetSystemTags()([]string) { + val, err := m.GetBackingStore().Get("systemTags") + if err != nil { + panic(err) + } + if val != nil { + return val.([]string) + } + return nil +} +// GetTopRiskScore gets the topRiskScore property value. The top risk score associated with the incident. +// returns a *int32 when successful +func (m *IncidentCase) GetTopRiskScore()(*int32) { + val, err := m.GetBackingStore().Get("topRiskScore") + if err != nil { + panic(err) + } + if val != nil { + return val.(*int32) + } + return nil +} +// GetWorkspaceIds gets the workspaceIds property value. The list of workspace identifiers associated with the incident. +// returns a []string when successful +func (m *IncidentCase) GetWorkspaceIds()([]string) { + val, err := m.GetBackingStore().Get("workspaceIds") + if err != nil { + panic(err) + } + if val != nil { + return val.([]string) + } + return nil +} +// Serialize serializes information the current object +func (m *IncidentCase) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.CaseEscaped.Serialize(writer) + if err != nil { + return err + } + if m.GetAiAgentIds() != nil { + err = writer.WriteCollectionOfStringValues("aiAgentIds", m.GetAiAgentIds()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("alertCounts", m.GetAlertCounts()) + if err != nil { + return err + } + } + if m.GetAlertPolicyIds() != nil { + err = writer.WriteCollectionOfStringValues("alertPolicyIds", m.GetAlertPolicyIds()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("assignedTo", m.GetAssignedTo()) + if err != nil { + return err + } + } + if m.GetAssociatedThreatIds() != nil { + err = writer.WriteCollectionOfStringValues("associatedThreatIds", m.GetAssociatedThreatIds()) + if err != nil { + return err + } + } + if m.GetCategories() != nil { + err = writer.WriteCollectionOfStringValues("categories", m.GetCategories()) + if err != nil { + return err + } + } + if m.GetClassification() != nil { + cast := (*m.GetClassification()).String() + err = writer.WriteStringValue("classification", &cast) + if err != nil { + return err + } + } + if m.GetCloudScopes() != nil { + err = writer.WriteCollectionOfStringValues("cloudScopes", m.GetCloudScopes()) + if err != nil { + return err + } + } + if m.GetDataSensitivityLabels() != nil { + err = writer.WriteCollectionOfStringValues("dataSensitivityLabels", m.GetDataSensitivityLabels()) + if err != nil { + return err + } + } + if m.GetDataStreams() != nil { + err = writer.WriteCollectionOfStringValues("dataStreams", m.GetDataStreams()) + if err != nil { + return err + } + } + if m.GetDetectionSources() != nil { + err = writer.WriteCollectionOfStringValues("detectionSources", m.GetDetectionSources()) + if err != nil { + return err + } + } + if m.GetDetermination() != nil { + cast := (*m.GetDetermination()).String() + err = writer.WriteStringValue("determination", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("dueDateTime", m.GetDueDateTime()) + if err != nil { + return err + } + } + if m.GetEmailNotificationRecipients() != nil { + err = writer.WriteCollectionOfStringValues("emailNotificationRecipients", m.GetEmailNotificationRecipients()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("firstEventTime", m.GetFirstEventTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("impactedAssets", m.GetImpactedAssets()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("incidentId", m.GetIncidentId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("incidentWebUrl", m.GetIncidentWebUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("investigation", m.GetInvestigation()) + if err != nil { + return err + } + } + if m.GetInvestigationIds() != nil { + err = writer.WriteCollectionOfStringValues("investigationIds", m.GetInvestigationIds()) + if err != nil { + return err + } + } + if m.GetInvestigationStates() != nil { + err = writer.WriteCollectionOfStringValues("investigationStates", m.GetInvestigationStates()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastEventTime", m.GetLastEventTime()) + if err != nil { + return err + } + } + if m.GetMachineGroupIds() != nil { + err = writer.WriteCollectionOfStringValues("machineGroupIds", m.GetMachineGroupIds()) + if err != nil { + return err + } + } + if m.GetOsPlatforms() != nil { + err = writer.WriteCollectionOfStringValues("osPlatforms", m.GetOsPlatforms()) + if err != nil { + return err + } + } + if m.GetPolicyNames() != nil { + err = writer.WriteCollectionOfStringValues("policyNames", m.GetPolicyNames()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("priorityScore", m.GetPriorityScore()) + if err != nil { + return err + } + } + if m.GetProductNames() != nil { + err = writer.WriteCollectionOfStringValues("productNames", m.GetProductNames()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("redirectCaseId", m.GetRedirectCaseId()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("redirectIncidentId", m.GetRedirectIncidentId()) + if err != nil { + return err + } + } + if m.GetServiceSources() != nil { + err = writer.WriteCollectionOfStringValues("serviceSources", m.GetServiceSources()) + if err != nil { + return err + } + } + if m.GetSeverity() != nil { + cast := (*m.GetSeverity()).String() + err = writer.WriteStringValue("severity", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("summary", m.GetSummary()) + if err != nil { + return err + } + } + if m.GetSystemTags() != nil { + err = writer.WriteCollectionOfStringValues("systemTags", m.GetSystemTags()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("topRiskScore", m.GetTopRiskScore()) + if err != nil { + return err + } + } + if m.GetWorkspaceIds() != nil { + err = writer.WriteCollectionOfStringValues("workspaceIds", m.GetWorkspaceIds()) + if err != nil { + return err + } + } + return nil +} +// SetAiAgentIds sets the aiAgentIds property value. The list of AI agent identifiers associated with the incident. +func (m *IncidentCase) SetAiAgentIds(value []string)() { + err := m.GetBackingStore().Set("aiAgentIds", value) + if err != nil { + panic(err) + } +} +// SetAlertCounts sets the alertCounts property value. A summary of alert counts grouped by severity and status. +func (m *IncidentCase) SetAlertCounts(value AlertCountsable)() { + err := m.GetBackingStore().Set("alertCounts", value) + if err != nil { + panic(err) + } +} +// SetAlertPolicyIds sets the alertPolicyIds property value. The list of alert policy identifiers associated with the incident. +func (m *IncidentCase) SetAlertPolicyIds(value []string)() { + err := m.GetBackingStore().Set("alertPolicyIds", value) + if err != nil { + panic(err) + } +} +// SetAssignedTo sets the assignedTo property value. The user assigned to investigate the incident case. +func (m *IncidentCase) SetAssignedTo(value *string)() { + err := m.GetBackingStore().Set("assignedTo", value) + if err != nil { + panic(err) + } +} +// SetAssociatedThreatIds sets the associatedThreatIds property value. The list of threat identifiers associated with the incident. +func (m *IncidentCase) SetAssociatedThreatIds(value []string)() { + err := m.GetBackingStore().Set("associatedThreatIds", value) + if err != nil { + panic(err) + } +} +// SetCategories sets the categories property value. The incident categories. +func (m *IncidentCase) SetCategories(value []string)() { + err := m.GetBackingStore().Set("categories", value) + if err != nil { + panic(err) + } +} +// SetClassification sets the classification property value. The classification property +func (m *IncidentCase) SetClassification(value *IncidentClassification)() { + err := m.GetBackingStore().Set("classification", value) + if err != nil { + panic(err) + } +} +// SetCloudScopes sets the cloudScopes property value. The cloud scopes associated with the incident. +func (m *IncidentCase) SetCloudScopes(value []string)() { + err := m.GetBackingStore().Set("cloudScopes", value) + if err != nil { + panic(err) + } +} +// SetDataSensitivityLabels sets the dataSensitivityLabels property value. The data sensitivity labels associated with the incident. +func (m *IncidentCase) SetDataSensitivityLabels(value []string)() { + err := m.GetBackingStore().Set("dataSensitivityLabels", value) + if err != nil { + panic(err) + } +} +// SetDataStreams sets the dataStreams property value. The data streams associated with the incident. +func (m *IncidentCase) SetDataStreams(value []string)() { + err := m.GetBackingStore().Set("dataStreams", value) + if err != nil { + panic(err) + } +} +// SetDetectionSources sets the detectionSources property value. The detection sources that identified the incident. +func (m *IncidentCase) SetDetectionSources(value []string)() { + err := m.GetBackingStore().Set("detectionSources", value) + if err != nil { + panic(err) + } +} +// SetDetermination sets the determination property value. The determination property +func (m *IncidentCase) SetDetermination(value *IncidentDetermination)() { + err := m.GetBackingStore().Set("determination", value) + if err != nil { + panic(err) + } +} +// SetDueDateTime sets the dueDateTime property value. The target completion date and time for the incident case. +func (m *IncidentCase) SetDueDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + err := m.GetBackingStore().Set("dueDateTime", value) + if err != nil { + panic(err) + } +} +// SetEmailNotificationRecipients sets the emailNotificationRecipients property value. The email notification recipients for the incident case. +func (m *IncidentCase) SetEmailNotificationRecipients(value []string)() { + err := m.GetBackingStore().Set("emailNotificationRecipients", value) + if err != nil { + panic(err) + } +} +// SetFirstEventTime sets the firstEventTime property value. The date and time of the first event in the incident. +func (m *IncidentCase) SetFirstEventTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + err := m.GetBackingStore().Set("firstEventTime", value) + if err != nil { + panic(err) + } +} +// SetImpactedAssets sets the impactedAssets property value. A summary of impacted asset counts for the incident. +func (m *IncidentCase) SetImpactedAssets(value ImpactedAssetsCountsable)() { + err := m.GetBackingStore().Set("impactedAssets", value) + if err != nil { + panic(err) + } +} +// SetIncidentId sets the incidentId property value. The Microsoft Security incident identifier. +func (m *IncidentCase) SetIncidentId(value *int64)() { + err := m.GetBackingStore().Set("incidentId", value) + if err != nil { + panic(err) + } +} +// SetIncidentWebUrl sets the incidentWebUrl property value. The URL for the incident in the Microsoft Defender portal. +func (m *IncidentCase) SetIncidentWebUrl(value *string)() { + err := m.GetBackingStore().Set("incidentWebUrl", value) + if err != nil { + panic(err) + } +} +// SetInvestigation sets the investigation property value. A summary of investigation details associated with the incident. +func (m *IncidentCase) SetInvestigation(value Investigationable)() { + err := m.GetBackingStore().Set("investigation", value) + if err != nil { + panic(err) + } +} +// SetInvestigationIds sets the investigationIds property value. The list of investigation identifiers associated with the incident. +func (m *IncidentCase) SetInvestigationIds(value []string)() { + err := m.GetBackingStore().Set("investigationIds", value) + if err != nil { + panic(err) + } +} +// SetInvestigationStates sets the investigationStates property value. The list of investigation states associated with the incident. +func (m *IncidentCase) SetInvestigationStates(value []string)() { + err := m.GetBackingStore().Set("investigationStates", value) + if err != nil { + panic(err) + } +} +// SetLastEventTime sets the lastEventTime property value. The date and time of the most recent event in the incident. +func (m *IncidentCase) SetLastEventTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + err := m.GetBackingStore().Set("lastEventTime", value) + if err != nil { + panic(err) + } +} +// SetMachineGroupIds sets the machineGroupIds property value. The list of machine group identifiers associated with the incident. +func (m *IncidentCase) SetMachineGroupIds(value []string)() { + err := m.GetBackingStore().Set("machineGroupIds", value) + if err != nil { + panic(err) + } +} +// SetOsPlatforms sets the osPlatforms property value. The operating system platforms associated with the incident. +func (m *IncidentCase) SetOsPlatforms(value []string)() { + err := m.GetBackingStore().Set("osPlatforms", value) + if err != nil { + panic(err) + } +} +// SetPolicyNames sets the policyNames property value. The policy names associated with the incident. +func (m *IncidentCase) SetPolicyNames(value []string)() { + err := m.GetBackingStore().Set("policyNames", value) + if err != nil { + panic(err) + } +} +// SetPriorityScore sets the priorityScore property value. The priority score assigned to the incident. +func (m *IncidentCase) SetPriorityScore(value *int32)() { + err := m.GetBackingStore().Set("priorityScore", value) + if err != nil { + panic(err) + } +} +// SetProductNames sets the productNames property value. The product names associated with the incident. +func (m *IncidentCase) SetProductNames(value []string)() { + err := m.GetBackingStore().Set("productNames", value) + if err != nil { + panic(err) + } +} +// SetRedirectCaseId sets the redirectCaseId property value. The case identifier to which this case redirects when merged. +func (m *IncidentCase) SetRedirectCaseId(value *int64)() { + err := m.GetBackingStore().Set("redirectCaseId", value) + if err != nil { + panic(err) + } +} +// SetRedirectIncidentId sets the redirectIncidentId property value. The incident identifier to which this incident redirects when merged. +func (m *IncidentCase) SetRedirectIncidentId(value *int64)() { + err := m.GetBackingStore().Set("redirectIncidentId", value) + if err != nil { + panic(err) + } +} +// SetServiceSources sets the serviceSources property value. The service sources associated with the incident. +func (m *IncidentCase) SetServiceSources(value []string)() { + err := m.GetBackingStore().Set("serviceSources", value) + if err != nil { + panic(err) + } +} +// SetSeverity sets the severity property value. The severity property +func (m *IncidentCase) SetSeverity(value *IncidentSeverity)() { + err := m.GetBackingStore().Set("severity", value) + if err != nil { + panic(err) + } +} +// SetSummary sets the summary property value. A summary of the incident. +func (m *IncidentCase) SetSummary(value *string)() { + err := m.GetBackingStore().Set("summary", value) + if err != nil { + panic(err) + } +} +// SetSystemTags sets the systemTags property value. The system tags associated with the incident. +func (m *IncidentCase) SetSystemTags(value []string)() { + err := m.GetBackingStore().Set("systemTags", value) + if err != nil { + panic(err) + } +} +// SetTopRiskScore sets the topRiskScore property value. The top risk score associated with the incident. +func (m *IncidentCase) SetTopRiskScore(value *int32)() { + err := m.GetBackingStore().Set("topRiskScore", value) + if err != nil { + panic(err) + } +} +// SetWorkspaceIds sets the workspaceIds property value. The list of workspace identifiers associated with the incident. +func (m *IncidentCase) SetWorkspaceIds(value []string)() { + err := m.GetBackingStore().Set("workspaceIds", value) + if err != nil { + panic(err) + } +} +type IncidentCaseable interface { + CaseEscapedable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAiAgentIds()([]string) + GetAlertCounts()(AlertCountsable) + GetAlertPolicyIds()([]string) + GetAssignedTo()(*string) + GetAssociatedThreatIds()([]string) + GetCategories()([]string) + GetClassification()(*IncidentClassification) + GetCloudScopes()([]string) + GetDataSensitivityLabels()([]string) + GetDataStreams()([]string) + GetDetectionSources()([]string) + GetDetermination()(*IncidentDetermination) + GetDueDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetEmailNotificationRecipients()([]string) + GetFirstEventTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetImpactedAssets()(ImpactedAssetsCountsable) + GetIncidentId()(*int64) + GetIncidentWebUrl()(*string) + GetInvestigation()(Investigationable) + GetInvestigationIds()([]string) + GetInvestigationStates()([]string) + GetLastEventTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetMachineGroupIds()([]string) + GetOsPlatforms()([]string) + GetPolicyNames()([]string) + GetPriorityScore()(*int32) + GetProductNames()([]string) + GetRedirectCaseId()(*int64) + GetRedirectIncidentId()(*int64) + GetServiceSources()([]string) + GetSeverity()(*IncidentSeverity) + GetSummary()(*string) + GetSystemTags()([]string) + GetTopRiskScore()(*int32) + GetWorkspaceIds()([]string) + SetAiAgentIds(value []string)() + SetAlertCounts(value AlertCountsable)() + SetAlertPolicyIds(value []string)() + SetAssignedTo(value *string)() + SetAssociatedThreatIds(value []string)() + SetCategories(value []string)() + SetClassification(value *IncidentClassification)() + SetCloudScopes(value []string)() + SetDataSensitivityLabels(value []string)() + SetDataStreams(value []string)() + SetDetectionSources(value []string)() + SetDetermination(value *IncidentDetermination)() + SetDueDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetEmailNotificationRecipients(value []string)() + SetFirstEventTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetImpactedAssets(value ImpactedAssetsCountsable)() + SetIncidentId(value *int64)() + SetIncidentWebUrl(value *string)() + SetInvestigation(value Investigationable)() + SetInvestigationIds(value []string)() + SetInvestigationStates(value []string)() + SetLastEventTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetMachineGroupIds(value []string)() + SetOsPlatforms(value []string)() + SetPolicyNames(value []string)() + SetPriorityScore(value *int32)() + SetProductNames(value []string)() + SetRedirectCaseId(value *int64)() + SetRedirectIncidentId(value *int64)() + SetServiceSources(value []string)() + SetSeverity(value *IncidentSeverity)() + SetSummary(value *string)() + SetSystemTags(value []string)() + SetTopRiskScore(value *int32)() + SetWorkspaceIds(value []string)() +} diff --git a/models/security/casemanagement/incident_classification.go b/models/security/casemanagement/incident_classification.go new file mode 100644 index 00000000000..f073a1cf3fd --- /dev/null +++ b/models/security/casemanagement/incident_classification.go @@ -0,0 +1,45 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package casemanagement +type IncidentClassification int + +const ( + UNKNOWN_INCIDENTCLASSIFICATION IncidentClassification = iota + FALSEPOSITIVE_INCIDENTCLASSIFICATION + TRUEPOSITIVE_INCIDENTCLASSIFICATION + INFORMATIONALEXPECTEDACTIVITY_INCIDENTCLASSIFICATION + UNKNOWNFUTUREVALUE_INCIDENTCLASSIFICATION +) + +func (i IncidentClassification) String() string { + return []string{"unknown", "falsePositive", "truePositive", "informationalExpectedActivity", "unknownFutureValue"}[i] +} +func ParseIncidentClassification(v string) (any, error) { + result := UNKNOWN_INCIDENTCLASSIFICATION + switch v { + case "unknown": + result = UNKNOWN_INCIDENTCLASSIFICATION + case "falsePositive": + result = FALSEPOSITIVE_INCIDENTCLASSIFICATION + case "truePositive": + result = TRUEPOSITIVE_INCIDENTCLASSIFICATION + case "informationalExpectedActivity": + result = INFORMATIONALEXPECTEDACTIVITY_INCIDENTCLASSIFICATION + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_INCIDENTCLASSIFICATION + default: + return nil, nil + } + return &result, nil +} +func SerializeIncidentClassification(values []IncidentClassification) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i IncidentClassification) isMultiValue() bool { + return false +} diff --git a/models/security/casemanagement/incident_determination.go b/models/security/casemanagement/incident_determination.go new file mode 100644 index 00000000000..5fc668057f4 --- /dev/null +++ b/models/security/casemanagement/incident_determination.go @@ -0,0 +1,78 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package casemanagement +type IncidentDetermination int + +const ( + UNKNOWN_INCIDENTDETERMINATION IncidentDetermination = iota + APT_INCIDENTDETERMINATION + MALWARE_INCIDENTDETERMINATION + SECURITYPERSONNEL_INCIDENTDETERMINATION + SECURITYTESTING_INCIDENTDETERMINATION + UNWANTEDSOFTWARE_INCIDENTDETERMINATION + OTHER_INCIDENTDETERMINATION + MULTISTAGEDATTACK_INCIDENTDETERMINATION + COMPROMISEDACCOUNT_INCIDENTDETERMINATION + PHISHING_INCIDENTDETERMINATION + MALICIOUSUSERACTIVITY_INCIDENTDETERMINATION + NOTMALICIOUS_INCIDENTDETERMINATION + NOTENOUGHDATATOVALIDATE_INCIDENTDETERMINATION + CONFIRMEDACTIVITY_INCIDENTDETERMINATION + LINEOFBUSINESSAPPLICATION_INCIDENTDETERMINATION + UNKNOWNFUTUREVALUE_INCIDENTDETERMINATION +) + +func (i IncidentDetermination) String() string { + return []string{"unknown", "apt", "malware", "securityPersonnel", "securityTesting", "unwantedSoftware", "other", "multiStagedAttack", "compromisedAccount", "phishing", "maliciousUserActivity", "notMalicious", "notEnoughDataToValidate", "confirmedActivity", "lineOfBusinessApplication", "unknownFutureValue"}[i] +} +func ParseIncidentDetermination(v string) (any, error) { + result := UNKNOWN_INCIDENTDETERMINATION + switch v { + case "unknown": + result = UNKNOWN_INCIDENTDETERMINATION + case "apt": + result = APT_INCIDENTDETERMINATION + case "malware": + result = MALWARE_INCIDENTDETERMINATION + case "securityPersonnel": + result = SECURITYPERSONNEL_INCIDENTDETERMINATION + case "securityTesting": + result = SECURITYTESTING_INCIDENTDETERMINATION + case "unwantedSoftware": + result = UNWANTEDSOFTWARE_INCIDENTDETERMINATION + case "other": + result = OTHER_INCIDENTDETERMINATION + case "multiStagedAttack": + result = MULTISTAGEDATTACK_INCIDENTDETERMINATION + case "compromisedAccount": + result = COMPROMISEDACCOUNT_INCIDENTDETERMINATION + case "phishing": + result = PHISHING_INCIDENTDETERMINATION + case "maliciousUserActivity": + result = MALICIOUSUSERACTIVITY_INCIDENTDETERMINATION + case "notMalicious": + result = NOTMALICIOUS_INCIDENTDETERMINATION + case "notEnoughDataToValidate": + result = NOTENOUGHDATATOVALIDATE_INCIDENTDETERMINATION + case "confirmedActivity": + result = CONFIRMEDACTIVITY_INCIDENTDETERMINATION + case "lineOfBusinessApplication": + result = LINEOFBUSINESSAPPLICATION_INCIDENTDETERMINATION + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_INCIDENTDETERMINATION + default: + return nil, nil + } + return &result, nil +} +func SerializeIncidentDetermination(values []IncidentDetermination) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i IncidentDetermination) isMultiValue() bool { + return false +} diff --git a/models/security/casemanagement/incident_relation.go b/models/security/casemanagement/incident_relation.go new file mode 100644 index 00000000000..0663f5f150c --- /dev/null +++ b/models/security/casemanagement/incident_relation.go @@ -0,0 +1,44 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package casemanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type IncidentRelation struct { + Relation +} +// NewIncidentRelation instantiates a new IncidentRelation and sets the default values. +func NewIncidentRelation()(*IncidentRelation) { + m := &IncidentRelation{ + Relation: *NewRelation(), + } + odataTypeValue := "#microsoft.graph.security.caseManagement.incidentRelation" + m.SetOdataType(&odataTypeValue) + return m +} +// CreateIncidentRelationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateIncidentRelationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIncidentRelation(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *IncidentRelation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Relation.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *IncidentRelation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Relation.Serialize(writer) + if err != nil { + return err + } + return nil +} +type IncidentRelationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + Relationable +} diff --git a/models/security/casemanagement/incident_severity.go b/models/security/casemanagement/incident_severity.go new file mode 100644 index 00000000000..7180fa99ae8 --- /dev/null +++ b/models/security/casemanagement/incident_severity.go @@ -0,0 +1,48 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package casemanagement +type IncidentSeverity int + +const ( + UNKNOWN_INCIDENTSEVERITY IncidentSeverity = iota + INFORMATIONAL_INCIDENTSEVERITY + LOW_INCIDENTSEVERITY + MEDIUM_INCIDENTSEVERITY + HIGH_INCIDENTSEVERITY + UNKNOWNFUTUREVALUE_INCIDENTSEVERITY +) + +func (i IncidentSeverity) String() string { + return []string{"unknown", "informational", "low", "medium", "high", "unknownFutureValue"}[i] +} +func ParseIncidentSeverity(v string) (any, error) { + result := UNKNOWN_INCIDENTSEVERITY + switch v { + case "unknown": + result = UNKNOWN_INCIDENTSEVERITY + case "informational": + result = INFORMATIONAL_INCIDENTSEVERITY + case "low": + result = LOW_INCIDENTSEVERITY + case "medium": + result = MEDIUM_INCIDENTSEVERITY + case "high": + result = HIGH_INCIDENTSEVERITY + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_INCIDENTSEVERITY + default: + return nil, nil + } + return &result, nil +} +func SerializeIncidentSeverity(values []IncidentSeverity) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i IncidentSeverity) isMultiValue() bool { + return false +} diff --git a/models/security/casemanagement/incident_severity_counts.go b/models/security/casemanagement/incident_severity_counts.go new file mode 100644 index 00000000000..4b41ae06375 --- /dev/null +++ b/models/security/casemanagement/incident_severity_counts.go @@ -0,0 +1,301 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package casemanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +type IncidentSeverityCounts struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewIncidentSeverityCounts instantiates a new IncidentSeverityCounts and sets the default values. +func NewIncidentSeverityCounts()(*IncidentSeverityCounts) { + m := &IncidentSeverityCounts{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateIncidentSeverityCountsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateIncidentSeverityCountsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIncidentSeverityCounts(), 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. +// returns a map[string]any when successful +func (m *IncidentSeverityCounts) 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. +// returns a BackingStore when successful +func (m *IncidentSeverityCounts) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *IncidentSeverityCounts) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["high"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetHigh(val) + } + return nil + } + res["informational"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetInformational(val) + } + return nil + } + res["low"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetLow(val) + } + return nil + } + res["medium"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMedium(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["unknown"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetUnknown(val) + } + return nil + } + return res +} +// GetHigh gets the high property value. The number of alerts with high severity. +// returns a *int32 when successful +func (m *IncidentSeverityCounts) GetHigh()(*int32) { + val, err := m.GetBackingStore().Get("high") + if err != nil { + panic(err) + } + if val != nil { + return val.(*int32) + } + return nil +} +// GetInformational gets the informational property value. The number of alerts with informational severity. +// returns a *int32 when successful +func (m *IncidentSeverityCounts) GetInformational()(*int32) { + val, err := m.GetBackingStore().Get("informational") + if err != nil { + panic(err) + } + if val != nil { + return val.(*int32) + } + return nil +} +// GetLow gets the low property value. The number of alerts with low severity. +// returns a *int32 when successful +func (m *IncidentSeverityCounts) GetLow()(*int32) { + val, err := m.GetBackingStore().Get("low") + if err != nil { + panic(err) + } + if val != nil { + return val.(*int32) + } + return nil +} +// GetMedium gets the medium property value. The number of alerts with medium severity. +// returns a *int32 when successful +func (m *IncidentSeverityCounts) GetMedium()(*int32) { + val, err := m.GetBackingStore().Get("medium") + if err != nil { + panic(err) + } + if val != nil { + return val.(*int32) + } + return nil +} +// GetOdataType gets the @odata.type property value. The OdataType property +// returns a *string when successful +func (m *IncidentSeverityCounts) GetOdataType()(*string) { + val, err := m.GetBackingStore().Get("odataType") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetUnknown gets the unknown property value. The number of alerts with unknown severity. +// returns a *int32 when successful +func (m *IncidentSeverityCounts) GetUnknown()(*int32) { + val, err := m.GetBackingStore().Get("unknown") + if err != nil { + panic(err) + } + if val != nil { + return val.(*int32) + } + return nil +} +// Serialize serializes information the current object +func (m *IncidentSeverityCounts) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("high", m.GetHigh()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("informational", m.GetInformational()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("low", m.GetLow()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("medium", m.GetMedium()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("unknown", m.GetUnknown()) + 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 *IncidentSeverityCounts) 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 *IncidentSeverityCounts) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetHigh sets the high property value. The number of alerts with high severity. +func (m *IncidentSeverityCounts) SetHigh(value *int32)() { + err := m.GetBackingStore().Set("high", value) + if err != nil { + panic(err) + } +} +// SetInformational sets the informational property value. The number of alerts with informational severity. +func (m *IncidentSeverityCounts) SetInformational(value *int32)() { + err := m.GetBackingStore().Set("informational", value) + if err != nil { + panic(err) + } +} +// SetLow sets the low property value. The number of alerts with low severity. +func (m *IncidentSeverityCounts) SetLow(value *int32)() { + err := m.GetBackingStore().Set("low", value) + if err != nil { + panic(err) + } +} +// SetMedium sets the medium property value. The number of alerts with medium severity. +func (m *IncidentSeverityCounts) SetMedium(value *int32)() { + err := m.GetBackingStore().Set("medium", value) + if err != nil { + panic(err) + } +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *IncidentSeverityCounts) SetOdataType(value *string)() { + err := m.GetBackingStore().Set("odataType", value) + if err != nil { + panic(err) + } +} +// SetUnknown sets the unknown property value. The number of alerts with unknown severity. +func (m *IncidentSeverityCounts) SetUnknown(value *int32)() { + err := m.GetBackingStore().Set("unknown", value) + if err != nil { + panic(err) + } +} +type IncidentSeverityCountsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetHigh()(*int32) + GetInformational()(*int32) + GetLow()(*int32) + GetMedium()(*int32) + GetOdataType()(*string) + GetUnknown()(*int32) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetHigh(value *int32)() + SetInformational(value *int32)() + SetLow(value *int32)() + SetMedium(value *int32)() + SetOdataType(value *string)() + SetUnknown(value *int32)() +} diff --git a/models/security/casemanagement/investigation.go b/models/security/casemanagement/investigation.go new file mode 100644 index 00000000000..e365b96ac58 --- /dev/null +++ b/models/security/casemanagement/investigation.go @@ -0,0 +1,233 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package casemanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +type Investigation struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewInvestigation instantiates a new Investigation and sets the default values. +func NewInvestigation()(*Investigation) { + m := &Investigation{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateInvestigationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateInvestigationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewInvestigation(), 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. +// returns a map[string]any when successful +func (m *Investigation) 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. +// returns a BackingStore when successful +func (m *Investigation) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetCount gets the count property value. The number of investigations. +// returns a *int32 when successful +func (m *Investigation) GetCount()(*int32) { + val, err := m.GetBackingStore().Get("count") + if err != nil { + panic(err) + } + if val != nil { + return val.(*int32) + } + return nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Investigation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCount(val) + } + return nil + } + 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["@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.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetState(val) + } + return nil + } + return res +} +// GetIds gets the ids property value. The investigation identifiers. +// returns a []string when successful +func (m *Investigation) GetIds()([]string) { + val, err := m.GetBackingStore().Get("ids") + if err != nil { + panic(err) + } + if val != nil { + return val.([]string) + } + return nil +} +// GetOdataType gets the @odata.type property value. The OdataType property +// returns a *string when successful +func (m *Investigation) 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 investigation state. +// returns a *string when successful +func (m *Investigation) GetState()(*string) { + val, err := m.GetBackingStore().Get("state") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// Serialize serializes information the current object +func (m *Investigation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("count", m.GetCount()) + if err != nil { + return err + } + } + if m.GetIds() != nil { + err := writer.WriteCollectionOfStringValues("ids", m.GetIds()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("state", m.GetState()) + 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 *Investigation) 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 *Investigation) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetCount sets the count property value. The number of investigations. +func (m *Investigation) SetCount(value *int32)() { + err := m.GetBackingStore().Set("count", value) + if err != nil { + panic(err) + } +} +// SetIds sets the ids property value. The investigation identifiers. +func (m *Investigation) SetIds(value []string)() { + err := m.GetBackingStore().Set("ids", value) + if err != nil { + panic(err) + } +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *Investigation) SetOdataType(value *string)() { + err := m.GetBackingStore().Set("odataType", value) + if err != nil { + panic(err) + } +} +// SetState sets the state property value. The investigation state. +func (m *Investigation) SetState(value *string)() { + err := m.GetBackingStore().Set("state", value) + if err != nil { + panic(err) + } +} +type Investigationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetCount()(*int32) + GetIds()([]string) + GetOdataType()(*string) + GetState()(*string) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetCount(value *int32)() + SetIds(value []string)() + SetOdataType(value *string)() + SetState(value *string)() +} diff --git a/models/security/casemanagement/modified_property.go b/models/security/casemanagement/modified_property.go new file mode 100644 index 00000000000..b0f53f83f0d --- /dev/null +++ b/models/security/casemanagement/modified_property.go @@ -0,0 +1,227 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package casemanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +type ModifiedProperty struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewModifiedProperty instantiates a new ModifiedProperty and sets the default values. +func NewModifiedProperty()(*ModifiedProperty) { + m := &ModifiedProperty{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateModifiedPropertyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateModifiedPropertyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewModifiedProperty(), 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. +// returns a map[string]any when successful +func (m *ModifiedProperty) 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. +// returns a BackingStore when successful +func (m *ModifiedProperty) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ModifiedProperty) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["newValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateValuePropertyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetNewValue(val.(ValuePropertyable)) + } + 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["oldValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateValuePropertyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOldValue(val.(ValuePropertyable)) + } + return nil + } + res["propertyName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPropertyName(val) + } + return nil + } + return res +} +// GetNewValue gets the newValue property value. The new value after the change. +// returns a ValuePropertyable when successful +func (m *ModifiedProperty) GetNewValue()(ValuePropertyable) { + val, err := m.GetBackingStore().Get("newValue") + if err != nil { + panic(err) + } + if val != nil { + return val.(ValuePropertyable) + } + return nil +} +// GetOdataType gets the @odata.type property value. The OdataType property +// returns a *string when successful +func (m *ModifiedProperty) GetOdataType()(*string) { + val, err := m.GetBackingStore().Get("odataType") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetOldValue gets the oldValue property value. The previous value before the change. +// returns a ValuePropertyable when successful +func (m *ModifiedProperty) GetOldValue()(ValuePropertyable) { + val, err := m.GetBackingStore().Get("oldValue") + if err != nil { + panic(err) + } + if val != nil { + return val.(ValuePropertyable) + } + return nil +} +// GetPropertyName gets the propertyName property value. The name of the property that changed. +// returns a *string when successful +func (m *ModifiedProperty) GetPropertyName()(*string) { + val, err := m.GetBackingStore().Get("propertyName") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// Serialize serializes information the current object +func (m *ModifiedProperty) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("newValue", m.GetNewValue()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("oldValue", m.GetOldValue()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("propertyName", m.GetPropertyName()) + 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 *ModifiedProperty) 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 *ModifiedProperty) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetNewValue sets the newValue property value. The new value after the change. +func (m *ModifiedProperty) SetNewValue(value ValuePropertyable)() { + err := m.GetBackingStore().Set("newValue", value) + if err != nil { + panic(err) + } +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ModifiedProperty) SetOdataType(value *string)() { + err := m.GetBackingStore().Set("odataType", value) + if err != nil { + panic(err) + } +} +// SetOldValue sets the oldValue property value. The previous value before the change. +func (m *ModifiedProperty) SetOldValue(value ValuePropertyable)() { + err := m.GetBackingStore().Set("oldValue", value) + if err != nil { + panic(err) + } +} +// SetPropertyName sets the propertyName property value. The name of the property that changed. +func (m *ModifiedProperty) SetPropertyName(value *string)() { + err := m.GetBackingStore().Set("propertyName", value) + if err != nil { + panic(err) + } +} +type ModifiedPropertyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetNewValue()(ValuePropertyable) + GetOdataType()(*string) + GetOldValue()(ValuePropertyable) + GetPropertyName()(*string) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetNewValue(value ValuePropertyable)() + SetOdataType(value *string)() + SetOldValue(value ValuePropertyable)() + SetPropertyName(value *string)() +} diff --git a/models/security/casemanagement/recommendation_relation.go b/models/security/casemanagement/recommendation_relation.go new file mode 100644 index 00000000000..60f23df08ca --- /dev/null +++ b/models/security/casemanagement/recommendation_relation.go @@ -0,0 +1,155 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package casemanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type RecommendationRelation struct { + Relation +} +// NewRecommendationRelation instantiates a new RecommendationRelation and sets the default values. +func NewRecommendationRelation()(*RecommendationRelation) { + m := &RecommendationRelation{ + Relation: *NewRelation(), + } + odataTypeValue := "#microsoft.graph.security.caseManagement.recommendationRelation" + m.SetOdataType(&odataTypeValue) + return m +} +// CreateRecommendationRelationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRecommendationRelationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRecommendationRelation(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RecommendationRelation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Relation.GetFieldDeserializers() + res["recommendationType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRecommendationType(val) + } + return nil + } + res["resourceGroupName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetResourceGroupName(val) + } + return nil + } + res["subscriptionId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubscriptionId(val) + } + return nil + } + return res +} +// GetRecommendationType gets the recommendationType property value. The recommendation type associated with the linked recommendation. +// returns a *string when successful +func (m *RecommendationRelation) GetRecommendationType()(*string) { + val, err := m.GetBackingStore().Get("recommendationType") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetResourceGroupName gets the resourceGroupName property value. The Azure resource group name for the related recommendation. +// returns a *string when successful +func (m *RecommendationRelation) GetResourceGroupName()(*string) { + val, err := m.GetBackingStore().Get("resourceGroupName") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetSubscriptionId gets the subscriptionId property value. The Azure subscription identifier for the related recommendation. +// returns a *string when successful +func (m *RecommendationRelation) GetSubscriptionId()(*string) { + val, err := m.GetBackingStore().Get("subscriptionId") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// Serialize serializes information the current object +func (m *RecommendationRelation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Relation.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("recommendationType", m.GetRecommendationType()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("resourceGroupName", m.GetResourceGroupName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("subscriptionId", m.GetSubscriptionId()) + if err != nil { + return err + } + } + return nil +} +// SetRecommendationType sets the recommendationType property value. The recommendation type associated with the linked recommendation. +func (m *RecommendationRelation) SetRecommendationType(value *string)() { + err := m.GetBackingStore().Set("recommendationType", value) + if err != nil { + panic(err) + } +} +// SetResourceGroupName sets the resourceGroupName property value. The Azure resource group name for the related recommendation. +func (m *RecommendationRelation) SetResourceGroupName(value *string)() { + err := m.GetBackingStore().Set("resourceGroupName", value) + if err != nil { + panic(err) + } +} +// SetSubscriptionId sets the subscriptionId property value. The Azure subscription identifier for the related recommendation. +func (m *RecommendationRelation) SetSubscriptionId(value *string)() { + err := m.GetBackingStore().Set("subscriptionId", value) + if err != nil { + panic(err) + } +} +type RecommendationRelationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + Relationable + GetRecommendationType()(*string) + GetResourceGroupName()(*string) + GetSubscriptionId()(*string) + SetRecommendationType(value *string)() + SetResourceGroupName(value *string)() + SetSubscriptionId(value *string)() +} diff --git a/models/security/casemanagement/relation.go b/models/security/casemanagement/relation.go new file mode 100644 index 00000000000..a11f7baad85 --- /dev/null +++ b/models/security/casemanagement/relation.go @@ -0,0 +1,103 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package casemanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Relation struct { + CaseManagementEntity +} +// NewRelation instantiates a new Relation and sets the default values. +func NewRelation()(*Relation) { + m := &Relation{ + CaseManagementEntity: *NewCaseManagementEntity(), + } + odataTypeValue := "#microsoft.graph.security.caseManagement.relation" + m.SetOdataType(&odataTypeValue) + return m +} +// CreateRelationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRelationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.security.caseManagement.incidentRelation": + return NewIncidentRelation(), nil + case "#microsoft.graph.security.caseManagement.recommendationRelation": + return NewRecommendationRelation(), nil + case "#microsoft.graph.security.caseManagement.workspaceIndicatorRelation": + return NewWorkspaceIndicatorRelation(), nil + } + } + } + } + return NewRelation(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Relation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.CaseManagementEntity.GetFieldDeserializers() + res["relatedResourceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRelatedResourceId(val) + } + return nil + } + return res +} +// GetRelatedResourceId gets the relatedResourceId property value. The identifier of the related external resource. +// returns a *string when successful +func (m *Relation) GetRelatedResourceId()(*string) { + val, err := m.GetBackingStore().Get("relatedResourceId") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// Serialize serializes information the current object +func (m *Relation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.CaseManagementEntity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("relatedResourceId", m.GetRelatedResourceId()) + if err != nil { + return err + } + } + return nil +} +// SetRelatedResourceId sets the relatedResourceId property value. The identifier of the related external resource. +func (m *Relation) SetRelatedResourceId(value *string)() { + err := m.GetBackingStore().Set("relatedResourceId", value) + if err != nil { + panic(err) + } +} +type Relationable interface { + CaseManagementEntityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRelatedResourceId()(*string) + SetRelatedResourceId(value *string)() +} diff --git a/models/security/casemanagement/relation_collection_response.go b/models/security/casemanagement/relation_collection_response.go new file mode 100644 index 00000000000..b2981da9ada --- /dev/null +++ b/models/security/casemanagement/relation_collection_response.go @@ -0,0 +1,92 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package casemanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" +) + +type RelationCollectionResponse struct { + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BaseCollectionPaginationCountResponse +} +// NewRelationCollectionResponse instantiates a new RelationCollectionResponse and sets the default values. +func NewRelationCollectionResponse()(*RelationCollectionResponse) { + m := &RelationCollectionResponse{ + BaseCollectionPaginationCountResponse: *ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateRelationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateRelationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRelationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *RelationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRelationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Relationable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(Relationable) + } + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +// returns a []Relationable when successful +func (m *RelationCollectionResponse) GetValue()([]Relationable) { + val, err := m.GetBackingStore().Get("value") + if err != nil { + panic(err) + } + if val != nil { + return val.([]Relationable) + } + return nil +} +// Serialize serializes information the current object +func (m *RelationCollectionResponse) 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 *RelationCollectionResponse) SetValue(value []Relationable)() { + err := m.GetBackingStore().Set("value", value) + if err != nil { + panic(err) + } +} +type RelationCollectionResponseable interface { + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Relationable) + SetValue(value []Relationable)() +} diff --git a/models/security/casemanagement/string_value_property.go b/models/security/casemanagement/string_value_property.go new file mode 100644 index 00000000000..784d26a2a71 --- /dev/null +++ b/models/security/casemanagement/string_value_property.go @@ -0,0 +1,81 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package casemanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type StringValueProperty struct { + ValueProperty +} +// NewStringValueProperty instantiates a new StringValueProperty and sets the default values. +func NewStringValueProperty()(*StringValueProperty) { + m := &StringValueProperty{ + ValueProperty: *NewValueProperty(), + } + odataTypeValue := "#microsoft.graph.security.caseManagement.stringValueProperty" + m.SetOdataType(&odataTypeValue) + return m +} +// CreateStringValuePropertyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateStringValuePropertyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewStringValueProperty(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *StringValueProperty) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ValueProperty.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetValue(val) + } + return nil + } + return res +} +// GetValue gets the value property value. The string value. +// returns a *string when successful +func (m *StringValueProperty) 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 *StringValueProperty) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ValueProperty.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("value", m.GetValue()) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The string value. +func (m *StringValueProperty) SetValue(value *string)() { + err := m.GetBackingStore().Set("value", value) + if err != nil { + panic(err) + } +} +type StringValuePropertyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + ValuePropertyable + GetValue()(*string) + SetValue(value *string)() +} diff --git a/models/security/casemanagement/task.go b/models/security/casemanagement/task.go new file mode 100644 index 00000000000..98c28bf3b41 --- /dev/null +++ b/models/security/casemanagement/task.go @@ -0,0 +1,344 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package casemanagement + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type Task struct { + CaseManagementEntity +} +// NewTask instantiates a new Task and sets the default values. +func NewTask()(*Task) { + m := &Task{ + CaseManagementEntity: *NewCaseManagementEntity(), + } + odataTypeValue := "#microsoft.graph.security.caseManagement.task" + m.SetOdataType(&odataTypeValue) + return m +} +// CreateTaskFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTaskFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTask(), nil +} +// GetAssignedTo gets the assignedTo property value. The user assigned to the task. +// returns a *string when successful +func (m *Task) GetAssignedTo()(*string) { + val, err := m.GetBackingStore().Get("assignedTo") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetCategory gets the category property value. The category property +// returns a *CaseTaskCategory when successful +func (m *Task) GetCategory()(*CaseTaskCategory) { + val, err := m.GetBackingStore().Get("category") + if err != nil { + panic(err) + } + if val != nil { + return val.(*CaseTaskCategory) + } + return nil +} +// GetClosingNotes gets the closingNotes property value. Notes recorded when the task is completed. +// returns a *string when successful +func (m *Task) GetClosingNotes()(*string) { + val, err := m.GetBackingStore().Get("closingNotes") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetDescription gets the description property value. The description of the task. +// returns a *string when successful +func (m *Task) GetDescription()(*string) { + val, err := m.GetBackingStore().Get("description") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetDisplayName gets the displayName property value. The title of the task. +// returns a *string when successful +func (m *Task) GetDisplayName()(*string) { + val, err := m.GetBackingStore().Get("displayName") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetDueDateTime gets the dueDateTime property value. The target completion date and time for the task. +// returns a *Time when successful +func (m *Task) GetDueDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + val, err := m.GetBackingStore().Get("dueDateTime") + if err != nil { + panic(err) + } + if val != nil { + return val.(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + } + return nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *Task) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.CaseManagementEntity.GetFieldDeserializers() + res["assignedTo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAssignedTo(val) + } + return nil + } + res["category"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCaseTaskCategory) + if err != nil { + return err + } + if val != nil { + m.SetCategory(val.(*CaseTaskCategory)) + } + return nil + } + res["closingNotes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetClosingNotes(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + 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["dueDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetDueDateTime(val) + } + return nil + } + res["priority"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCaseTaskPriority) + if err != nil { + return err + } + if val != nil { + m.SetPriority(val.(*CaseTaskPriority)) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseTaskStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*TaskStatus)) + } + return nil + } + return res +} +// GetPriority gets the priority property value. The priority property +// returns a *CaseTaskPriority when successful +func (m *Task) GetPriority()(*CaseTaskPriority) { + val, err := m.GetBackingStore().Get("priority") + if err != nil { + panic(err) + } + if val != nil { + return val.(*CaseTaskPriority) + } + return nil +} +// GetStatus gets the status property value. The status property +// returns a *TaskStatus when successful +func (m *Task) GetStatus()(*TaskStatus) { + val, err := m.GetBackingStore().Get("status") + if err != nil { + panic(err) + } + if val != nil { + return val.(*TaskStatus) + } + return nil +} +// Serialize serializes information the current object +func (m *Task) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.CaseManagementEntity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("assignedTo", m.GetAssignedTo()) + if err != nil { + return err + } + } + if m.GetCategory() != nil { + cast := (*m.GetCategory()).String() + err = writer.WriteStringValue("category", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("closingNotes", m.GetClosingNotes()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("dueDateTime", m.GetDueDateTime()) + if err != nil { + return err + } + } + if m.GetPriority() != nil { + cast := (*m.GetPriority()).String() + err = writer.WriteStringValue("priority", &cast) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + return nil +} +// SetAssignedTo sets the assignedTo property value. The user assigned to the task. +func (m *Task) SetAssignedTo(value *string)() { + err := m.GetBackingStore().Set("assignedTo", value) + if err != nil { + panic(err) + } +} +// SetCategory sets the category property value. The category property +func (m *Task) SetCategory(value *CaseTaskCategory)() { + err := m.GetBackingStore().Set("category", value) + if err != nil { + panic(err) + } +} +// SetClosingNotes sets the closingNotes property value. Notes recorded when the task is completed. +func (m *Task) SetClosingNotes(value *string)() { + err := m.GetBackingStore().Set("closingNotes", value) + if err != nil { + panic(err) + } +} +// SetDescription sets the description property value. The description of the task. +func (m *Task) SetDescription(value *string)() { + err := m.GetBackingStore().Set("description", value) + if err != nil { + panic(err) + } +} +// SetDisplayName sets the displayName property value. The title of the task. +func (m *Task) SetDisplayName(value *string)() { + err := m.GetBackingStore().Set("displayName", value) + if err != nil { + panic(err) + } +} +// SetDueDateTime sets the dueDateTime property value. The target completion date and time for the task. +func (m *Task) SetDueDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + err := m.GetBackingStore().Set("dueDateTime", value) + if err != nil { + panic(err) + } +} +// SetPriority sets the priority property value. The priority property +func (m *Task) SetPriority(value *CaseTaskPriority)() { + err := m.GetBackingStore().Set("priority", value) + if err != nil { + panic(err) + } +} +// SetStatus sets the status property value. The status property +func (m *Task) SetStatus(value *TaskStatus)() { + err := m.GetBackingStore().Set("status", value) + if err != nil { + panic(err) + } +} +type Taskable interface { + CaseManagementEntityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignedTo()(*string) + GetCategory()(*CaseTaskCategory) + GetClosingNotes()(*string) + GetDescription()(*string) + GetDisplayName()(*string) + GetDueDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetPriority()(*CaseTaskPriority) + GetStatus()(*TaskStatus) + SetAssignedTo(value *string)() + SetCategory(value *CaseTaskCategory)() + SetClosingNotes(value *string)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetDueDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetPriority(value *CaseTaskPriority)() + SetStatus(value *TaskStatus)() +} diff --git a/models/security/casemanagement/task_collection_response.go b/models/security/casemanagement/task_collection_response.go new file mode 100644 index 00000000000..459d83472e1 --- /dev/null +++ b/models/security/casemanagement/task_collection_response.go @@ -0,0 +1,92 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package casemanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" +) + +type TaskCollectionResponse struct { + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BaseCollectionPaginationCountResponse +} +// NewTaskCollectionResponse instantiates a new TaskCollectionResponse and sets the default values. +func NewTaskCollectionResponse()(*TaskCollectionResponse) { + m := &TaskCollectionResponse{ + BaseCollectionPaginationCountResponse: *ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateTaskCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateTaskCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTaskCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *TaskCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTaskFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Taskable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(Taskable) + } + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +// returns a []Taskable when successful +func (m *TaskCollectionResponse) GetValue()([]Taskable) { + val, err := m.GetBackingStore().Get("value") + if err != nil { + panic(err) + } + if val != nil { + return val.([]Taskable) + } + return nil +} +// Serialize serializes information the current object +func (m *TaskCollectionResponse) 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 *TaskCollectionResponse) SetValue(value []Taskable)() { + err := m.GetBackingStore().Set("value", value) + if err != nil { + panic(err) + } +} +type TaskCollectionResponseable interface { + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Taskable) + SetValue(value []Taskable)() +} diff --git a/models/security/casemanagement/task_status.go b/models/security/casemanagement/task_status.go new file mode 100644 index 00000000000..4cc4a88391f --- /dev/null +++ b/models/security/casemanagement/task_status.go @@ -0,0 +1,54 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package casemanagement +type TaskStatus int + +const ( + NOTSET_TASKSTATUS TaskStatus = iota + NEW_TASKSTATUS + INPROGRESS_TASKSTATUS + FAILED_TASKSTATUS + PARTIALLYCOMPLETED_TASKSTATUS + SKIPPED_TASKSTATUS + COMPLETED_TASKSTATUS + UNKNOWNFUTUREVALUE_TASKSTATUS +) + +func (i TaskStatus) String() string { + return []string{"notSet", "new", "inProgress", "failed", "partiallyCompleted", "skipped", "completed", "unknownFutureValue"}[i] +} +func ParseTaskStatus(v string) (any, error) { + result := NOTSET_TASKSTATUS + switch v { + case "notSet": + result = NOTSET_TASKSTATUS + case "new": + result = NEW_TASKSTATUS + case "inProgress": + result = INPROGRESS_TASKSTATUS + case "failed": + result = FAILED_TASKSTATUS + case "partiallyCompleted": + result = PARTIALLYCOMPLETED_TASKSTATUS + case "skipped": + result = SKIPPED_TASKSTATUS + case "completed": + result = COMPLETED_TASKSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_TASKSTATUS + default: + return nil, nil + } + return &result, nil +} +func SerializeTaskStatus(values []TaskStatus) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i TaskStatus) isMultiValue() bool { + return false +} diff --git a/models/security/casemanagement/third_party_work_item.go b/models/security/casemanagement/third_party_work_item.go new file mode 100644 index 00000000000..2202d8a8c77 --- /dev/null +++ b/models/security/casemanagement/third_party_work_item.go @@ -0,0 +1,378 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package casemanagement + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +type ThirdPartyWorkItem struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewThirdPartyWorkItem instantiates a new ThirdPartyWorkItem and sets the default values. +func NewThirdPartyWorkItem()(*ThirdPartyWorkItem) { + m := &ThirdPartyWorkItem{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateThirdPartyWorkItemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateThirdPartyWorkItemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewThirdPartyWorkItem(), 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. +// returns a map[string]any when successful +func (m *ThirdPartyWorkItem) 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. +// returns a BackingStore when successful +func (m *ThirdPartyWorkItem) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ThirdPartyWorkItem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["identifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIdentifier(val) + } + return nil + } + res["instance"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetInstance(val) + } + return nil + } + res["lastSyncedOnDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastSyncedOnDateTime(val) + } + return nil + } + res["metadata"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateThirdPartyWorkItemMetadataFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMetadata(val.(ThirdPartyWorkItemMetadataable)) + } + 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["provider"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseThirdPartyWorkItemProvider) + if err != nil { + return err + } + if val != nil { + m.SetProvider(val.(*ThirdPartyWorkItemProvider)) + } + return nil + } + res["syncedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSyncedBy(val) + } + return nil + } + res["workItemType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseThirdPartyWorkItemType) + if err != nil { + return err + } + if val != nil { + m.SetWorkItemType(val.(*ThirdPartyWorkItemType)) + } + return nil + } + return res +} +// GetIdentifier gets the identifier property value. The identifier property +// returns a *string when successful +func (m *ThirdPartyWorkItem) GetIdentifier()(*string) { + val, err := m.GetBackingStore().Get("identifier") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetInstance gets the instance property value. The instance property +// returns a *string when successful +func (m *ThirdPartyWorkItem) GetInstance()(*string) { + val, err := m.GetBackingStore().Get("instance") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetLastSyncedOnDateTime gets the lastSyncedOnDateTime property value. The lastSyncedOnDateTime property +// returns a *Time when successful +func (m *ThirdPartyWorkItem) GetLastSyncedOnDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + val, err := m.GetBackingStore().Get("lastSyncedOnDateTime") + if err != nil { + panic(err) + } + if val != nil { + return val.(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + } + return nil +} +// GetMetadata gets the metadata property value. The metadata property +// returns a ThirdPartyWorkItemMetadataable when successful +func (m *ThirdPartyWorkItem) GetMetadata()(ThirdPartyWorkItemMetadataable) { + val, err := m.GetBackingStore().Get("metadata") + if err != nil { + panic(err) + } + if val != nil { + return val.(ThirdPartyWorkItemMetadataable) + } + return nil +} +// GetOdataType gets the @odata.type property value. The OdataType property +// returns a *string when successful +func (m *ThirdPartyWorkItem) GetOdataType()(*string) { + val, err := m.GetBackingStore().Get("odataType") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetProvider gets the provider property value. The provider property +// returns a *ThirdPartyWorkItemProvider when successful +func (m *ThirdPartyWorkItem) GetProvider()(*ThirdPartyWorkItemProvider) { + val, err := m.GetBackingStore().Get("provider") + if err != nil { + panic(err) + } + if val != nil { + return val.(*ThirdPartyWorkItemProvider) + } + return nil +} +// GetSyncedBy gets the syncedBy property value. The syncedBy property +// returns a *string when successful +func (m *ThirdPartyWorkItem) GetSyncedBy()(*string) { + val, err := m.GetBackingStore().Get("syncedBy") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetWorkItemType gets the workItemType property value. The workItemType property +// returns a *ThirdPartyWorkItemType when successful +func (m *ThirdPartyWorkItem) GetWorkItemType()(*ThirdPartyWorkItemType) { + val, err := m.GetBackingStore().Get("workItemType") + if err != nil { + panic(err) + } + if val != nil { + return val.(*ThirdPartyWorkItemType) + } + return nil +} +// Serialize serializes information the current object +func (m *ThirdPartyWorkItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("identifier", m.GetIdentifier()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("instance", m.GetInstance()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("lastSyncedOnDateTime", m.GetLastSyncedOnDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("metadata", m.GetMetadata()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetProvider() != nil { + cast := (*m.GetProvider()).String() + err := writer.WriteStringValue("provider", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("syncedBy", m.GetSyncedBy()) + if err != nil { + return err + } + } + if m.GetWorkItemType() != nil { + cast := (*m.GetWorkItemType()).String() + err := writer.WriteStringValue("workItemType", &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 *ThirdPartyWorkItem) 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 *ThirdPartyWorkItem) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetIdentifier sets the identifier property value. The identifier property +func (m *ThirdPartyWorkItem) SetIdentifier(value *string)() { + err := m.GetBackingStore().Set("identifier", value) + if err != nil { + panic(err) + } +} +// SetInstance sets the instance property value. The instance property +func (m *ThirdPartyWorkItem) SetInstance(value *string)() { + err := m.GetBackingStore().Set("instance", value) + if err != nil { + panic(err) + } +} +// SetLastSyncedOnDateTime sets the lastSyncedOnDateTime property value. The lastSyncedOnDateTime property +func (m *ThirdPartyWorkItem) SetLastSyncedOnDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + err := m.GetBackingStore().Set("lastSyncedOnDateTime", value) + if err != nil { + panic(err) + } +} +// SetMetadata sets the metadata property value. The metadata property +func (m *ThirdPartyWorkItem) SetMetadata(value ThirdPartyWorkItemMetadataable)() { + err := m.GetBackingStore().Set("metadata", value) + if err != nil { + panic(err) + } +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ThirdPartyWorkItem) SetOdataType(value *string)() { + err := m.GetBackingStore().Set("odataType", value) + if err != nil { + panic(err) + } +} +// SetProvider sets the provider property value. The provider property +func (m *ThirdPartyWorkItem) SetProvider(value *ThirdPartyWorkItemProvider)() { + err := m.GetBackingStore().Set("provider", value) + if err != nil { + panic(err) + } +} +// SetSyncedBy sets the syncedBy property value. The syncedBy property +func (m *ThirdPartyWorkItem) SetSyncedBy(value *string)() { + err := m.GetBackingStore().Set("syncedBy", value) + if err != nil { + panic(err) + } +} +// SetWorkItemType sets the workItemType property value. The workItemType property +func (m *ThirdPartyWorkItem) SetWorkItemType(value *ThirdPartyWorkItemType)() { + err := m.GetBackingStore().Set("workItemType", value) + if err != nil { + panic(err) + } +} +type ThirdPartyWorkItemable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetIdentifier()(*string) + GetInstance()(*string) + GetLastSyncedOnDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetMetadata()(ThirdPartyWorkItemMetadataable) + GetOdataType()(*string) + GetProvider()(*ThirdPartyWorkItemProvider) + GetSyncedBy()(*string) + GetWorkItemType()(*ThirdPartyWorkItemType) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetIdentifier(value *string)() + SetInstance(value *string)() + SetLastSyncedOnDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetMetadata(value ThirdPartyWorkItemMetadataable)() + SetOdataType(value *string)() + SetProvider(value *ThirdPartyWorkItemProvider)() + SetSyncedBy(value *string)() + SetWorkItemType(value *ThirdPartyWorkItemType)() +} diff --git a/models/security/casemanagement/third_party_work_item_metadata.go b/models/security/casemanagement/third_party_work_item_metadata.go new file mode 100644 index 00000000000..0c5f5778f38 --- /dev/null +++ b/models/security/casemanagement/third_party_work_item_metadata.go @@ -0,0 +1,116 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package casemanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +type ThirdPartyWorkItemMetadata struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewThirdPartyWorkItemMetadata instantiates a new ThirdPartyWorkItemMetadata and sets the default values. +func NewThirdPartyWorkItemMetadata()(*ThirdPartyWorkItemMetadata) { + m := &ThirdPartyWorkItemMetadata{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateThirdPartyWorkItemMetadataFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateThirdPartyWorkItemMetadataFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewThirdPartyWorkItemMetadata(), 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. +// returns a map[string]any when successful +func (m *ThirdPartyWorkItemMetadata) 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. +// returns a BackingStore when successful +func (m *ThirdPartyWorkItemMetadata) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ThirdPartyWorkItemMetadata) 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +// returns a *string when successful +func (m *ThirdPartyWorkItemMetadata) GetOdataType()(*string) { + val, err := m.GetBackingStore().Get("odataType") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// Serialize serializes information the current object +func (m *ThirdPartyWorkItemMetadata) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *ThirdPartyWorkItemMetadata) 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 *ThirdPartyWorkItemMetadata) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ThirdPartyWorkItemMetadata) SetOdataType(value *string)() { + err := m.GetBackingStore().Set("odataType", value) + if err != nil { + panic(err) + } +} +type ThirdPartyWorkItemMetadataable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetOdataType()(*string) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetOdataType(value *string)() +} diff --git a/models/security/casemanagement/third_party_work_item_provider.go b/models/security/casemanagement/third_party_work_item_provider.go new file mode 100644 index 00000000000..989eabe9779 --- /dev/null +++ b/models/security/casemanagement/third_party_work_item_provider.go @@ -0,0 +1,36 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package casemanagement +type ThirdPartyWorkItemProvider int + +const ( + SERVICENOW_THIRDPARTYWORKITEMPROVIDER ThirdPartyWorkItemProvider = iota + UNKNOWNFUTUREVALUE_THIRDPARTYWORKITEMPROVIDER +) + +func (i ThirdPartyWorkItemProvider) String() string { + return []string{"serviceNow", "unknownFutureValue"}[i] +} +func ParseThirdPartyWorkItemProvider(v string) (any, error) { + result := SERVICENOW_THIRDPARTYWORKITEMPROVIDER + switch v { + case "serviceNow": + result = SERVICENOW_THIRDPARTYWORKITEMPROVIDER + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_THIRDPARTYWORKITEMPROVIDER + default: + return nil, nil + } + return &result, nil +} +func SerializeThirdPartyWorkItemProvider(values []ThirdPartyWorkItemProvider) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i ThirdPartyWorkItemProvider) isMultiValue() bool { + return false +} diff --git a/models/security/casemanagement/third_party_work_item_type.go b/models/security/casemanagement/third_party_work_item_type.go new file mode 100644 index 00000000000..7442e21dfe0 --- /dev/null +++ b/models/security/casemanagement/third_party_work_item_type.go @@ -0,0 +1,36 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package casemanagement +type ThirdPartyWorkItemType int + +const ( + INCIDENT_THIRDPARTYWORKITEMTYPE ThirdPartyWorkItemType = iota + UNKNOWNFUTUREVALUE_THIRDPARTYWORKITEMTYPE +) + +func (i ThirdPartyWorkItemType) String() string { + return []string{"incident", "unknownFutureValue"}[i] +} +func ParseThirdPartyWorkItemType(v string) (any, error) { + result := INCIDENT_THIRDPARTYWORKITEMTYPE + switch v { + case "incident": + result = INCIDENT_THIRDPARTYWORKITEMTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_THIRDPARTYWORKITEMTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeThirdPartyWorkItemType(values []ThirdPartyWorkItemType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i ThirdPartyWorkItemType) isMultiValue() bool { + return false +} diff --git a/models/security/casemanagement/value_property.go b/models/security/casemanagement/value_property.go new file mode 100644 index 00000000000..55d8245ce2c --- /dev/null +++ b/models/security/casemanagement/value_property.go @@ -0,0 +1,136 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package casemanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +type ValueProperty struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewValueProperty instantiates a new ValueProperty and sets the default values. +func NewValueProperty()(*ValueProperty) { + m := &ValueProperty{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateValuePropertyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateValuePropertyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.security.caseManagement.booleanValueProperty": + return NewBooleanValueProperty(), nil + case "#microsoft.graph.security.caseManagement.stringValueProperty": + return NewStringValueProperty(), nil + } + } + } + } + return NewValueProperty(), 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. +// returns a map[string]any when successful +func (m *ValueProperty) 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. +// returns a BackingStore when successful +func (m *ValueProperty) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ValueProperty) 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +// returns a *string when successful +func (m *ValueProperty) GetOdataType()(*string) { + val, err := m.GetBackingStore().Get("odataType") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// Serialize serializes information the current object +func (m *ValueProperty) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *ValueProperty) 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 *ValueProperty) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ValueProperty) SetOdataType(value *string)() { + err := m.GetBackingStore().Set("odataType", value) + if err != nil { + panic(err) + } +} +type ValuePropertyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetOdataType()(*string) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetOdataType(value *string)() +} diff --git a/models/security/casemanagement/workspace_indicator_relation.go b/models/security/casemanagement/workspace_indicator_relation.go new file mode 100644 index 00000000000..44cff9889f0 --- /dev/null +++ b/models/security/casemanagement/workspace_indicator_relation.go @@ -0,0 +1,155 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package casemanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type WorkspaceIndicatorRelation struct { + Relation +} +// NewWorkspaceIndicatorRelation instantiates a new WorkspaceIndicatorRelation and sets the default values. +func NewWorkspaceIndicatorRelation()(*WorkspaceIndicatorRelation) { + m := &WorkspaceIndicatorRelation{ + Relation: *NewRelation(), + } + odataTypeValue := "#microsoft.graph.security.caseManagement.workspaceIndicatorRelation" + m.SetOdataType(&odataTypeValue) + return m +} +// CreateWorkspaceIndicatorRelationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateWorkspaceIndicatorRelationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewWorkspaceIndicatorRelation(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *WorkspaceIndicatorRelation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Relation.GetFieldDeserializers() + res["resourceGroupName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetResourceGroupName(val) + } + return nil + } + res["subscriptionId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubscriptionId(val) + } + return nil + } + res["workspaceName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWorkspaceName(val) + } + return nil + } + return res +} +// GetResourceGroupName gets the resourceGroupName property value. The Azure resource group name for the workspace. +// returns a *string when successful +func (m *WorkspaceIndicatorRelation) GetResourceGroupName()(*string) { + val, err := m.GetBackingStore().Get("resourceGroupName") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetSubscriptionId gets the subscriptionId property value. The Azure subscription identifier for the workspace. +// returns a *string when successful +func (m *WorkspaceIndicatorRelation) GetSubscriptionId()(*string) { + val, err := m.GetBackingStore().Get("subscriptionId") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetWorkspaceName gets the workspaceName property value. The Log Analytics workspace name. +// returns a *string when successful +func (m *WorkspaceIndicatorRelation) GetWorkspaceName()(*string) { + val, err := m.GetBackingStore().Get("workspaceName") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// Serialize serializes information the current object +func (m *WorkspaceIndicatorRelation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Relation.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("resourceGroupName", m.GetResourceGroupName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("subscriptionId", m.GetSubscriptionId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("workspaceName", m.GetWorkspaceName()) + if err != nil { + return err + } + } + return nil +} +// SetResourceGroupName sets the resourceGroupName property value. The Azure resource group name for the workspace. +func (m *WorkspaceIndicatorRelation) SetResourceGroupName(value *string)() { + err := m.GetBackingStore().Set("resourceGroupName", value) + if err != nil { + panic(err) + } +} +// SetSubscriptionId sets the subscriptionId property value. The Azure subscription identifier for the workspace. +func (m *WorkspaceIndicatorRelation) SetSubscriptionId(value *string)() { + err := m.GetBackingStore().Set("subscriptionId", value) + if err != nil { + panic(err) + } +} +// SetWorkspaceName sets the workspaceName property value. The Log Analytics workspace name. +func (m *WorkspaceIndicatorRelation) SetWorkspaceName(value *string)() { + err := m.GetBackingStore().Set("workspaceName", value) + if err != nil { + panic(err) + } +} +type WorkspaceIndicatorRelationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + Relationable + GetResourceGroupName()(*string) + GetSubscriptionId()(*string) + GetWorkspaceName()(*string) + SetResourceGroupName(value *string)() + SetSubscriptionId(value *string)() + SetWorkspaceName(value *string)() +} diff --git a/models/sync_component.go b/models/sync_component.go new file mode 100644 index 00000000000..ba49c9dc12f --- /dev/null +++ b/models/sync_component.go @@ -0,0 +1,248 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +type SyncComponent struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewSyncComponent instantiates a new SyncComponent and sets the default values. +func NewSyncComponent()(*SyncComponent) { + m := &SyncComponent{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSyncComponentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSyncComponentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSyncComponent(), 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. +// returns a map[string]any when successful +func (m *SyncComponent) 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. +// returns a BackingStore when successful +func (m *SyncComponent) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *SyncComponent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["moreInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMoreInfo(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(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["reportedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetReportedDateTime(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSyncComponentStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*SyncComponentStatus)) + } + return nil + } + return res +} +// GetMoreInfo gets the moreInfo property value. Indicates additional information for this sync stage. This is a flexible string that can be null (no additional info), a progress indicator such as '3/6' (completed out of total), or a list of individual item names. Read-only. Nullable. +// returns a *string when successful +func (m *SyncComponent) GetMoreInfo()(*string) { + val, err := m.GetBackingStore().Get("moreInfo") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetName gets the name property value. Indicates the sync stage name. The backend abstracts internal infrastructure into 6 user-facing stages. Fixed values are: notifyingDevice, deviceConnecting, policies, applications, scripts, compliance. Read-only. Not nullable. +// returns a *string when successful +func (m *SyncComponent) GetName()(*string) { + val, err := m.GetBackingStore().Get("name") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetOdataType gets the @odata.type property value. The OdataType property +// returns a *string when successful +func (m *SyncComponent) GetOdataType()(*string) { + val, err := m.GetBackingStore().Get("odataType") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetReportedDateTime gets the reportedDateTime property value. Indicates the date and time when this stage last reported status. The date and time information is shown using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 would look like this: '2014-01-01T00:00:00Z'. Read-only. Not nullable. +// returns a *Time when successful +func (m *SyncComponent) GetReportedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + val, err := m.GetBackingStore().Get("reportedDateTime") + if err != nil { + panic(err) + } + if val != nil { + return val.(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + } + return nil +} +// GetStatus gets the status property value. A list of possible status states for a sync infrastructure component or policy during a device sync operation. +// returns a *SyncComponentStatus when successful +func (m *SyncComponent) GetStatus()(*SyncComponentStatus) { + val, err := m.GetBackingStore().Get("status") + if err != nil { + panic(err) + } + if val != nil { + return val.(*SyncComponentStatus) + } + return nil +} +// Serialize serializes information the current object +func (m *SyncComponent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err := writer.WriteStringValue("status", &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 *SyncComponent) 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 *SyncComponent) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetMoreInfo sets the moreInfo property value. Indicates additional information for this sync stage. This is a flexible string that can be null (no additional info), a progress indicator such as '3/6' (completed out of total), or a list of individual item names. Read-only. Nullable. +func (m *SyncComponent) SetMoreInfo(value *string)() { + err := m.GetBackingStore().Set("moreInfo", value) + if err != nil { + panic(err) + } +} +// SetName sets the name property value. Indicates the sync stage name. The backend abstracts internal infrastructure into 6 user-facing stages. Fixed values are: notifyingDevice, deviceConnecting, policies, applications, scripts, compliance. Read-only. Not nullable. +func (m *SyncComponent) SetName(value *string)() { + err := m.GetBackingStore().Set("name", value) + if err != nil { + panic(err) + } +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *SyncComponent) SetOdataType(value *string)() { + err := m.GetBackingStore().Set("odataType", value) + if err != nil { + panic(err) + } +} +// SetReportedDateTime sets the reportedDateTime property value. Indicates the date and time when this stage last reported status. The date and time information is shown using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 would look like this: '2014-01-01T00:00:00Z'. Read-only. Not nullable. +func (m *SyncComponent) SetReportedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + err := m.GetBackingStore().Set("reportedDateTime", value) + if err != nil { + panic(err) + } +} +// SetStatus sets the status property value. A list of possible status states for a sync infrastructure component or policy during a device sync operation. +func (m *SyncComponent) SetStatus(value *SyncComponentStatus)() { + err := m.GetBackingStore().Set("status", value) + if err != nil { + panic(err) + } +} +type SyncComponentable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetMoreInfo()(*string) + GetName()(*string) + GetOdataType()(*string) + GetReportedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetStatus()(*SyncComponentStatus) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetMoreInfo(value *string)() + SetName(value *string)() + SetOdataType(value *string)() + SetReportedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetStatus(value *SyncComponentStatus)() +} diff --git a/models/sync_component_status.go b/models/sync_component_status.go new file mode 100644 index 00000000000..f09eb1e538d --- /dev/null +++ b/models/sync_component_status.go @@ -0,0 +1,55 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models +// A list of possible status states for a sync infrastructure component or policy during a device sync operation. +type SyncComponentStatus int + +const ( + // Default. The component has not yet started reporting status. This is a schema default and will not typically appear in responses, as components only appear once they begin executing. + NONE_SYNCCOMPONENTSTATUS SyncComponentStatus = iota + // Indicates the component is currently executing. For infrastructure components (PNSv1, DCI, SCGW), this means the notification or check-in is in flight. For policies, this means the policy is being applied to the device. + INPROGRESS_SYNCCOMPONENTSTATUS + // Indicates the component completed successfully. The component has finished its work and reported a successful outcome. + SUCCESS_SYNCCOMPONENTSTATUS + // Indicates the stage encountered an error. When this value is set, the moreInfo property on the syncComponent will contain additional diagnostic details about the failure. + FAILURE_SYNCCOMPONENTSTATUS + // Indicates the stage completed but not all items succeeded. For example, some policies applied successfully while others failed. The moreInfo property may contain details on the partial outcome. + PARTIALSUCCESS_SYNCCOMPONENTSTATUS + // Evolvable enumeration sentinel value. Do not use. + UNKNOWNFUTUREVALUE_SYNCCOMPONENTSTATUS +) + +func (i SyncComponentStatus) String() string { + return []string{"none", "inProgress", "success", "failure", "partialSuccess", "unknownFutureValue"}[i] +} +func ParseSyncComponentStatus(v string) (any, error) { + result := NONE_SYNCCOMPONENTSTATUS + switch v { + case "none": + result = NONE_SYNCCOMPONENTSTATUS + case "inProgress": + result = INPROGRESS_SYNCCOMPONENTSTATUS + case "success": + result = SUCCESS_SYNCCOMPONENTSTATUS + case "failure": + result = FAILURE_SYNCCOMPONENTSTATUS + case "partialSuccess": + result = PARTIALSUCCESS_SYNCCOMPONENTSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_SYNCCOMPONENTSTATUS + default: + return nil, nil + } + return &result, nil +} +func SerializeSyncComponentStatus(values []SyncComponentStatus) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i SyncComponentStatus) isMultiValue() bool { + return false +} diff --git a/models/task_history_item.go b/models/task_history_item.go index bb64ab2b952..cd423d1399a 100644 --- a/models/task_history_item.go +++ b/models/task_history_item.go @@ -50,7 +50,7 @@ func (m *TaskHistoryItem) GetFieldDeserializers()(map[string]func(i878a80d2330e8 } return res } -// GetNewData gets the newData property value. The newData property +// GetNewData gets the newData property value. A snapshot of the task state after the change. This property is null for deletion events. // returns a PlannerTaskDataable when successful func (m *TaskHistoryItem) GetNewData()(PlannerTaskDataable) { val, err := m.GetBackingStore().Get("newData") @@ -62,7 +62,7 @@ func (m *TaskHistoryItem) GetNewData()(PlannerTaskDataable) { } return nil } -// GetOldData gets the oldData property value. The oldData property +// GetOldData gets the oldData property value. A snapshot of the task state before the change. This property is null for creation and undeletion events. // returns a PlannerTaskDataable when successful func (m *TaskHistoryItem) GetOldData()(PlannerTaskDataable) { val, err := m.GetBackingStore().Get("oldData") @@ -94,14 +94,14 @@ func (m *TaskHistoryItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0 } return nil } -// SetNewData sets the newData property value. The newData property +// SetNewData sets the newData property value. A snapshot of the task state after the change. This property is null for deletion events. func (m *TaskHistoryItem) SetNewData(value PlannerTaskDataable)() { err := m.GetBackingStore().Set("newData", value) if err != nil { panic(err) } } -// SetOldData sets the oldData property value. The oldData property +// SetOldData sets the oldData property value. A snapshot of the task state before the change. This property is null for creation and undeletion events. func (m *TaskHistoryItem) SetOldData(value PlannerTaskDataable)() { err := m.GetBackingStore().Set("oldData", value) if err != nil { diff --git a/models/unified_storage_quota.go b/models/unified_storage_quota.go index de58ff1fdc2..1c94537b63b 100644 --- a/models/unified_storage_quota.go +++ b/models/unified_storage_quota.go @@ -34,6 +34,18 @@ func (m *UnifiedStorageQuota) GetDeleted()(*int64) { } return nil } +// GetFamilyMembersUsage gets the familyMembersUsage property value. The familyMembersUsage property +// returns a []FamilyMemberStorageQuotaable when successful +func (m *UnifiedStorageQuota) GetFamilyMembersUsage()([]FamilyMemberStorageQuotaable) { + val, err := m.GetBackingStore().Get("familyMembersUsage") + if err != nil { + panic(err) + } + if val != nil { + return val.([]FamilyMemberStorageQuotaable) + } + return nil +} // GetFieldDeserializers the deserialization information for the current model // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *UnifiedStorageQuota) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { @@ -48,6 +60,32 @@ func (m *UnifiedStorageQuota) GetFieldDeserializers()(map[string]func(i878a80d23 } return nil } + res["familyMembersUsage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateFamilyMemberStorageQuotaFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]FamilyMemberStorageQuotaable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(FamilyMemberStorageQuotaable) + } + } + m.SetFamilyMembersUsage(res) + } + return nil + } + res["isPooledStorageEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsPooledStorageEnabled(val) + } + return nil + } res["manageWebUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -116,6 +154,18 @@ func (m *UnifiedStorageQuota) GetFieldDeserializers()(map[string]func(i878a80d23 } return res } +// GetIsPooledStorageEnabled gets the isPooledStorageEnabled property value. The isPooledStorageEnabled property +// returns a *bool when successful +func (m *UnifiedStorageQuota) GetIsPooledStorageEnabled()(*bool) { + val, err := m.GetBackingStore().Get("isPooledStorageEnabled") + if err != nil { + panic(err) + } + if val != nil { + return val.(*bool) + } + return nil +} // GetManageWebUrl gets the manageWebUrl property value. A URL that can be used in a browser to manage the breakdown. Read-only. // returns a *string when successful func (m *UnifiedStorageQuota) GetManageWebUrl()(*string) { @@ -200,6 +250,24 @@ func (m *UnifiedStorageQuota) Serialize(writer i878a80d2330e89d26896388a3f487eef return err } } + if m.GetFamilyMembersUsage() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetFamilyMembersUsage())) + for i, v := range m.GetFamilyMembersUsage() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err = writer.WriteCollectionOfObjectValues("familyMembersUsage", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isPooledStorageEnabled", m.GetIsPooledStorageEnabled()) + if err != nil { + return err + } + } { err = writer.WriteStringValue("manageWebUrl", m.GetManageWebUrl()) if err != nil { @@ -251,6 +319,20 @@ func (m *UnifiedStorageQuota) SetDeleted(value *int64)() { panic(err) } } +// SetFamilyMembersUsage sets the familyMembersUsage property value. The familyMembersUsage property +func (m *UnifiedStorageQuota) SetFamilyMembersUsage(value []FamilyMemberStorageQuotaable)() { + err := m.GetBackingStore().Set("familyMembersUsage", value) + if err != nil { + panic(err) + } +} +// SetIsPooledStorageEnabled sets the isPooledStorageEnabled property value. The isPooledStorageEnabled property +func (m *UnifiedStorageQuota) SetIsPooledStorageEnabled(value *bool)() { + err := m.GetBackingStore().Set("isPooledStorageEnabled", value) + if err != nil { + panic(err) + } +} // SetManageWebUrl sets the manageWebUrl property value. A URL that can be used in a browser to manage the breakdown. Read-only. func (m *UnifiedStorageQuota) SetManageWebUrl(value *string)() { err := m.GetBackingStore().Set("manageWebUrl", value) @@ -297,6 +379,8 @@ type UnifiedStorageQuotaable interface { Entityable i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetDeleted()(*int64) + GetFamilyMembersUsage()([]FamilyMemberStorageQuotaable) + GetIsPooledStorageEnabled()(*bool) GetManageWebUrl()(*string) GetRemaining()(*int64) GetServices()([]ServiceStorageQuotaBreakdownable) @@ -304,6 +388,8 @@ type UnifiedStorageQuotaable interface { GetTotal()(*int64) GetUsed()(*int64) SetDeleted(value *int64)() + SetFamilyMembersUsage(value []FamilyMemberStorageQuotaable)() + SetIsPooledStorageEnabled(value *bool)() SetManageWebUrl(value *string)() SetRemaining(value *int64)() SetServices(value []ServiceStorageQuotaBreakdownable)() diff --git a/models/vpp_token.go b/models/vpp_token.go index c9a3bb7286b..227b78d8a27 100644 --- a/models/vpp_token.go +++ b/models/vpp_token.go @@ -24,6 +24,18 @@ func NewVppToken()(*VppToken) { func CreateVppTokenFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewVppToken(), nil } +// GetAppleDeviceAppDeliveryProtocolType gets the appleDeviceAppDeliveryProtocolType property value. Enum of the supported types of Apple delivery protocols, representing the available protocols to deliver payloads to Apple devices +// returns a *AppleDeviceDeliveryProtocol when successful +func (m *VppToken) GetAppleDeviceAppDeliveryProtocolType()(*AppleDeviceDeliveryProtocol) { + val, err := m.GetBackingStore().Get("appleDeviceAppDeliveryProtocolType") + if err != nil { + panic(err) + } + if val != nil { + return val.(*AppleDeviceDeliveryProtocol) + } + return nil +} // GetAppleId gets the appleId property value. The apple Id associated with the given Apple Volume Purchase Program Token. // returns a *string when successful func (m *VppToken) GetAppleId()(*string) { @@ -112,6 +124,16 @@ func (m *VppToken) GetExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *VppToken) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := m.Entity.GetFieldDeserializers() + res["appleDeviceAppDeliveryProtocolType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppleDeviceDeliveryProtocol) + if err != nil { + return err + } + if val != nil { + m.SetAppleDeviceAppDeliveryProtocolType(val.(*AppleDeviceDeliveryProtocol)) + } + return nil + } res["appleId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -422,6 +444,13 @@ func (m *VppToken) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c01 if err != nil { return err } + if m.GetAppleDeviceAppDeliveryProtocolType() != nil { + cast := (*m.GetAppleDeviceAppDeliveryProtocolType()).String() + err = writer.WriteStringValue("appleDeviceAppDeliveryProtocolType", &cast) + if err != nil { + return err + } + } { err = writer.WriteStringValue("appleId", m.GetAppleId()) if err != nil { @@ -535,6 +564,13 @@ func (m *VppToken) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c01 } return nil } +// SetAppleDeviceAppDeliveryProtocolType sets the appleDeviceAppDeliveryProtocolType property value. Enum of the supported types of Apple delivery protocols, representing the available protocols to deliver payloads to Apple devices +func (m *VppToken) SetAppleDeviceAppDeliveryProtocolType(value *AppleDeviceDeliveryProtocol)() { + err := m.GetBackingStore().Set("appleDeviceAppDeliveryProtocolType", value) + if err != nil { + panic(err) + } +} // SetAppleId sets the appleId property value. The apple Id associated with the given Apple Volume Purchase Program Token. func (m *VppToken) SetAppleId(value *string)() { err := m.GetBackingStore().Set("appleId", value) @@ -657,6 +693,7 @@ func (m *VppToken) SetVppTokenAccountType(value *VppTokenAccountType)() { type VppTokenable interface { Entityable i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppleDeviceAppDeliveryProtocolType()(*AppleDeviceDeliveryProtocol) GetAppleId()(*string) GetAutomaticallyUpdateApps()(*bool) GetClaimTokenManagementFromExternalMdm()(*bool) @@ -674,6 +711,7 @@ type VppTokenable interface { GetToken()(*string) GetTokenActionResults()([]VppTokenActionResultable) GetVppTokenAccountType()(*VppTokenAccountType) + SetAppleDeviceAppDeliveryProtocolType(value *AppleDeviceDeliveryProtocol)() SetAppleId(value *string)() SetAutomaticallyUpdateApps(value *bool)() SetClaimTokenManagementFromExternalMdm(value *bool)() diff --git a/models/workspace.go b/models/workspace.go index 83e3017d471..f92eec3d8c4 100644 --- a/models/workspace.go +++ b/models/workspace.go @@ -156,16 +156,6 @@ func (m *Workspace) GetFieldDeserializers()(map[string]func(i878a80d2330e89d2689 } return nil } - res["placeId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetPlaceId(val) - } - return nil - } return res } // GetFloorLabel gets the floorLabel property value. A human-readable label for the floor; for example, Ground Floor. @@ -216,18 +206,6 @@ func (m *Workspace) GetNickname()(*string) { } return nil } -// GetPlaceId gets the placeId property value. The placeId property -// returns a *string when successful -func (m *Workspace) GetPlaceId()(*string) { - val, err := m.GetBackingStore().Get("placeId") - if err != nil { - panic(err) - } - if val != nil { - return val.(*string) - } - return nil -} // Serialize serializes information the current object func (m *Workspace) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { err := m.Place.Serialize(writer) @@ -282,12 +260,6 @@ func (m *Workspace) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c0 return err } } - { - err = writer.WriteStringValue("placeId", m.GetPlaceId()) - if err != nil { - return err - } - } return nil } // SetBuilding sets the building property value. The name or identifier of the building where the workspace is located. @@ -346,13 +318,6 @@ func (m *Workspace) SetNickname(value *string)() { panic(err) } } -// SetPlaceId sets the placeId property value. The placeId property -func (m *Workspace) SetPlaceId(value *string)() { - err := m.GetBackingStore().Set("placeId", value) - if err != nil { - panic(err) - } -} type Workspaceable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable Placeable @@ -364,7 +329,6 @@ type Workspaceable interface { GetFloorNumber()(*int32) GetMode()(PlaceModeable) GetNickname()(*string) - GetPlaceId()(*string) SetBuilding(value *string)() SetCapacity(value *int32)() SetDisplayDeviceName(value *string)() @@ -373,5 +337,4 @@ type Workspaceable interface { SetFloorNumber(value *int32)() SetMode(value PlaceModeable)() SetNickname(value *string)() - SetPlaceId(value *string)() } diff --git a/planner/plans_item_history_items_planner_history_item_item_request_builder.go b/planner/plans_item_history_items_planner_history_item_item_request_builder.go index 47540a7e304..e826b186e1a 100644 --- a/planner/plans_item_history_items_planner_history_item_item_request_builder.go +++ b/planner/plans_item_history_items_planner_history_item_item_request_builder.go @@ -21,7 +21,7 @@ type PlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderDeleteRequestConfi // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// PlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderGetQueryParameters get historyItems from planner +// PlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderGetQueryParameters collection of history items for entities in the plan. Read-only. Nullable. type PlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderGetQueryParameters struct { // Expand related entities Expand []string "uriparametername:\"%24expand\"" @@ -73,7 +73,7 @@ func (m *PlansItemHistoryItemsPlannerHistoryItemItemRequestBuilder) Delete(ctx c } return nil } -// Get get historyItems from planner +// Get collection of history items for entities in the plan. Read-only. Nullable. // returns a PlannerHistoryItemable when successful // returns a ODataError error when the service returns a 4XX or 5XX status code func (m *PlansItemHistoryItemsPlannerHistoryItemItemRequestBuilder) Get(ctx context.Context, requestConfiguration *PlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerHistoryItemable, error) { @@ -124,7 +124,7 @@ func (m *PlansItemHistoryItemsPlannerHistoryItemItemRequestBuilder) ToDeleteRequ requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToGetRequestInformation get historyItems from planner +// ToGetRequestInformation collection of history items for entities in the plan. Read-only. Nullable. // returns a *RequestInformation when successful func (m *PlansItemHistoryItemsPlannerHistoryItemItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *PlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/planner/plans_item_history_items_request_builder.go b/planner/plans_item_history_items_request_builder.go index 37b42233a68..71f28bf4626 100644 --- a/planner/plans_item_history_items_request_builder.go +++ b/planner/plans_item_history_items_request_builder.go @@ -14,7 +14,7 @@ import ( type PlansItemHistoryItemsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// PlansItemHistoryItemsRequestBuilderGetQueryParameters get historyItems from planner +// PlansItemHistoryItemsRequestBuilderGetQueryParameters collection of history items for entities in the plan. Read-only. Nullable. type PlansItemHistoryItemsRequestBuilderGetQueryParameters struct { // Include count of items Count *bool "uriparametername:\"%24count\"" @@ -79,7 +79,7 @@ func NewPlansItemHistoryItemsRequestBuilder(rawUrl string, requestAdapter i2ae41 func (m *PlansItemHistoryItemsRequestBuilder) Count()(*PlansItemHistoryItemsCountRequestBuilder) { return NewPlansItemHistoryItemsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Get get historyItems from planner +// Get collection of history items for entities in the plan. Read-only. Nullable. // returns a PlannerHistoryItemCollectionResponseable when successful // returns a ODataError error when the service returns a 4XX or 5XX status code func (m *PlansItemHistoryItemsRequestBuilder) Get(ctx context.Context, requestConfiguration *PlansItemHistoryItemsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerHistoryItemCollectionResponseable, error) { @@ -119,7 +119,7 @@ func (m *PlansItemHistoryItemsRequestBuilder) Post(ctx context.Context, body ie2 } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerHistoryItemable), nil } -// ToGetRequestInformation get historyItems from planner +// ToGetRequestInformation collection of history items for entities in the plan. Read-only. Nullable. // returns a *RequestInformation when successful func (m *PlansItemHistoryItemsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *PlansItemHistoryItemsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/reports/get_microsoft365_copilot_usage_user_detail_with_period_request_builder.go b/reports/get_microsoft365_copilot_usage_user_detail_with_period_with_version_request_builder.go similarity index 50% rename from reports/get_microsoft365_copilot_usage_user_detail_with_period_request_builder.go rename to reports/get_microsoft365_copilot_usage_user_detail_with_period_with_version_request_builder.go index 5b327fbacac..a1d608e9bfa 100644 --- a/reports/get_microsoft365_copilot_usage_user_detail_with_period_request_builder.go +++ b/reports/get_microsoft365_copilot_usage_user_detail_with_period_with_version_request_builder.go @@ -9,32 +9,35 @@ import ( i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" ) -// GetMicrosoft365CopilotUsageUserDetailWithPeriodRequestBuilder provides operations to call the getMicrosoft365CopilotUsageUserDetail method. -type GetMicrosoft365CopilotUsageUserDetailWithPeriodRequestBuilder struct { +// GetMicrosoft365CopilotUsageUserDetailWithPeriodWithVersionRequestBuilder provides operations to call the getMicrosoft365CopilotUsageUserDetail method. +type GetMicrosoft365CopilotUsageUserDetailWithPeriodWithVersionRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// GetMicrosoft365CopilotUsageUserDetailWithPeriodRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. -type GetMicrosoft365CopilotUsageUserDetailWithPeriodRequestBuilderGetRequestConfiguration struct { +// GetMicrosoft365CopilotUsageUserDetailWithPeriodWithVersionRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type GetMicrosoft365CopilotUsageUserDetailWithPeriodWithVersionRequestBuilderGetRequestConfiguration struct { // Request headers Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// NewGetMicrosoft365CopilotUsageUserDetailWithPeriodRequestBuilderInternal instantiates a new GetMicrosoft365CopilotUsageUserDetailWithPeriodRequestBuilder and sets the default values. -func NewGetMicrosoft365CopilotUsageUserDetailWithPeriodRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter, period *string)(*GetMicrosoft365CopilotUsageUserDetailWithPeriodRequestBuilder) { - m := &GetMicrosoft365CopilotUsageUserDetailWithPeriodRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/reports/getMicrosoft365CopilotUsageUserDetail(period='{period}')", pathParameters), +// NewGetMicrosoft365CopilotUsageUserDetailWithPeriodWithVersionRequestBuilderInternal instantiates a new GetMicrosoft365CopilotUsageUserDetailWithPeriodWithVersionRequestBuilder and sets the default values. +func NewGetMicrosoft365CopilotUsageUserDetailWithPeriodWithVersionRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter, period *string, version *string)(*GetMicrosoft365CopilotUsageUserDetailWithPeriodWithVersionRequestBuilder) { + m := &GetMicrosoft365CopilotUsageUserDetailWithPeriodWithVersionRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/reports/getMicrosoft365CopilotUsageUserDetail(period='{period}',version='{version}')", pathParameters), } if period != nil { m.BaseRequestBuilder.PathParameters["period"] = *period } + if version != nil { + m.BaseRequestBuilder.PathParameters["version"] = *version + } return m } -// NewGetMicrosoft365CopilotUsageUserDetailWithPeriodRequestBuilder instantiates a new GetMicrosoft365CopilotUsageUserDetailWithPeriodRequestBuilder and sets the default values. -func NewGetMicrosoft365CopilotUsageUserDetailWithPeriodRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*GetMicrosoft365CopilotUsageUserDetailWithPeriodRequestBuilder) { +// NewGetMicrosoft365CopilotUsageUserDetailWithPeriodWithVersionRequestBuilder instantiates a new GetMicrosoft365CopilotUsageUserDetailWithPeriodWithVersionRequestBuilder and sets the default values. +func NewGetMicrosoft365CopilotUsageUserDetailWithPeriodWithVersionRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*GetMicrosoft365CopilotUsageUserDetailWithPeriodWithVersionRequestBuilder) { urlParams := make(map[string]string) urlParams["request-raw-url"] = rawUrl - return NewGetMicrosoft365CopilotUsageUserDetailWithPeriodRequestBuilderInternal(urlParams, requestAdapter, nil) + return NewGetMicrosoft365CopilotUsageUserDetailWithPeriodWithVersionRequestBuilderInternal(urlParams, requestAdapter, nil, nil) } // Get get the most recent activity data for enabled users of Microsoft 365 Copilot apps. // returns a []byte when successful @@ -42,7 +45,7 @@ func NewGetMicrosoft365CopilotUsageUserDetailWithPeriodRequestBuilder(rawUrl str // [Find more info here] // // [Find more info here]: https://learn.microsoft.com/graph/api/reportroot-getmicrosoft365copilotusageuserdetail?view=graph-rest-beta -func (m *GetMicrosoft365CopilotUsageUserDetailWithPeriodRequestBuilder) Get(ctx context.Context, requestConfiguration *GetMicrosoft365CopilotUsageUserDetailWithPeriodRequestBuilderGetRequestConfiguration)([]byte, error) { +func (m *GetMicrosoft365CopilotUsageUserDetailWithPeriodWithVersionRequestBuilder) Get(ctx context.Context, requestConfiguration *GetMicrosoft365CopilotUsageUserDetailWithPeriodWithVersionRequestBuilderGetRequestConfiguration)([]byte, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { return nil, err @@ -61,7 +64,7 @@ func (m *GetMicrosoft365CopilotUsageUserDetailWithPeriodRequestBuilder) Get(ctx } // ToGetRequestInformation get the most recent activity data for enabled users of Microsoft 365 Copilot apps. // returns a *RequestInformation when successful -func (m *GetMicrosoft365CopilotUsageUserDetailWithPeriodRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *GetMicrosoft365CopilotUsageUserDetailWithPeriodRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { +func (m *GetMicrosoft365CopilotUsageUserDetailWithPeriodWithVersionRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *GetMicrosoft365CopilotUsageUserDetailWithPeriodWithVersionRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { requestInfo.Headers.AddAll(requestConfiguration.Headers) @@ -71,7 +74,7 @@ func (m *GetMicrosoft365CopilotUsageUserDetailWithPeriodRequestBuilder) ToGetReq return requestInfo, nil } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. -// returns a *GetMicrosoft365CopilotUsageUserDetailWithPeriodRequestBuilder when successful -func (m *GetMicrosoft365CopilotUsageUserDetailWithPeriodRequestBuilder) WithUrl(rawUrl string)(*GetMicrosoft365CopilotUsageUserDetailWithPeriodRequestBuilder) { - return NewGetMicrosoft365CopilotUsageUserDetailWithPeriodRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +// returns a *GetMicrosoft365CopilotUsageUserDetailWithPeriodWithVersionRequestBuilder when successful +func (m *GetMicrosoft365CopilotUsageUserDetailWithPeriodWithVersionRequestBuilder) WithUrl(rawUrl string)(*GetMicrosoft365CopilotUsageUserDetailWithPeriodWithVersionRequestBuilder) { + return NewGetMicrosoft365CopilotUsageUserDetailWithPeriodWithVersionRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); } diff --git a/reports/get_microsoft365_copilot_user_count_summary_with_period_request_builder.go b/reports/get_microsoft365_copilot_user_count_summary_with_period_with_version_request_builder.go similarity index 50% rename from reports/get_microsoft365_copilot_user_count_summary_with_period_request_builder.go rename to reports/get_microsoft365_copilot_user_count_summary_with_period_with_version_request_builder.go index a7eaf252a26..f7cf47acb26 100644 --- a/reports/get_microsoft365_copilot_user_count_summary_with_period_request_builder.go +++ b/reports/get_microsoft365_copilot_user_count_summary_with_period_with_version_request_builder.go @@ -9,32 +9,35 @@ import ( i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" ) -// GetMicrosoft365CopilotUserCountSummaryWithPeriodRequestBuilder provides operations to call the getMicrosoft365CopilotUserCountSummary method. -type GetMicrosoft365CopilotUserCountSummaryWithPeriodRequestBuilder struct { +// GetMicrosoft365CopilotUserCountSummaryWithPeriodWithVersionRequestBuilder provides operations to call the getMicrosoft365CopilotUserCountSummary method. +type GetMicrosoft365CopilotUserCountSummaryWithPeriodWithVersionRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// GetMicrosoft365CopilotUserCountSummaryWithPeriodRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. -type GetMicrosoft365CopilotUserCountSummaryWithPeriodRequestBuilderGetRequestConfiguration struct { +// GetMicrosoft365CopilotUserCountSummaryWithPeriodWithVersionRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type GetMicrosoft365CopilotUserCountSummaryWithPeriodWithVersionRequestBuilderGetRequestConfiguration struct { // Request headers Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// NewGetMicrosoft365CopilotUserCountSummaryWithPeriodRequestBuilderInternal instantiates a new GetMicrosoft365CopilotUserCountSummaryWithPeriodRequestBuilder and sets the default values. -func NewGetMicrosoft365CopilotUserCountSummaryWithPeriodRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter, period *string)(*GetMicrosoft365CopilotUserCountSummaryWithPeriodRequestBuilder) { - m := &GetMicrosoft365CopilotUserCountSummaryWithPeriodRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/reports/getMicrosoft365CopilotUserCountSummary(period='{period}')", pathParameters), +// NewGetMicrosoft365CopilotUserCountSummaryWithPeriodWithVersionRequestBuilderInternal instantiates a new GetMicrosoft365CopilotUserCountSummaryWithPeriodWithVersionRequestBuilder and sets the default values. +func NewGetMicrosoft365CopilotUserCountSummaryWithPeriodWithVersionRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter, period *string, version *string)(*GetMicrosoft365CopilotUserCountSummaryWithPeriodWithVersionRequestBuilder) { + m := &GetMicrosoft365CopilotUserCountSummaryWithPeriodWithVersionRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/reports/getMicrosoft365CopilotUserCountSummary(period='{period}',version='{version}')", pathParameters), } if period != nil { m.BaseRequestBuilder.PathParameters["period"] = *period } + if version != nil { + m.BaseRequestBuilder.PathParameters["version"] = *version + } return m } -// NewGetMicrosoft365CopilotUserCountSummaryWithPeriodRequestBuilder instantiates a new GetMicrosoft365CopilotUserCountSummaryWithPeriodRequestBuilder and sets the default values. -func NewGetMicrosoft365CopilotUserCountSummaryWithPeriodRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*GetMicrosoft365CopilotUserCountSummaryWithPeriodRequestBuilder) { +// NewGetMicrosoft365CopilotUserCountSummaryWithPeriodWithVersionRequestBuilder instantiates a new GetMicrosoft365CopilotUserCountSummaryWithPeriodWithVersionRequestBuilder and sets the default values. +func NewGetMicrosoft365CopilotUserCountSummaryWithPeriodWithVersionRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*GetMicrosoft365CopilotUserCountSummaryWithPeriodWithVersionRequestBuilder) { urlParams := make(map[string]string) urlParams["request-raw-url"] = rawUrl - return NewGetMicrosoft365CopilotUserCountSummaryWithPeriodRequestBuilderInternal(urlParams, requestAdapter, nil) + return NewGetMicrosoft365CopilotUserCountSummaryWithPeriodWithVersionRequestBuilderInternal(urlParams, requestAdapter, nil, nil) } // Get get the aggregated number of active and enabled users of Microsoft 365 Copilot for a specified time period. // returns a []byte when successful @@ -42,7 +45,7 @@ func NewGetMicrosoft365CopilotUserCountSummaryWithPeriodRequestBuilder(rawUrl st // [Find more info here] // // [Find more info here]: https://learn.microsoft.com/graph/api/reportroot-getmicrosoft365copilotusercountsummary?view=graph-rest-beta -func (m *GetMicrosoft365CopilotUserCountSummaryWithPeriodRequestBuilder) Get(ctx context.Context, requestConfiguration *GetMicrosoft365CopilotUserCountSummaryWithPeriodRequestBuilderGetRequestConfiguration)([]byte, error) { +func (m *GetMicrosoft365CopilotUserCountSummaryWithPeriodWithVersionRequestBuilder) Get(ctx context.Context, requestConfiguration *GetMicrosoft365CopilotUserCountSummaryWithPeriodWithVersionRequestBuilderGetRequestConfiguration)([]byte, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { return nil, err @@ -61,7 +64,7 @@ func (m *GetMicrosoft365CopilotUserCountSummaryWithPeriodRequestBuilder) Get(ctx } // ToGetRequestInformation get the aggregated number of active and enabled users of Microsoft 365 Copilot for a specified time period. // returns a *RequestInformation when successful -func (m *GetMicrosoft365CopilotUserCountSummaryWithPeriodRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *GetMicrosoft365CopilotUserCountSummaryWithPeriodRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { +func (m *GetMicrosoft365CopilotUserCountSummaryWithPeriodWithVersionRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *GetMicrosoft365CopilotUserCountSummaryWithPeriodWithVersionRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { requestInfo.Headers.AddAll(requestConfiguration.Headers) @@ -71,7 +74,7 @@ func (m *GetMicrosoft365CopilotUserCountSummaryWithPeriodRequestBuilder) ToGetRe return requestInfo, nil } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. -// returns a *GetMicrosoft365CopilotUserCountSummaryWithPeriodRequestBuilder when successful -func (m *GetMicrosoft365CopilotUserCountSummaryWithPeriodRequestBuilder) WithUrl(rawUrl string)(*GetMicrosoft365CopilotUserCountSummaryWithPeriodRequestBuilder) { - return NewGetMicrosoft365CopilotUserCountSummaryWithPeriodRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +// returns a *GetMicrosoft365CopilotUserCountSummaryWithPeriodWithVersionRequestBuilder when successful +func (m *GetMicrosoft365CopilotUserCountSummaryWithPeriodWithVersionRequestBuilder) WithUrl(rawUrl string)(*GetMicrosoft365CopilotUserCountSummaryWithPeriodWithVersionRequestBuilder) { + return NewGetMicrosoft365CopilotUserCountSummaryWithPeriodWithVersionRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); } diff --git a/reports/get_microsoft365_copilot_user_count_trend_with_period_request_builder.go b/reports/get_microsoft365_copilot_user_count_trend_with_period_with_version_request_builder.go similarity index 51% rename from reports/get_microsoft365_copilot_user_count_trend_with_period_request_builder.go rename to reports/get_microsoft365_copilot_user_count_trend_with_period_with_version_request_builder.go index 7305daa4adf..d034f1a96cb 100644 --- a/reports/get_microsoft365_copilot_user_count_trend_with_period_request_builder.go +++ b/reports/get_microsoft365_copilot_user_count_trend_with_period_with_version_request_builder.go @@ -9,32 +9,35 @@ import ( i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" ) -// GetMicrosoft365CopilotUserCountTrendWithPeriodRequestBuilder provides operations to call the getMicrosoft365CopilotUserCountTrend method. -type GetMicrosoft365CopilotUserCountTrendWithPeriodRequestBuilder struct { +// GetMicrosoft365CopilotUserCountTrendWithPeriodWithVersionRequestBuilder provides operations to call the getMicrosoft365CopilotUserCountTrend method. +type GetMicrosoft365CopilotUserCountTrendWithPeriodWithVersionRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// GetMicrosoft365CopilotUserCountTrendWithPeriodRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. -type GetMicrosoft365CopilotUserCountTrendWithPeriodRequestBuilderGetRequestConfiguration struct { +// GetMicrosoft365CopilotUserCountTrendWithPeriodWithVersionRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type GetMicrosoft365CopilotUserCountTrendWithPeriodWithVersionRequestBuilderGetRequestConfiguration struct { // Request headers Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// NewGetMicrosoft365CopilotUserCountTrendWithPeriodRequestBuilderInternal instantiates a new GetMicrosoft365CopilotUserCountTrendWithPeriodRequestBuilder and sets the default values. -func NewGetMicrosoft365CopilotUserCountTrendWithPeriodRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter, period *string)(*GetMicrosoft365CopilotUserCountTrendWithPeriodRequestBuilder) { - m := &GetMicrosoft365CopilotUserCountTrendWithPeriodRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/reports/getMicrosoft365CopilotUserCountTrend(period='{period}')", pathParameters), +// NewGetMicrosoft365CopilotUserCountTrendWithPeriodWithVersionRequestBuilderInternal instantiates a new GetMicrosoft365CopilotUserCountTrendWithPeriodWithVersionRequestBuilder and sets the default values. +func NewGetMicrosoft365CopilotUserCountTrendWithPeriodWithVersionRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter, period *string, version *string)(*GetMicrosoft365CopilotUserCountTrendWithPeriodWithVersionRequestBuilder) { + m := &GetMicrosoft365CopilotUserCountTrendWithPeriodWithVersionRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/reports/getMicrosoft365CopilotUserCountTrend(period='{period}',version='{version}')", pathParameters), } if period != nil { m.BaseRequestBuilder.PathParameters["period"] = *period } + if version != nil { + m.BaseRequestBuilder.PathParameters["version"] = *version + } return m } -// NewGetMicrosoft365CopilotUserCountTrendWithPeriodRequestBuilder instantiates a new GetMicrosoft365CopilotUserCountTrendWithPeriodRequestBuilder and sets the default values. -func NewGetMicrosoft365CopilotUserCountTrendWithPeriodRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*GetMicrosoft365CopilotUserCountTrendWithPeriodRequestBuilder) { +// NewGetMicrosoft365CopilotUserCountTrendWithPeriodWithVersionRequestBuilder instantiates a new GetMicrosoft365CopilotUserCountTrendWithPeriodWithVersionRequestBuilder and sets the default values. +func NewGetMicrosoft365CopilotUserCountTrendWithPeriodWithVersionRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*GetMicrosoft365CopilotUserCountTrendWithPeriodWithVersionRequestBuilder) { urlParams := make(map[string]string) urlParams["request-raw-url"] = rawUrl - return NewGetMicrosoft365CopilotUserCountTrendWithPeriodRequestBuilderInternal(urlParams, requestAdapter, nil) + return NewGetMicrosoft365CopilotUserCountTrendWithPeriodWithVersionRequestBuilderInternal(urlParams, requestAdapter, nil, nil) } // Get get the trend in the daily number of active and enabled users of Microsoft 365 Copilot for a specified time period. // returns a []byte when successful @@ -42,7 +45,7 @@ func NewGetMicrosoft365CopilotUserCountTrendWithPeriodRequestBuilder(rawUrl stri // [Find more info here] // // [Find more info here]: https://learn.microsoft.com/graph/api/reportroot-getmicrosoft365copilotusercounttrend?view=graph-rest-beta -func (m *GetMicrosoft365CopilotUserCountTrendWithPeriodRequestBuilder) Get(ctx context.Context, requestConfiguration *GetMicrosoft365CopilotUserCountTrendWithPeriodRequestBuilderGetRequestConfiguration)([]byte, error) { +func (m *GetMicrosoft365CopilotUserCountTrendWithPeriodWithVersionRequestBuilder) Get(ctx context.Context, requestConfiguration *GetMicrosoft365CopilotUserCountTrendWithPeriodWithVersionRequestBuilderGetRequestConfiguration)([]byte, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { return nil, err @@ -61,7 +64,7 @@ func (m *GetMicrosoft365CopilotUserCountTrendWithPeriodRequestBuilder) Get(ctx c } // ToGetRequestInformation get the trend in the daily number of active and enabled users of Microsoft 365 Copilot for a specified time period. // returns a *RequestInformation when successful -func (m *GetMicrosoft365CopilotUserCountTrendWithPeriodRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *GetMicrosoft365CopilotUserCountTrendWithPeriodRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { +func (m *GetMicrosoft365CopilotUserCountTrendWithPeriodWithVersionRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *GetMicrosoft365CopilotUserCountTrendWithPeriodWithVersionRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { requestInfo.Headers.AddAll(requestConfiguration.Headers) @@ -71,7 +74,7 @@ func (m *GetMicrosoft365CopilotUserCountTrendWithPeriodRequestBuilder) ToGetRequ return requestInfo, nil } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. -// returns a *GetMicrosoft365CopilotUserCountTrendWithPeriodRequestBuilder when successful -func (m *GetMicrosoft365CopilotUserCountTrendWithPeriodRequestBuilder) WithUrl(rawUrl string)(*GetMicrosoft365CopilotUserCountTrendWithPeriodRequestBuilder) { - return NewGetMicrosoft365CopilotUserCountTrendWithPeriodRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +// returns a *GetMicrosoft365CopilotUserCountTrendWithPeriodWithVersionRequestBuilder when successful +func (m *GetMicrosoft365CopilotUserCountTrendWithPeriodWithVersionRequestBuilder) WithUrl(rawUrl string)(*GetMicrosoft365CopilotUserCountTrendWithPeriodWithVersionRequestBuilder) { + return NewGetMicrosoft365CopilotUserCountTrendWithPeriodWithVersionRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); } diff --git a/reports/reports_request_builder.go b/reports/reports_request_builder.go index efb015a5d8c..b86d2e90e57 100644 --- a/reports/reports_request_builder.go +++ b/reports/reports_request_builder.go @@ -297,20 +297,20 @@ func (m *ReportsRequestBuilder) GetMailboxUsageQuotaStatusMailboxCountsWithPerio func (m *ReportsRequestBuilder) GetMailboxUsageStorageWithPeriod(period *string)(*GetMailboxUsageStorageWithPeriodRequestBuilder) { return NewGetMailboxUsageStorageWithPeriodRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter, period) } -// GetMicrosoft365CopilotUsageUserDetailWithPeriod provides operations to call the getMicrosoft365CopilotUsageUserDetail method. -// returns a *GetMicrosoft365CopilotUsageUserDetailWithPeriodRequestBuilder when successful -func (m *ReportsRequestBuilder) GetMicrosoft365CopilotUsageUserDetailWithPeriod(period *string)(*GetMicrosoft365CopilotUsageUserDetailWithPeriodRequestBuilder) { - return NewGetMicrosoft365CopilotUsageUserDetailWithPeriodRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter, period) -} -// GetMicrosoft365CopilotUserCountSummaryWithPeriod provides operations to call the getMicrosoft365CopilotUserCountSummary method. -// returns a *GetMicrosoft365CopilotUserCountSummaryWithPeriodRequestBuilder when successful -func (m *ReportsRequestBuilder) GetMicrosoft365CopilotUserCountSummaryWithPeriod(period *string)(*GetMicrosoft365CopilotUserCountSummaryWithPeriodRequestBuilder) { - return NewGetMicrosoft365CopilotUserCountSummaryWithPeriodRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter, period) -} -// GetMicrosoft365CopilotUserCountTrendWithPeriod provides operations to call the getMicrosoft365CopilotUserCountTrend method. -// returns a *GetMicrosoft365CopilotUserCountTrendWithPeriodRequestBuilder when successful -func (m *ReportsRequestBuilder) GetMicrosoft365CopilotUserCountTrendWithPeriod(period *string)(*GetMicrosoft365CopilotUserCountTrendWithPeriodRequestBuilder) { - return NewGetMicrosoft365CopilotUserCountTrendWithPeriodRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter, period) +// GetMicrosoft365CopilotUsageUserDetailWithPeriodWithVersion provides operations to call the getMicrosoft365CopilotUsageUserDetail method. +// returns a *GetMicrosoft365CopilotUsageUserDetailWithPeriodWithVersionRequestBuilder when successful +func (m *ReportsRequestBuilder) GetMicrosoft365CopilotUsageUserDetailWithPeriodWithVersion(period *string, version *string)(*GetMicrosoft365CopilotUsageUserDetailWithPeriodWithVersionRequestBuilder) { + return NewGetMicrosoft365CopilotUsageUserDetailWithPeriodWithVersionRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter, period, version) +} +// GetMicrosoft365CopilotUserCountSummaryWithPeriodWithVersion provides operations to call the getMicrosoft365CopilotUserCountSummary method. +// returns a *GetMicrosoft365CopilotUserCountSummaryWithPeriodWithVersionRequestBuilder when successful +func (m *ReportsRequestBuilder) GetMicrosoft365CopilotUserCountSummaryWithPeriodWithVersion(period *string, version *string)(*GetMicrosoft365CopilotUserCountSummaryWithPeriodWithVersionRequestBuilder) { + return NewGetMicrosoft365CopilotUserCountSummaryWithPeriodWithVersionRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter, period, version) +} +// GetMicrosoft365CopilotUserCountTrendWithPeriodWithVersion provides operations to call the getMicrosoft365CopilotUserCountTrend method. +// returns a *GetMicrosoft365CopilotUserCountTrendWithPeriodWithVersionRequestBuilder when successful +func (m *ReportsRequestBuilder) GetMicrosoft365CopilotUserCountTrendWithPeriodWithVersion(period *string, version *string)(*GetMicrosoft365CopilotUserCountTrendWithPeriodWithVersionRequestBuilder) { + return NewGetMicrosoft365CopilotUserCountTrendWithPeriodWithVersionRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter, period, version) } // GetOffice365ActivationCounts provides operations to call the getOffice365ActivationCounts method. // returns a *GetOffice365ActivationCountsRequestBuilder when successful diff --git a/security/case_management_cases_case_item_request_builder.go b/security/case_management_cases_case_item_request_builder.go new file mode 100644 index 00000000000..895b214eac0 --- /dev/null +++ b/security/case_management_cases_case_item_request_builder.go @@ -0,0 +1,189 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package security + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" + i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/security/casemanagement" +) + +// CaseManagementCasesCaseItemRequestBuilder provides operations to manage the cases property of the microsoft.graph.security.caseManagementRoot entity. +type CaseManagementCasesCaseItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// CaseManagementCasesCaseItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CaseManagementCasesCaseItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// CaseManagementCasesCaseItemRequestBuilderGetQueryParameters read the properties and relationships of a microsoft.graph.security.caseManagement.case object. +type CaseManagementCasesCaseItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string "uriparametername:\"%24expand\"" + // Select properties to be returned + Select []string "uriparametername:\"%24select\"" +} +// CaseManagementCasesCaseItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CaseManagementCasesCaseItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *CaseManagementCasesCaseItemRequestBuilderGetQueryParameters +} +// CaseManagementCasesCaseItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CaseManagementCasesCaseItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// Activities provides operations to manage the activities property of the microsoft.graph.security.caseManagement.case entity. +// returns a *CaseManagementCasesItemActivitiesRequestBuilder when successful +func (m *CaseManagementCasesCaseItemRequestBuilder) Activities()(*CaseManagementCasesItemActivitiesRequestBuilder) { + return NewCaseManagementCasesItemActivitiesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Attachments provides operations to manage the attachments property of the microsoft.graph.security.caseManagement.case entity. +// returns a *CaseManagementCasesItemAttachmentsRequestBuilder when successful +func (m *CaseManagementCasesCaseItemRequestBuilder) Attachments()(*CaseManagementCasesItemAttachmentsRequestBuilder) { + return NewCaseManagementCasesItemAttachmentsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewCaseManagementCasesCaseItemRequestBuilderInternal instantiates a new CaseManagementCasesCaseItemRequestBuilder and sets the default values. +func NewCaseManagementCasesCaseItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CaseManagementCasesCaseItemRequestBuilder) { + m := &CaseManagementCasesCaseItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/security/caseManagement/cases/{case%2Did}{?%24expand,%24select}", pathParameters), + } + return m +} +// NewCaseManagementCasesCaseItemRequestBuilder instantiates a new CaseManagementCasesCaseItemRequestBuilder and sets the default values. +func NewCaseManagementCasesCaseItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CaseManagementCasesCaseItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewCaseManagementCasesCaseItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete a case object from case management. +// returns a ODataError error when the service returns a 4XX or 5XX status code +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/security-casemanagementroot-delete-cases?view=graph-rest-beta +func (m *CaseManagementCasesCaseItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *CaseManagementCasesCaseItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get read the properties and relationships of a microsoft.graph.security.caseManagement.case object. +// returns a CaseEscapedable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/security-casemanagement-case-get?view=graph-rest-beta +func (m *CaseManagementCasesCaseItemRequestBuilder) Get(ctx context.Context, requestConfiguration *CaseManagementCasesCaseItemRequestBuilderGetRequestConfiguration)(i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.CaseEscapedable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.CreateCaseEscapedFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.CaseEscapedable), nil +} +// Patch update the properties of a microsoft.graph.security.caseManagement.case object. +// returns a CaseEscapedable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/security-casemanagement-case-update?view=graph-rest-beta +func (m *CaseManagementCasesCaseItemRequestBuilder) Patch(ctx context.Context, body i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.CaseEscapedable, requestConfiguration *CaseManagementCasesCaseItemRequestBuilderPatchRequestConfiguration)(i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.CaseEscapedable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.CreateCaseEscapedFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.CaseEscapedable), nil +} +// Relations provides operations to manage the relations property of the microsoft.graph.security.caseManagement.case entity. +// returns a *CaseManagementCasesItemRelationsRequestBuilder when successful +func (m *CaseManagementCasesCaseItemRequestBuilder) Relations()(*CaseManagementCasesItemRelationsRequestBuilder) { + return NewCaseManagementCasesItemRelationsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Tasks provides operations to manage the tasks property of the microsoft.graph.security.caseManagement.case entity. +// returns a *CaseManagementCasesItemTasksRequestBuilder when successful +func (m *CaseManagementCasesCaseItemRequestBuilder) Tasks()(*CaseManagementCasesItemTasksRequestBuilder) { + return NewCaseManagementCasesItemTasksRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToDeleteRequestInformation delete a case object from case management. +// returns a *RequestInformation when successful +func (m *CaseManagementCasesCaseItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *CaseManagementCasesCaseItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation read the properties and relationships of a microsoft.graph.security.caseManagement.case object. +// returns a *RequestInformation when successful +func (m *CaseManagementCasesCaseItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *CaseManagementCasesCaseItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation update the properties of a microsoft.graph.security.caseManagement.case object. +// returns a *RequestInformation when successful +func (m *CaseManagementCasesCaseItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.CaseEscapedable, requestConfiguration *CaseManagementCasesCaseItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *CaseManagementCasesCaseItemRequestBuilder when successful +func (m *CaseManagementCasesCaseItemRequestBuilder) WithUrl(rawUrl string)(*CaseManagementCasesCaseItemRequestBuilder) { + return NewCaseManagementCasesCaseItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/security/case_management_cases_count_request_builder.go b/security/case_management_cases_count_request_builder.go new file mode 100644 index 00000000000..0bda066c3eb --- /dev/null +++ b/security/case_management_cases_count_request_builder.go @@ -0,0 +1,83 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package security + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// CaseManagementCasesCountRequestBuilder provides operations to count the resources in the collection. +type CaseManagementCasesCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// CaseManagementCasesCountRequestBuilderGetQueryParameters get the number of the resource +type CaseManagementCasesCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string "uriparametername:\"%24filter\"" + // Search items by search phrases + Search *string "uriparametername:\"%24search\"" +} +// CaseManagementCasesCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CaseManagementCasesCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *CaseManagementCasesCountRequestBuilderGetQueryParameters +} +// NewCaseManagementCasesCountRequestBuilderInternal instantiates a new CaseManagementCasesCountRequestBuilder and sets the default values. +func NewCaseManagementCasesCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CaseManagementCasesCountRequestBuilder) { + m := &CaseManagementCasesCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/security/caseManagement/cases/$count{?%24filter,%24search}", pathParameters), + } + return m +} +// NewCaseManagementCasesCountRequestBuilder instantiates a new CaseManagementCasesCountRequestBuilder and sets the default values. +func NewCaseManagementCasesCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CaseManagementCasesCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewCaseManagementCasesCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +// returns a *int32 when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *CaseManagementCasesCountRequestBuilder) Get(ctx context.Context, requestConfiguration *CaseManagementCasesCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": 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 +// returns a *RequestInformation when successful +func (m *CaseManagementCasesCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *CaseManagementCasesCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *CaseManagementCasesCountRequestBuilder when successful +func (m *CaseManagementCasesCountRequestBuilder) WithUrl(rawUrl string)(*CaseManagementCasesCountRequestBuilder) { + return NewCaseManagementCasesCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/security/case_management_cases_item_activities_activity_item_request_builder.go b/security/case_management_cases_item_activities_activity_item_request_builder.go new file mode 100644 index 00000000000..8decac14f2c --- /dev/null +++ b/security/case_management_cases_item_activities_activity_item_request_builder.go @@ -0,0 +1,169 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package security + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" + i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/security/casemanagement" +) + +// CaseManagementCasesItemActivitiesActivityItemRequestBuilder provides operations to manage the activities property of the microsoft.graph.security.caseManagement.case entity. +type CaseManagementCasesItemActivitiesActivityItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// CaseManagementCasesItemActivitiesActivityItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CaseManagementCasesItemActivitiesActivityItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// CaseManagementCasesItemActivitiesActivityItemRequestBuilderGetQueryParameters read the properties and relationships of a microsoft.graph.security.caseManagement.activity object. The response can be a comment or auditLog object, identified by @odata.type. +type CaseManagementCasesItemActivitiesActivityItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string "uriparametername:\"%24expand\"" + // Select properties to be returned + Select []string "uriparametername:\"%24select\"" +} +// CaseManagementCasesItemActivitiesActivityItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CaseManagementCasesItemActivitiesActivityItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *CaseManagementCasesItemActivitiesActivityItemRequestBuilderGetQueryParameters +} +// CaseManagementCasesItemActivitiesActivityItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CaseManagementCasesItemActivitiesActivityItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewCaseManagementCasesItemActivitiesActivityItemRequestBuilderInternal instantiates a new CaseManagementCasesItemActivitiesActivityItemRequestBuilder and sets the default values. +func NewCaseManagementCasesItemActivitiesActivityItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CaseManagementCasesItemActivitiesActivityItemRequestBuilder) { + m := &CaseManagementCasesItemActivitiesActivityItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/security/caseManagement/cases/{case%2Did}/activities/{activity%2Did}{?%24expand,%24select}", pathParameters), + } + return m +} +// NewCaseManagementCasesItemActivitiesActivityItemRequestBuilder instantiates a new CaseManagementCasesItemActivitiesActivityItemRequestBuilder and sets the default values. +func NewCaseManagementCasesItemActivitiesActivityItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CaseManagementCasesItemActivitiesActivityItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewCaseManagementCasesItemActivitiesActivityItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete a comment activity from a case timeline. Only comment activities support delete. +// returns a ODataError error when the service returns a 4XX or 5XX status code +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/security-casemanagement-activity-delete?view=graph-rest-beta +func (m *CaseManagementCasesItemActivitiesActivityItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *CaseManagementCasesItemActivitiesActivityItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get read the properties and relationships of a microsoft.graph.security.caseManagement.activity object. The response can be a comment or auditLog object, identified by @odata.type. +// returns a Activityable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/security-casemanagement-activity-get?view=graph-rest-beta +func (m *CaseManagementCasesItemActivitiesActivityItemRequestBuilder) Get(ctx context.Context, requestConfiguration *CaseManagementCasesItemActivitiesActivityItemRequestBuilderGetRequestConfiguration)(i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.Activityable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.CreateActivityFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.Activityable), nil +} +// Patch update a comment activity in a case timeline. Only comment activities support update. Include @odata.type with #microsoft.graph.security.caseManagement.comment in the request body to identify the concrete activity type. +// returns a Activityable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/security-casemanagement-activity-update?view=graph-rest-beta +func (m *CaseManagementCasesItemActivitiesActivityItemRequestBuilder) Patch(ctx context.Context, body i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.Activityable, requestConfiguration *CaseManagementCasesItemActivitiesActivityItemRequestBuilderPatchRequestConfiguration)(i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.Activityable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.CreateActivityFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.Activityable), nil +} +// ToDeleteRequestInformation delete a comment activity from a case timeline. Only comment activities support delete. +// returns a *RequestInformation when successful +func (m *CaseManagementCasesItemActivitiesActivityItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *CaseManagementCasesItemActivitiesActivityItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation read the properties and relationships of a microsoft.graph.security.caseManagement.activity object. The response can be a comment or auditLog object, identified by @odata.type. +// returns a *RequestInformation when successful +func (m *CaseManagementCasesItemActivitiesActivityItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *CaseManagementCasesItemActivitiesActivityItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation update a comment activity in a case timeline. Only comment activities support update. Include @odata.type with #microsoft.graph.security.caseManagement.comment in the request body to identify the concrete activity type. +// returns a *RequestInformation when successful +func (m *CaseManagementCasesItemActivitiesActivityItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.Activityable, requestConfiguration *CaseManagementCasesItemActivitiesActivityItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *CaseManagementCasesItemActivitiesActivityItemRequestBuilder when successful +func (m *CaseManagementCasesItemActivitiesActivityItemRequestBuilder) WithUrl(rawUrl string)(*CaseManagementCasesItemActivitiesActivityItemRequestBuilder) { + return NewCaseManagementCasesItemActivitiesActivityItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/security/case_management_cases_item_activities_count_request_builder.go b/security/case_management_cases_item_activities_count_request_builder.go new file mode 100644 index 00000000000..0905d64319f --- /dev/null +++ b/security/case_management_cases_item_activities_count_request_builder.go @@ -0,0 +1,83 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package security + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// CaseManagementCasesItemActivitiesCountRequestBuilder provides operations to count the resources in the collection. +type CaseManagementCasesItemActivitiesCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// CaseManagementCasesItemActivitiesCountRequestBuilderGetQueryParameters get the number of the resource +type CaseManagementCasesItemActivitiesCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string "uriparametername:\"%24filter\"" + // Search items by search phrases + Search *string "uriparametername:\"%24search\"" +} +// CaseManagementCasesItemActivitiesCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CaseManagementCasesItemActivitiesCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *CaseManagementCasesItemActivitiesCountRequestBuilderGetQueryParameters +} +// NewCaseManagementCasesItemActivitiesCountRequestBuilderInternal instantiates a new CaseManagementCasesItemActivitiesCountRequestBuilder and sets the default values. +func NewCaseManagementCasesItemActivitiesCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CaseManagementCasesItemActivitiesCountRequestBuilder) { + m := &CaseManagementCasesItemActivitiesCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/security/caseManagement/cases/{case%2Did}/activities/$count{?%24filter,%24search}", pathParameters), + } + return m +} +// NewCaseManagementCasesItemActivitiesCountRequestBuilder instantiates a new CaseManagementCasesItemActivitiesCountRequestBuilder and sets the default values. +func NewCaseManagementCasesItemActivitiesCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CaseManagementCasesItemActivitiesCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewCaseManagementCasesItemActivitiesCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +// returns a *int32 when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *CaseManagementCasesItemActivitiesCountRequestBuilder) Get(ctx context.Context, requestConfiguration *CaseManagementCasesItemActivitiesCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": 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 +// returns a *RequestInformation when successful +func (m *CaseManagementCasesItemActivitiesCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *CaseManagementCasesItemActivitiesCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *CaseManagementCasesItemActivitiesCountRequestBuilder when successful +func (m *CaseManagementCasesItemActivitiesCountRequestBuilder) WithUrl(rawUrl string)(*CaseManagementCasesItemActivitiesCountRequestBuilder) { + return NewCaseManagementCasesItemActivitiesCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/security/case_management_cases_item_activities_request_builder.go b/security/case_management_cases_item_activities_request_builder.go new file mode 100644 index 00000000000..08ed19d6620 --- /dev/null +++ b/security/case_management_cases_item_activities_request_builder.go @@ -0,0 +1,161 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package security + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" + i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/security/casemanagement" +) + +// CaseManagementCasesItemActivitiesRequestBuilder provides operations to manage the activities property of the microsoft.graph.security.caseManagement.case entity. +type CaseManagementCasesItemActivitiesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// CaseManagementCasesItemActivitiesRequestBuilderGetQueryParameters get a list of activity objects in a case timeline. +type CaseManagementCasesItemActivitiesRequestBuilderGetQueryParameters 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\"" +} +// CaseManagementCasesItemActivitiesRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CaseManagementCasesItemActivitiesRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *CaseManagementCasesItemActivitiesRequestBuilderGetQueryParameters +} +// CaseManagementCasesItemActivitiesRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CaseManagementCasesItemActivitiesRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByActivityId provides operations to manage the activities property of the microsoft.graph.security.caseManagement.case entity. +// returns a *CaseManagementCasesItemActivitiesActivityItemRequestBuilder when successful +func (m *CaseManagementCasesItemActivitiesRequestBuilder) ByActivityId(activityId string)(*CaseManagementCasesItemActivitiesActivityItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if activityId != "" { + urlTplParams["activity%2Did"] = activityId + } + return NewCaseManagementCasesItemActivitiesActivityItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewCaseManagementCasesItemActivitiesRequestBuilderInternal instantiates a new CaseManagementCasesItemActivitiesRequestBuilder and sets the default values. +func NewCaseManagementCasesItemActivitiesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CaseManagementCasesItemActivitiesRequestBuilder) { + m := &CaseManagementCasesItemActivitiesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/security/caseManagement/cases/{case%2Did}/activities{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters), + } + return m +} +// NewCaseManagementCasesItemActivitiesRequestBuilder instantiates a new CaseManagementCasesItemActivitiesRequestBuilder and sets the default values. +func NewCaseManagementCasesItemActivitiesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CaseManagementCasesItemActivitiesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewCaseManagementCasesItemActivitiesRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +// returns a *CaseManagementCasesItemActivitiesCountRequestBuilder when successful +func (m *CaseManagementCasesItemActivitiesRequestBuilder) Count()(*CaseManagementCasesItemActivitiesCountRequestBuilder) { + return NewCaseManagementCasesItemActivitiesCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get get a list of activity objects in a case timeline. +// returns a ActivityCollectionResponseable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/security-casemanagement-case-list-activities?view=graph-rest-beta +func (m *CaseManagementCasesItemActivitiesRequestBuilder) Get(ctx context.Context, requestConfiguration *CaseManagementCasesItemActivitiesRequestBuilderGetRequestConfiguration)(i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.ActivityCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.CreateActivityCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.ActivityCollectionResponseable), nil +} +// Post create a comment activity for a case. +// returns a Activityable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/security-casemanagement-case-post-activities?view=graph-rest-beta +func (m *CaseManagementCasesItemActivitiesRequestBuilder) Post(ctx context.Context, body i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.Activityable, requestConfiguration *CaseManagementCasesItemActivitiesRequestBuilderPostRequestConfiguration)(i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.Activityable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.CreateActivityFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.Activityable), nil +} +// ToGetRequestInformation get a list of activity objects in a case timeline. +// returns a *RequestInformation when successful +func (m *CaseManagementCasesItemActivitiesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *CaseManagementCasesItemActivitiesRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation create a comment activity for a case. +// returns a *RequestInformation when successful +func (m *CaseManagementCasesItemActivitiesRequestBuilder) ToPostRequestInformation(ctx context.Context, body i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.Activityable, requestConfiguration *CaseManagementCasesItemActivitiesRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *CaseManagementCasesItemActivitiesRequestBuilder when successful +func (m *CaseManagementCasesItemActivitiesRequestBuilder) WithUrl(rawUrl string)(*CaseManagementCasesItemActivitiesRequestBuilder) { + return NewCaseManagementCasesItemActivitiesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/security/case_management_cases_item_attachments_attachment_item_request_builder.go b/security/case_management_cases_item_attachments_attachment_item_request_builder.go new file mode 100644 index 00000000000..d9503a321f8 --- /dev/null +++ b/security/case_management_cases_item_attachments_attachment_item_request_builder.go @@ -0,0 +1,171 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package security + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" + i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/security/casemanagement" +) + +// CaseManagementCasesItemAttachmentsAttachmentItemRequestBuilder provides operations to manage the attachments property of the microsoft.graph.security.caseManagement.case entity. +type CaseManagementCasesItemAttachmentsAttachmentItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// CaseManagementCasesItemAttachmentsAttachmentItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CaseManagementCasesItemAttachmentsAttachmentItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// CaseManagementCasesItemAttachmentsAttachmentItemRequestBuilderGetQueryParameters read the properties and relationships of an attachment object. +type CaseManagementCasesItemAttachmentsAttachmentItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string "uriparametername:\"%24expand\"" + // Select properties to be returned + Select []string "uriparametername:\"%24select\"" +} +// CaseManagementCasesItemAttachmentsAttachmentItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CaseManagementCasesItemAttachmentsAttachmentItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *CaseManagementCasesItemAttachmentsAttachmentItemRequestBuilderGetQueryParameters +} +// CaseManagementCasesItemAttachmentsAttachmentItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CaseManagementCasesItemAttachmentsAttachmentItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewCaseManagementCasesItemAttachmentsAttachmentItemRequestBuilderInternal instantiates a new CaseManagementCasesItemAttachmentsAttachmentItemRequestBuilder and sets the default values. +func NewCaseManagementCasesItemAttachmentsAttachmentItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CaseManagementCasesItemAttachmentsAttachmentItemRequestBuilder) { + m := &CaseManagementCasesItemAttachmentsAttachmentItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/security/caseManagement/cases/{case%2Did}/attachments/{attachment%2Did}{?%24expand,%24select}", pathParameters), + } + return m +} +// NewCaseManagementCasesItemAttachmentsAttachmentItemRequestBuilder instantiates a new CaseManagementCasesItemAttachmentsAttachmentItemRequestBuilder and sets the default values. +func NewCaseManagementCasesItemAttachmentsAttachmentItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CaseManagementCasesItemAttachmentsAttachmentItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewCaseManagementCasesItemAttachmentsAttachmentItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Content provides operations to manage the media for the security entity. +// returns a *CaseManagementCasesItemAttachmentsItemContentRequestBuilder when successful +func (m *CaseManagementCasesItemAttachmentsAttachmentItemRequestBuilder) Content()(*CaseManagementCasesItemAttachmentsItemContentRequestBuilder) { + return NewCaseManagementCasesItemAttachmentsItemContentRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Delete delete navigation property attachments for security +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *CaseManagementCasesItemAttachmentsAttachmentItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *CaseManagementCasesItemAttachmentsAttachmentItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get read the properties and relationships of an attachment object. +// returns a Attachmentable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/security-casemanagement-attachment-get?view=graph-rest-beta +func (m *CaseManagementCasesItemAttachmentsAttachmentItemRequestBuilder) Get(ctx context.Context, requestConfiguration *CaseManagementCasesItemAttachmentsAttachmentItemRequestBuilderGetRequestConfiguration)(i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.Attachmentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.CreateAttachmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.Attachmentable), nil +} +// Patch update the properties of an attachment object. +// returns a Attachmentable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/security-casemanagement-attachment-update?view=graph-rest-beta +func (m *CaseManagementCasesItemAttachmentsAttachmentItemRequestBuilder) Patch(ctx context.Context, body i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.Attachmentable, requestConfiguration *CaseManagementCasesItemAttachmentsAttachmentItemRequestBuilderPatchRequestConfiguration)(i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.Attachmentable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.CreateAttachmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.Attachmentable), nil +} +// ToDeleteRequestInformation delete navigation property attachments for security +// returns a *RequestInformation when successful +func (m *CaseManagementCasesItemAttachmentsAttachmentItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *CaseManagementCasesItemAttachmentsAttachmentItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation read the properties and relationships of an attachment object. +// returns a *RequestInformation when successful +func (m *CaseManagementCasesItemAttachmentsAttachmentItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *CaseManagementCasesItemAttachmentsAttachmentItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation update the properties of an attachment object. +// returns a *RequestInformation when successful +func (m *CaseManagementCasesItemAttachmentsAttachmentItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.Attachmentable, requestConfiguration *CaseManagementCasesItemAttachmentsAttachmentItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *CaseManagementCasesItemAttachmentsAttachmentItemRequestBuilder when successful +func (m *CaseManagementCasesItemAttachmentsAttachmentItemRequestBuilder) WithUrl(rawUrl string)(*CaseManagementCasesItemAttachmentsAttachmentItemRequestBuilder) { + return NewCaseManagementCasesItemAttachmentsAttachmentItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/security/case_management_cases_item_attachments_count_request_builder.go b/security/case_management_cases_item_attachments_count_request_builder.go new file mode 100644 index 00000000000..3fef3f0dbc6 --- /dev/null +++ b/security/case_management_cases_item_attachments_count_request_builder.go @@ -0,0 +1,83 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package security + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// CaseManagementCasesItemAttachmentsCountRequestBuilder provides operations to count the resources in the collection. +type CaseManagementCasesItemAttachmentsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// CaseManagementCasesItemAttachmentsCountRequestBuilderGetQueryParameters get the number of the resource +type CaseManagementCasesItemAttachmentsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string "uriparametername:\"%24filter\"" + // Search items by search phrases + Search *string "uriparametername:\"%24search\"" +} +// CaseManagementCasesItemAttachmentsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CaseManagementCasesItemAttachmentsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *CaseManagementCasesItemAttachmentsCountRequestBuilderGetQueryParameters +} +// NewCaseManagementCasesItemAttachmentsCountRequestBuilderInternal instantiates a new CaseManagementCasesItemAttachmentsCountRequestBuilder and sets the default values. +func NewCaseManagementCasesItemAttachmentsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CaseManagementCasesItemAttachmentsCountRequestBuilder) { + m := &CaseManagementCasesItemAttachmentsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/security/caseManagement/cases/{case%2Did}/attachments/$count{?%24filter,%24search}", pathParameters), + } + return m +} +// NewCaseManagementCasesItemAttachmentsCountRequestBuilder instantiates a new CaseManagementCasesItemAttachmentsCountRequestBuilder and sets the default values. +func NewCaseManagementCasesItemAttachmentsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CaseManagementCasesItemAttachmentsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewCaseManagementCasesItemAttachmentsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +// returns a *int32 when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *CaseManagementCasesItemAttachmentsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *CaseManagementCasesItemAttachmentsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": 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 +// returns a *RequestInformation when successful +func (m *CaseManagementCasesItemAttachmentsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *CaseManagementCasesItemAttachmentsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *CaseManagementCasesItemAttachmentsCountRequestBuilder when successful +func (m *CaseManagementCasesItemAttachmentsCountRequestBuilder) WithUrl(rawUrl string)(*CaseManagementCasesItemAttachmentsCountRequestBuilder) { + return NewCaseManagementCasesItemAttachmentsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/security/case_management_cases_item_attachments_item_content_request_builder.go b/security/case_management_cases_item_attachments_item_content_request_builder.go new file mode 100644 index 00000000000..d7af3a9b49e --- /dev/null +++ b/security/case_management_cases_item_attachments_item_content_request_builder.go @@ -0,0 +1,145 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package security + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" + i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/security/casemanagement" +) + +// CaseManagementCasesItemAttachmentsItemContentRequestBuilder provides operations to manage the media for the security entity. +type CaseManagementCasesItemAttachmentsItemContentRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// CaseManagementCasesItemAttachmentsItemContentRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CaseManagementCasesItemAttachmentsItemContentRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// CaseManagementCasesItemAttachmentsItemContentRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CaseManagementCasesItemAttachmentsItemContentRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// CaseManagementCasesItemAttachmentsItemContentRequestBuilderPutRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CaseManagementCasesItemAttachmentsItemContentRequestBuilderPutRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewCaseManagementCasesItemAttachmentsItemContentRequestBuilderInternal instantiates a new CaseManagementCasesItemAttachmentsItemContentRequestBuilder and sets the default values. +func NewCaseManagementCasesItemAttachmentsItemContentRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CaseManagementCasesItemAttachmentsItemContentRequestBuilder) { + m := &CaseManagementCasesItemAttachmentsItemContentRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/security/caseManagement/cases/{case%2Did}/attachments/{attachment%2Did}/content", pathParameters), + } + return m +} +// NewCaseManagementCasesItemAttachmentsItemContentRequestBuilder instantiates a new CaseManagementCasesItemAttachmentsItemContentRequestBuilder and sets the default values. +func NewCaseManagementCasesItemAttachmentsItemContentRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CaseManagementCasesItemAttachmentsItemContentRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewCaseManagementCasesItemAttachmentsItemContentRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete the binary content stream for the attachment. +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *CaseManagementCasesItemAttachmentsItemContentRequestBuilder) Delete(ctx context.Context, requestConfiguration *CaseManagementCasesItemAttachmentsItemContentRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get the binary content stream for the attachment. +// returns a []byte when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *CaseManagementCasesItemAttachmentsItemContentRequestBuilder) Get(ctx context.Context, requestConfiguration *CaseManagementCasesItemAttachmentsItemContentRequestBuilderGetRequestConfiguration)([]byte, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "[]byte", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.([]byte), nil +} +// Put the binary content stream for the attachment. +// returns a Attachmentable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *CaseManagementCasesItemAttachmentsItemContentRequestBuilder) Put(ctx context.Context, body []byte, requestConfiguration *CaseManagementCasesItemAttachmentsItemContentRequestBuilderPutRequestConfiguration)(i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.Attachmentable, error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.CreateAttachmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.Attachmentable), nil +} +// ToDeleteRequestInformation the binary content stream for the attachment. +// returns a *RequestInformation when successful +func (m *CaseManagementCasesItemAttachmentsItemContentRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *CaseManagementCasesItemAttachmentsItemContentRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation the binary content stream for the attachment. +// returns a *RequestInformation when successful +func (m *CaseManagementCasesItemAttachmentsItemContentRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *CaseManagementCasesItemAttachmentsItemContentRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json") + return requestInfo, nil +} +// ToPutRequestInformation the binary content stream for the attachment. +// returns a *RequestInformation when successful +func (m *CaseManagementCasesItemAttachmentsItemContentRequestBuilder) ToPutRequestInformation(ctx context.Context, body []byte, requestConfiguration *CaseManagementCasesItemAttachmentsItemContentRequestBuilderPutRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PUT, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + requestInfo.SetStreamContentAndContentType(body, "application/octet-stream") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *CaseManagementCasesItemAttachmentsItemContentRequestBuilder when successful +func (m *CaseManagementCasesItemAttachmentsItemContentRequestBuilder) WithUrl(rawUrl string)(*CaseManagementCasesItemAttachmentsItemContentRequestBuilder) { + return NewCaseManagementCasesItemAttachmentsItemContentRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/security/case_management_cases_item_attachments_request_builder.go b/security/case_management_cases_item_attachments_request_builder.go new file mode 100644 index 00000000000..12ebf1e76f9 --- /dev/null +++ b/security/case_management_cases_item_attachments_request_builder.go @@ -0,0 +1,161 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package security + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" + i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/security/casemanagement" +) + +// CaseManagementCasesItemAttachmentsRequestBuilder provides operations to manage the attachments property of the microsoft.graph.security.caseManagement.case entity. +type CaseManagementCasesItemAttachmentsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// CaseManagementCasesItemAttachmentsRequestBuilderGetQueryParameters get a list of attachment objects for a case. +type CaseManagementCasesItemAttachmentsRequestBuilderGetQueryParameters 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\"" +} +// CaseManagementCasesItemAttachmentsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CaseManagementCasesItemAttachmentsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *CaseManagementCasesItemAttachmentsRequestBuilderGetQueryParameters +} +// CaseManagementCasesItemAttachmentsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CaseManagementCasesItemAttachmentsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByAttachmentId provides operations to manage the attachments property of the microsoft.graph.security.caseManagement.case entity. +// returns a *CaseManagementCasesItemAttachmentsAttachmentItemRequestBuilder when successful +func (m *CaseManagementCasesItemAttachmentsRequestBuilder) ByAttachmentId(attachmentId string)(*CaseManagementCasesItemAttachmentsAttachmentItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if attachmentId != "" { + urlTplParams["attachment%2Did"] = attachmentId + } + return NewCaseManagementCasesItemAttachmentsAttachmentItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewCaseManagementCasesItemAttachmentsRequestBuilderInternal instantiates a new CaseManagementCasesItemAttachmentsRequestBuilder and sets the default values. +func NewCaseManagementCasesItemAttachmentsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CaseManagementCasesItemAttachmentsRequestBuilder) { + m := &CaseManagementCasesItemAttachmentsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/security/caseManagement/cases/{case%2Did}/attachments{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters), + } + return m +} +// NewCaseManagementCasesItemAttachmentsRequestBuilder instantiates a new CaseManagementCasesItemAttachmentsRequestBuilder and sets the default values. +func NewCaseManagementCasesItemAttachmentsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CaseManagementCasesItemAttachmentsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewCaseManagementCasesItemAttachmentsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +// returns a *CaseManagementCasesItemAttachmentsCountRequestBuilder when successful +func (m *CaseManagementCasesItemAttachmentsRequestBuilder) Count()(*CaseManagementCasesItemAttachmentsCountRequestBuilder) { + return NewCaseManagementCasesItemAttachmentsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get get a list of attachment objects for a case. +// returns a AttachmentCollectionResponseable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/security-casemanagement-case-list-attachments?view=graph-rest-beta +func (m *CaseManagementCasesItemAttachmentsRequestBuilder) Get(ctx context.Context, requestConfiguration *CaseManagementCasesItemAttachmentsRequestBuilderGetRequestConfiguration)(i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.AttachmentCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.CreateAttachmentCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.AttachmentCollectionResponseable), nil +} +// Post create an attachment for a case. +// returns a Attachmentable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/security-casemanagement-case-post-attachments?view=graph-rest-beta +func (m *CaseManagementCasesItemAttachmentsRequestBuilder) Post(ctx context.Context, body i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.Attachmentable, requestConfiguration *CaseManagementCasesItemAttachmentsRequestBuilderPostRequestConfiguration)(i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.Attachmentable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.CreateAttachmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.Attachmentable), nil +} +// ToGetRequestInformation get a list of attachment objects for a case. +// returns a *RequestInformation when successful +func (m *CaseManagementCasesItemAttachmentsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *CaseManagementCasesItemAttachmentsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation create an attachment for a case. +// returns a *RequestInformation when successful +func (m *CaseManagementCasesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.Attachmentable, requestConfiguration *CaseManagementCasesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *CaseManagementCasesItemAttachmentsRequestBuilder when successful +func (m *CaseManagementCasesItemAttachmentsRequestBuilder) WithUrl(rawUrl string)(*CaseManagementCasesItemAttachmentsRequestBuilder) { + return NewCaseManagementCasesItemAttachmentsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/security/case_management_cases_item_relations_count_request_builder.go b/security/case_management_cases_item_relations_count_request_builder.go new file mode 100644 index 00000000000..18fba29ee51 --- /dev/null +++ b/security/case_management_cases_item_relations_count_request_builder.go @@ -0,0 +1,83 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package security + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// CaseManagementCasesItemRelationsCountRequestBuilder provides operations to count the resources in the collection. +type CaseManagementCasesItemRelationsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// CaseManagementCasesItemRelationsCountRequestBuilderGetQueryParameters get the number of the resource +type CaseManagementCasesItemRelationsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string "uriparametername:\"%24filter\"" + // Search items by search phrases + Search *string "uriparametername:\"%24search\"" +} +// CaseManagementCasesItemRelationsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CaseManagementCasesItemRelationsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *CaseManagementCasesItemRelationsCountRequestBuilderGetQueryParameters +} +// NewCaseManagementCasesItemRelationsCountRequestBuilderInternal instantiates a new CaseManagementCasesItemRelationsCountRequestBuilder and sets the default values. +func NewCaseManagementCasesItemRelationsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CaseManagementCasesItemRelationsCountRequestBuilder) { + m := &CaseManagementCasesItemRelationsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/security/caseManagement/cases/{case%2Did}/relations/$count{?%24filter,%24search}", pathParameters), + } + return m +} +// NewCaseManagementCasesItemRelationsCountRequestBuilder instantiates a new CaseManagementCasesItemRelationsCountRequestBuilder and sets the default values. +func NewCaseManagementCasesItemRelationsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CaseManagementCasesItemRelationsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewCaseManagementCasesItemRelationsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +// returns a *int32 when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *CaseManagementCasesItemRelationsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *CaseManagementCasesItemRelationsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": 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 +// returns a *RequestInformation when successful +func (m *CaseManagementCasesItemRelationsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *CaseManagementCasesItemRelationsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *CaseManagementCasesItemRelationsCountRequestBuilder when successful +func (m *CaseManagementCasesItemRelationsCountRequestBuilder) WithUrl(rawUrl string)(*CaseManagementCasesItemRelationsCountRequestBuilder) { + return NewCaseManagementCasesItemRelationsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/security/case_management_cases_item_relations_relation_item_request_builder.go b/security/case_management_cases_item_relations_relation_item_request_builder.go new file mode 100644 index 00000000000..0d1f93e16df --- /dev/null +++ b/security/case_management_cases_item_relations_relation_item_request_builder.go @@ -0,0 +1,163 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package security + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" + i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/security/casemanagement" +) + +// CaseManagementCasesItemRelationsRelationItemRequestBuilder provides operations to manage the relations property of the microsoft.graph.security.caseManagement.case entity. +type CaseManagementCasesItemRelationsRelationItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// CaseManagementCasesItemRelationsRelationItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CaseManagementCasesItemRelationsRelationItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// CaseManagementCasesItemRelationsRelationItemRequestBuilderGetQueryParameters links from the case to related security resources. Supports $expand. +type CaseManagementCasesItemRelationsRelationItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string "uriparametername:\"%24expand\"" + // Select properties to be returned + Select []string "uriparametername:\"%24select\"" +} +// CaseManagementCasesItemRelationsRelationItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CaseManagementCasesItemRelationsRelationItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *CaseManagementCasesItemRelationsRelationItemRequestBuilderGetQueryParameters +} +// CaseManagementCasesItemRelationsRelationItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CaseManagementCasesItemRelationsRelationItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewCaseManagementCasesItemRelationsRelationItemRequestBuilderInternal instantiates a new CaseManagementCasesItemRelationsRelationItemRequestBuilder and sets the default values. +func NewCaseManagementCasesItemRelationsRelationItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CaseManagementCasesItemRelationsRelationItemRequestBuilder) { + m := &CaseManagementCasesItemRelationsRelationItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/security/caseManagement/cases/{case%2Did}/relations/{relation%2Did}{?%24expand,%24select}", pathParameters), + } + return m +} +// NewCaseManagementCasesItemRelationsRelationItemRequestBuilder instantiates a new CaseManagementCasesItemRelationsRelationItemRequestBuilder and sets the default values. +func NewCaseManagementCasesItemRelationsRelationItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CaseManagementCasesItemRelationsRelationItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewCaseManagementCasesItemRelationsRelationItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property relations for security +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *CaseManagementCasesItemRelationsRelationItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *CaseManagementCasesItemRelationsRelationItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get links from the case to related security resources. Supports $expand. +// returns a Relationable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *CaseManagementCasesItemRelationsRelationItemRequestBuilder) Get(ctx context.Context, requestConfiguration *CaseManagementCasesItemRelationsRelationItemRequestBuilderGetRequestConfiguration)(i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.Relationable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.CreateRelationFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.Relationable), nil +} +// Patch update the properties of a relation object. +// returns a Relationable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/security-casemanagement-relation-update?view=graph-rest-beta +func (m *CaseManagementCasesItemRelationsRelationItemRequestBuilder) Patch(ctx context.Context, body i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.Relationable, requestConfiguration *CaseManagementCasesItemRelationsRelationItemRequestBuilderPatchRequestConfiguration)(i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.Relationable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.CreateRelationFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.Relationable), nil +} +// ToDeleteRequestInformation delete navigation property relations for security +// returns a *RequestInformation when successful +func (m *CaseManagementCasesItemRelationsRelationItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *CaseManagementCasesItemRelationsRelationItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation links from the case to related security resources. Supports $expand. +// returns a *RequestInformation when successful +func (m *CaseManagementCasesItemRelationsRelationItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *CaseManagementCasesItemRelationsRelationItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation update the properties of a relation object. +// returns a *RequestInformation when successful +func (m *CaseManagementCasesItemRelationsRelationItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.Relationable, requestConfiguration *CaseManagementCasesItemRelationsRelationItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *CaseManagementCasesItemRelationsRelationItemRequestBuilder when successful +func (m *CaseManagementCasesItemRelationsRelationItemRequestBuilder) WithUrl(rawUrl string)(*CaseManagementCasesItemRelationsRelationItemRequestBuilder) { + return NewCaseManagementCasesItemRelationsRelationItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/security/case_management_cases_item_relations_request_builder.go b/security/case_management_cases_item_relations_request_builder.go new file mode 100644 index 00000000000..2bf5fd79882 --- /dev/null +++ b/security/case_management_cases_item_relations_request_builder.go @@ -0,0 +1,161 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package security + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" + i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/security/casemanagement" +) + +// CaseManagementCasesItemRelationsRequestBuilder provides operations to manage the relations property of the microsoft.graph.security.caseManagement.case entity. +type CaseManagementCasesItemRelationsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// CaseManagementCasesItemRelationsRequestBuilderGetQueryParameters get a list of external resource relation objects for a case. +type CaseManagementCasesItemRelationsRequestBuilderGetQueryParameters 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\"" +} +// CaseManagementCasesItemRelationsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CaseManagementCasesItemRelationsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *CaseManagementCasesItemRelationsRequestBuilderGetQueryParameters +} +// CaseManagementCasesItemRelationsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CaseManagementCasesItemRelationsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByRelationId provides operations to manage the relations property of the microsoft.graph.security.caseManagement.case entity. +// returns a *CaseManagementCasesItemRelationsRelationItemRequestBuilder when successful +func (m *CaseManagementCasesItemRelationsRequestBuilder) ByRelationId(relationId string)(*CaseManagementCasesItemRelationsRelationItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if relationId != "" { + urlTplParams["relation%2Did"] = relationId + } + return NewCaseManagementCasesItemRelationsRelationItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewCaseManagementCasesItemRelationsRequestBuilderInternal instantiates a new CaseManagementCasesItemRelationsRequestBuilder and sets the default values. +func NewCaseManagementCasesItemRelationsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CaseManagementCasesItemRelationsRequestBuilder) { + m := &CaseManagementCasesItemRelationsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/security/caseManagement/cases/{case%2Did}/relations{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters), + } + return m +} +// NewCaseManagementCasesItemRelationsRequestBuilder instantiates a new CaseManagementCasesItemRelationsRequestBuilder and sets the default values. +func NewCaseManagementCasesItemRelationsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CaseManagementCasesItemRelationsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewCaseManagementCasesItemRelationsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +// returns a *CaseManagementCasesItemRelationsCountRequestBuilder when successful +func (m *CaseManagementCasesItemRelationsRequestBuilder) Count()(*CaseManagementCasesItemRelationsCountRequestBuilder) { + return NewCaseManagementCasesItemRelationsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get get a list of external resource relation objects for a case. +// returns a RelationCollectionResponseable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/security-casemanagement-case-list-relations?view=graph-rest-beta +func (m *CaseManagementCasesItemRelationsRequestBuilder) Get(ctx context.Context, requestConfiguration *CaseManagementCasesItemRelationsRequestBuilderGetRequestConfiguration)(i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.RelationCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.CreateRelationCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.RelationCollectionResponseable), nil +} +// Post create an external resource relation for a case. +// returns a Relationable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/security-casemanagement-case-post-relations?view=graph-rest-beta +func (m *CaseManagementCasesItemRelationsRequestBuilder) Post(ctx context.Context, body i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.Relationable, requestConfiguration *CaseManagementCasesItemRelationsRequestBuilderPostRequestConfiguration)(i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.Relationable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.CreateRelationFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.Relationable), nil +} +// ToGetRequestInformation get a list of external resource relation objects for a case. +// returns a *RequestInformation when successful +func (m *CaseManagementCasesItemRelationsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *CaseManagementCasesItemRelationsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation create an external resource relation for a case. +// returns a *RequestInformation when successful +func (m *CaseManagementCasesItemRelationsRequestBuilder) ToPostRequestInformation(ctx context.Context, body i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.Relationable, requestConfiguration *CaseManagementCasesItemRelationsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *CaseManagementCasesItemRelationsRequestBuilder when successful +func (m *CaseManagementCasesItemRelationsRequestBuilder) WithUrl(rawUrl string)(*CaseManagementCasesItemRelationsRequestBuilder) { + return NewCaseManagementCasesItemRelationsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/security/case_management_cases_item_tasks_count_request_builder.go b/security/case_management_cases_item_tasks_count_request_builder.go new file mode 100644 index 00000000000..c5edda1c9f6 --- /dev/null +++ b/security/case_management_cases_item_tasks_count_request_builder.go @@ -0,0 +1,83 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package security + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// CaseManagementCasesItemTasksCountRequestBuilder provides operations to count the resources in the collection. +type CaseManagementCasesItemTasksCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// CaseManagementCasesItemTasksCountRequestBuilderGetQueryParameters get the number of the resource +type CaseManagementCasesItemTasksCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string "uriparametername:\"%24filter\"" + // Search items by search phrases + Search *string "uriparametername:\"%24search\"" +} +// CaseManagementCasesItemTasksCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CaseManagementCasesItemTasksCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *CaseManagementCasesItemTasksCountRequestBuilderGetQueryParameters +} +// NewCaseManagementCasesItemTasksCountRequestBuilderInternal instantiates a new CaseManagementCasesItemTasksCountRequestBuilder and sets the default values. +func NewCaseManagementCasesItemTasksCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CaseManagementCasesItemTasksCountRequestBuilder) { + m := &CaseManagementCasesItemTasksCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/security/caseManagement/cases/{case%2Did}/tasks/$count{?%24filter,%24search}", pathParameters), + } + return m +} +// NewCaseManagementCasesItemTasksCountRequestBuilder instantiates a new CaseManagementCasesItemTasksCountRequestBuilder and sets the default values. +func NewCaseManagementCasesItemTasksCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CaseManagementCasesItemTasksCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewCaseManagementCasesItemTasksCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +// returns a *int32 when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *CaseManagementCasesItemTasksCountRequestBuilder) Get(ctx context.Context, requestConfiguration *CaseManagementCasesItemTasksCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": 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 +// returns a *RequestInformation when successful +func (m *CaseManagementCasesItemTasksCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *CaseManagementCasesItemTasksCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *CaseManagementCasesItemTasksCountRequestBuilder when successful +func (m *CaseManagementCasesItemTasksCountRequestBuilder) WithUrl(rawUrl string)(*CaseManagementCasesItemTasksCountRequestBuilder) { + return NewCaseManagementCasesItemTasksCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/security/case_management_cases_item_tasks_request_builder.go b/security/case_management_cases_item_tasks_request_builder.go new file mode 100644 index 00000000000..b5f405e1728 --- /dev/null +++ b/security/case_management_cases_item_tasks_request_builder.go @@ -0,0 +1,161 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package security + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" + i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/security/casemanagement" +) + +// CaseManagementCasesItemTasksRequestBuilder provides operations to manage the tasks property of the microsoft.graph.security.caseManagement.case entity. +type CaseManagementCasesItemTasksRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// CaseManagementCasesItemTasksRequestBuilderGetQueryParameters get a list of task objects for a case. +type CaseManagementCasesItemTasksRequestBuilderGetQueryParameters 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\"" +} +// CaseManagementCasesItemTasksRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CaseManagementCasesItemTasksRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *CaseManagementCasesItemTasksRequestBuilderGetQueryParameters +} +// CaseManagementCasesItemTasksRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CaseManagementCasesItemTasksRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByTaskId provides operations to manage the tasks property of the microsoft.graph.security.caseManagement.case entity. +// returns a *CaseManagementCasesItemTasksTaskItemRequestBuilder when successful +func (m *CaseManagementCasesItemTasksRequestBuilder) ByTaskId(taskId string)(*CaseManagementCasesItemTasksTaskItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if taskId != "" { + urlTplParams["task%2Did"] = taskId + } + return NewCaseManagementCasesItemTasksTaskItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewCaseManagementCasesItemTasksRequestBuilderInternal instantiates a new CaseManagementCasesItemTasksRequestBuilder and sets the default values. +func NewCaseManagementCasesItemTasksRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CaseManagementCasesItemTasksRequestBuilder) { + m := &CaseManagementCasesItemTasksRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/security/caseManagement/cases/{case%2Did}/tasks{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters), + } + return m +} +// NewCaseManagementCasesItemTasksRequestBuilder instantiates a new CaseManagementCasesItemTasksRequestBuilder and sets the default values. +func NewCaseManagementCasesItemTasksRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CaseManagementCasesItemTasksRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewCaseManagementCasesItemTasksRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +// returns a *CaseManagementCasesItemTasksCountRequestBuilder when successful +func (m *CaseManagementCasesItemTasksRequestBuilder) Count()(*CaseManagementCasesItemTasksCountRequestBuilder) { + return NewCaseManagementCasesItemTasksCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get get a list of task objects for a case. +// returns a TaskCollectionResponseable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/security-casemanagement-case-list-tasks?view=graph-rest-beta +func (m *CaseManagementCasesItemTasksRequestBuilder) Get(ctx context.Context, requestConfiguration *CaseManagementCasesItemTasksRequestBuilderGetRequestConfiguration)(i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.TaskCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.CreateTaskCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.TaskCollectionResponseable), nil +} +// Post create a task for a case. +// returns a Taskable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/security-casemanagement-case-post-tasks?view=graph-rest-beta +func (m *CaseManagementCasesItemTasksRequestBuilder) Post(ctx context.Context, body i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.Taskable, requestConfiguration *CaseManagementCasesItemTasksRequestBuilderPostRequestConfiguration)(i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.Taskable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.CreateTaskFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.Taskable), nil +} +// ToGetRequestInformation get a list of task objects for a case. +// returns a *RequestInformation when successful +func (m *CaseManagementCasesItemTasksRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *CaseManagementCasesItemTasksRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation create a task for a case. +// returns a *RequestInformation when successful +func (m *CaseManagementCasesItemTasksRequestBuilder) ToPostRequestInformation(ctx context.Context, body i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.Taskable, requestConfiguration *CaseManagementCasesItemTasksRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *CaseManagementCasesItemTasksRequestBuilder when successful +func (m *CaseManagementCasesItemTasksRequestBuilder) WithUrl(rawUrl string)(*CaseManagementCasesItemTasksRequestBuilder) { + return NewCaseManagementCasesItemTasksRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/security/case_management_cases_item_tasks_task_item_request_builder.go b/security/case_management_cases_item_tasks_task_item_request_builder.go new file mode 100644 index 00000000000..5ec0f309c60 --- /dev/null +++ b/security/case_management_cases_item_tasks_task_item_request_builder.go @@ -0,0 +1,166 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package security + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" + i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/security/casemanagement" +) + +// CaseManagementCasesItemTasksTaskItemRequestBuilder provides operations to manage the tasks property of the microsoft.graph.security.caseManagement.case entity. +type CaseManagementCasesItemTasksTaskItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// CaseManagementCasesItemTasksTaskItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CaseManagementCasesItemTasksTaskItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// CaseManagementCasesItemTasksTaskItemRequestBuilderGetQueryParameters read the properties and relationships of a task object. +type CaseManagementCasesItemTasksTaskItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string "uriparametername:\"%24expand\"" + // Select properties to be returned + Select []string "uriparametername:\"%24select\"" +} +// CaseManagementCasesItemTasksTaskItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CaseManagementCasesItemTasksTaskItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *CaseManagementCasesItemTasksTaskItemRequestBuilderGetQueryParameters +} +// CaseManagementCasesItemTasksTaskItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CaseManagementCasesItemTasksTaskItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewCaseManagementCasesItemTasksTaskItemRequestBuilderInternal instantiates a new CaseManagementCasesItemTasksTaskItemRequestBuilder and sets the default values. +func NewCaseManagementCasesItemTasksTaskItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CaseManagementCasesItemTasksTaskItemRequestBuilder) { + m := &CaseManagementCasesItemTasksTaskItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/security/caseManagement/cases/{case%2Did}/tasks/{task%2Did}{?%24expand,%24select}", pathParameters), + } + return m +} +// NewCaseManagementCasesItemTasksTaskItemRequestBuilder instantiates a new CaseManagementCasesItemTasksTaskItemRequestBuilder and sets the default values. +func NewCaseManagementCasesItemTasksTaskItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CaseManagementCasesItemTasksTaskItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewCaseManagementCasesItemTasksTaskItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property tasks for security +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *CaseManagementCasesItemTasksTaskItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *CaseManagementCasesItemTasksTaskItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get read the properties and relationships of a task object. +// returns a Taskable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/security-casemanagement-task-get?view=graph-rest-beta +func (m *CaseManagementCasesItemTasksTaskItemRequestBuilder) Get(ctx context.Context, requestConfiguration *CaseManagementCasesItemTasksTaskItemRequestBuilderGetRequestConfiguration)(i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.Taskable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.CreateTaskFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.Taskable), nil +} +// Patch update the properties of a task object. +// returns a Taskable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/security-casemanagement-task-update?view=graph-rest-beta +func (m *CaseManagementCasesItemTasksTaskItemRequestBuilder) Patch(ctx context.Context, body i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.Taskable, requestConfiguration *CaseManagementCasesItemTasksTaskItemRequestBuilderPatchRequestConfiguration)(i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.Taskable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.CreateTaskFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.Taskable), nil +} +// ToDeleteRequestInformation delete navigation property tasks for security +// returns a *RequestInformation when successful +func (m *CaseManagementCasesItemTasksTaskItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *CaseManagementCasesItemTasksTaskItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation read the properties and relationships of a task object. +// returns a *RequestInformation when successful +func (m *CaseManagementCasesItemTasksTaskItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *CaseManagementCasesItemTasksTaskItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation update the properties of a task object. +// returns a *RequestInformation when successful +func (m *CaseManagementCasesItemTasksTaskItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.Taskable, requestConfiguration *CaseManagementCasesItemTasksTaskItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *CaseManagementCasesItemTasksTaskItemRequestBuilder when successful +func (m *CaseManagementCasesItemTasksTaskItemRequestBuilder) WithUrl(rawUrl string)(*CaseManagementCasesItemTasksTaskItemRequestBuilder) { + return NewCaseManagementCasesItemTasksTaskItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/security/case_management_cases_request_builder.go b/security/case_management_cases_request_builder.go new file mode 100644 index 00000000000..68e0147ba69 --- /dev/null +++ b/security/case_management_cases_request_builder.go @@ -0,0 +1,161 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package security + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" + i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/security/casemanagement" +) + +// CaseManagementCasesRequestBuilder provides operations to manage the cases property of the microsoft.graph.security.caseManagementRoot entity. +type CaseManagementCasesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// CaseManagementCasesRequestBuilderGetQueryParameters get a list of the case objects and their properties. +type CaseManagementCasesRequestBuilderGetQueryParameters 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\"" +} +// CaseManagementCasesRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CaseManagementCasesRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *CaseManagementCasesRequestBuilderGetQueryParameters +} +// CaseManagementCasesRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CaseManagementCasesRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByCaseId provides operations to manage the cases property of the microsoft.graph.security.caseManagementRoot entity. +// returns a *CaseManagementCasesCaseItemRequestBuilder when successful +func (m *CaseManagementCasesRequestBuilder) ByCaseId(caseId string)(*CaseManagementCasesCaseItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if caseId != "" { + urlTplParams["case%2Did"] = caseId + } + return NewCaseManagementCasesCaseItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewCaseManagementCasesRequestBuilderInternal instantiates a new CaseManagementCasesRequestBuilder and sets the default values. +func NewCaseManagementCasesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CaseManagementCasesRequestBuilder) { + m := &CaseManagementCasesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/security/caseManagement/cases{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters), + } + return m +} +// NewCaseManagementCasesRequestBuilder instantiates a new CaseManagementCasesRequestBuilder and sets the default values. +func NewCaseManagementCasesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CaseManagementCasesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewCaseManagementCasesRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +// returns a *CaseManagementCasesCountRequestBuilder when successful +func (m *CaseManagementCasesRequestBuilder) Count()(*CaseManagementCasesCountRequestBuilder) { + return NewCaseManagementCasesCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get get a list of the case objects and their properties. +// returns a CaseCollectionResponseable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/security-casemanagementroot-list-cases?view=graph-rest-beta +func (m *CaseManagementCasesRequestBuilder) Get(ctx context.Context, requestConfiguration *CaseManagementCasesRequestBuilderGetRequestConfiguration)(i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.CaseCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.CreateCaseCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.CaseCollectionResponseable), nil +} +// Post create a case object in case management. +// returns a CaseEscapedable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/security-casemanagementroot-post-cases?view=graph-rest-beta +func (m *CaseManagementCasesRequestBuilder) Post(ctx context.Context, body i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.CaseEscapedable, requestConfiguration *CaseManagementCasesRequestBuilderPostRequestConfiguration)(i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.CaseEscapedable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.CreateCaseEscapedFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.CaseEscapedable), nil +} +// ToGetRequestInformation get a list of the case objects and their properties. +// returns a *RequestInformation when successful +func (m *CaseManagementCasesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *CaseManagementCasesRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation create a case object in case management. +// returns a *RequestInformation when successful +func (m *CaseManagementCasesRequestBuilder) ToPostRequestInformation(ctx context.Context, body i750b9d71a9bf5f6c4275c76749e837bdafc4c29fba400a35892bce5f6331b4f9.CaseEscapedable, requestConfiguration *CaseManagementCasesRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *CaseManagementCasesRequestBuilder when successful +func (m *CaseManagementCasesRequestBuilder) WithUrl(rawUrl string)(*CaseManagementCasesRequestBuilder) { + return NewCaseManagementCasesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/security/case_management_request_builder.go b/security/case_management_request_builder.go new file mode 100644 index 00000000000..6583093a53b --- /dev/null +++ b/security/case_management_request_builder.go @@ -0,0 +1,165 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package security + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i084fa7ab3bba802bf5cc3b408e230cc64c167a57976e0d42c37e17154afd5b78 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/security" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// CaseManagementRequestBuilder provides operations to manage the caseManagement property of the microsoft.graph.security entity. +type CaseManagementRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// CaseManagementRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CaseManagementRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// CaseManagementRequestBuilderGetQueryParameters the entry point for security case management APIs, including cases, tasks, activities, relations, and attachments. +type CaseManagementRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string "uriparametername:\"%24expand\"" + // Select properties to be returned + Select []string "uriparametername:\"%24select\"" +} +// CaseManagementRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CaseManagementRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *CaseManagementRequestBuilderGetQueryParameters +} +// CaseManagementRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CaseManagementRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// Cases provides operations to manage the cases property of the microsoft.graph.security.caseManagementRoot entity. +// returns a *CaseManagementCasesRequestBuilder when successful +func (m *CaseManagementRequestBuilder) Cases()(*CaseManagementCasesRequestBuilder) { + return NewCaseManagementCasesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewCaseManagementRequestBuilderInternal instantiates a new CaseManagementRequestBuilder and sets the default values. +func NewCaseManagementRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CaseManagementRequestBuilder) { + m := &CaseManagementRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/security/caseManagement{?%24expand,%24select}", pathParameters), + } + return m +} +// NewCaseManagementRequestBuilder instantiates a new CaseManagementRequestBuilder and sets the default values. +func NewCaseManagementRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CaseManagementRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewCaseManagementRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property caseManagement for security +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *CaseManagementRequestBuilder) Delete(ctx context.Context, requestConfiguration *CaseManagementRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get the entry point for security case management APIs, including cases, tasks, activities, relations, and attachments. +// returns a CaseManagementRootable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *CaseManagementRequestBuilder) Get(ctx context.Context, requestConfiguration *CaseManagementRequestBuilderGetRequestConfiguration)(i084fa7ab3bba802bf5cc3b408e230cc64c167a57976e0d42c37e17154afd5b78.CaseManagementRootable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i084fa7ab3bba802bf5cc3b408e230cc64c167a57976e0d42c37e17154afd5b78.CreateCaseManagementRootFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i084fa7ab3bba802bf5cc3b408e230cc64c167a57976e0d42c37e17154afd5b78.CaseManagementRootable), nil +} +// Patch update the navigation property caseManagement in security +// returns a CaseManagementRootable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *CaseManagementRequestBuilder) Patch(ctx context.Context, body i084fa7ab3bba802bf5cc3b408e230cc64c167a57976e0d42c37e17154afd5b78.CaseManagementRootable, requestConfiguration *CaseManagementRequestBuilderPatchRequestConfiguration)(i084fa7ab3bba802bf5cc3b408e230cc64c167a57976e0d42c37e17154afd5b78.CaseManagementRootable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i084fa7ab3bba802bf5cc3b408e230cc64c167a57976e0d42c37e17154afd5b78.CreateCaseManagementRootFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i084fa7ab3bba802bf5cc3b408e230cc64c167a57976e0d42c37e17154afd5b78.CaseManagementRootable), nil +} +// ToDeleteRequestInformation delete navigation property caseManagement for security +// returns a *RequestInformation when successful +func (m *CaseManagementRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *CaseManagementRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation the entry point for security case management APIs, including cases, tasks, activities, relations, and attachments. +// returns a *RequestInformation when successful +func (m *CaseManagementRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *CaseManagementRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation update the navigation property caseManagement in security +// returns a *RequestInformation when successful +func (m *CaseManagementRequestBuilder) ToPatchRequestInformation(ctx context.Context, body i084fa7ab3bba802bf5cc3b408e230cc64c167a57976e0d42c37e17154afd5b78.CaseManagementRootable, requestConfiguration *CaseManagementRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *CaseManagementRequestBuilder when successful +func (m *CaseManagementRequestBuilder) WithUrl(rawUrl string)(*CaseManagementRequestBuilder) { + return NewCaseManagementRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/security/cases_ediscovery_cases_item_legal_holds_ediscovery_hold_policy_item_request_builder.go b/security/cases_ediscovery_cases_item_legal_holds_ediscovery_hold_policy_item_request_builder.go index 23ffd867c13..a457bfaddac 100644 --- a/security/cases_ediscovery_cases_item_legal_holds_ediscovery_hold_policy_item_request_builder.go +++ b/security/cases_ediscovery_cases_item_legal_holds_ediscovery_hold_policy_item_request_builder.go @@ -93,6 +93,16 @@ func (m *CasesEdiscoveryCasesItemLegalHoldsEdiscoveryHoldPolicyItemRequestBuilde } return res.(i084fa7ab3bba802bf5cc3b408e230cc64c167a57976e0d42c37e17154afd5b78.EdiscoveryHoldPolicyable), nil } +// MicrosoftGraphSecurityDisablePolicy provides operations to call the disablePolicy method. +// returns a *CasesEdiscoveryCasesItemLegalHoldsItemMicrosoftGraphSecurityDisablePolicyRequestBuilder when successful +func (m *CasesEdiscoveryCasesItemLegalHoldsEdiscoveryHoldPolicyItemRequestBuilder) MicrosoftGraphSecurityDisablePolicy()(*CasesEdiscoveryCasesItemLegalHoldsItemMicrosoftGraphSecurityDisablePolicyRequestBuilder) { + return NewCasesEdiscoveryCasesItemLegalHoldsItemMicrosoftGraphSecurityDisablePolicyRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// MicrosoftGraphSecurityEnablePolicy provides operations to call the enablePolicy method. +// returns a *CasesEdiscoveryCasesItemLegalHoldsItemMicrosoftGraphSecurityEnablePolicyRequestBuilder when successful +func (m *CasesEdiscoveryCasesItemLegalHoldsEdiscoveryHoldPolicyItemRequestBuilder) MicrosoftGraphSecurityEnablePolicy()(*CasesEdiscoveryCasesItemLegalHoldsItemMicrosoftGraphSecurityEnablePolicyRequestBuilder) { + return NewCasesEdiscoveryCasesItemLegalHoldsItemMicrosoftGraphSecurityEnablePolicyRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // MicrosoftGraphSecurityRetryPolicy provides operations to call the retryPolicy method. // returns a *CasesEdiscoveryCasesItemLegalHoldsItemMicrosoftGraphSecurityRetryPolicyRequestBuilder when successful func (m *CasesEdiscoveryCasesItemLegalHoldsEdiscoveryHoldPolicyItemRequestBuilder) MicrosoftGraphSecurityRetryPolicy()(*CasesEdiscoveryCasesItemLegalHoldsItemMicrosoftGraphSecurityRetryPolicyRequestBuilder) { diff --git a/security/cases_ediscovery_cases_item_legal_holds_item_microsoft_graph_security_disable_policy_request_builder.go b/security/cases_ediscovery_cases_item_legal_holds_item_microsoft_graph_security_disable_policy_request_builder.go new file mode 100644 index 00000000000..f2108868ee1 --- /dev/null +++ b/security/cases_ediscovery_cases_item_legal_holds_item_microsoft_graph_security_disable_policy_request_builder.go @@ -0,0 +1,67 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package security + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// CasesEdiscoveryCasesItemLegalHoldsItemMicrosoftGraphSecurityDisablePolicyRequestBuilder provides operations to call the disablePolicy method. +type CasesEdiscoveryCasesItemLegalHoldsItemMicrosoftGraphSecurityDisablePolicyRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// CasesEdiscoveryCasesItemLegalHoldsItemMicrosoftGraphSecurityDisablePolicyRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CasesEdiscoveryCasesItemLegalHoldsItemMicrosoftGraphSecurityDisablePolicyRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewCasesEdiscoveryCasesItemLegalHoldsItemMicrosoftGraphSecurityDisablePolicyRequestBuilderInternal instantiates a new CasesEdiscoveryCasesItemLegalHoldsItemMicrosoftGraphSecurityDisablePolicyRequestBuilder and sets the default values. +func NewCasesEdiscoveryCasesItemLegalHoldsItemMicrosoftGraphSecurityDisablePolicyRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CasesEdiscoveryCasesItemLegalHoldsItemMicrosoftGraphSecurityDisablePolicyRequestBuilder) { + m := &CasesEdiscoveryCasesItemLegalHoldsItemMicrosoftGraphSecurityDisablePolicyRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/legalHolds/{ediscoveryHoldPolicy%2Did}/microsoft.graph.security.disablePolicy", pathParameters), + } + return m +} +// NewCasesEdiscoveryCasesItemLegalHoldsItemMicrosoftGraphSecurityDisablePolicyRequestBuilder instantiates a new CasesEdiscoveryCasesItemLegalHoldsItemMicrosoftGraphSecurityDisablePolicyRequestBuilder and sets the default values. +func NewCasesEdiscoveryCasesItemLegalHoldsItemMicrosoftGraphSecurityDisablePolicyRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CasesEdiscoveryCasesItemLegalHoldsItemMicrosoftGraphSecurityDisablePolicyRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewCasesEdiscoveryCasesItemLegalHoldsItemMicrosoftGraphSecurityDisablePolicyRequestBuilderInternal(urlParams, requestAdapter) +} +// Post invoke action disablePolicy +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *CasesEdiscoveryCasesItemLegalHoldsItemMicrosoftGraphSecurityDisablePolicyRequestBuilder) Post(ctx context.Context, requestConfiguration *CasesEdiscoveryCasesItemLegalHoldsItemMicrosoftGraphSecurityDisablePolicyRequestBuilderPostRequestConfiguration)(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation invoke action disablePolicy +// returns a *RequestInformation when successful +func (m *CasesEdiscoveryCasesItemLegalHoldsItemMicrosoftGraphSecurityDisablePolicyRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *CasesEdiscoveryCasesItemLegalHoldsItemMicrosoftGraphSecurityDisablePolicyRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *CasesEdiscoveryCasesItemLegalHoldsItemMicrosoftGraphSecurityDisablePolicyRequestBuilder when successful +func (m *CasesEdiscoveryCasesItemLegalHoldsItemMicrosoftGraphSecurityDisablePolicyRequestBuilder) WithUrl(rawUrl string)(*CasesEdiscoveryCasesItemLegalHoldsItemMicrosoftGraphSecurityDisablePolicyRequestBuilder) { + return NewCasesEdiscoveryCasesItemLegalHoldsItemMicrosoftGraphSecurityDisablePolicyRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/security/cases_ediscovery_cases_item_legal_holds_item_microsoft_graph_security_enable_policy_request_builder.go b/security/cases_ediscovery_cases_item_legal_holds_item_microsoft_graph_security_enable_policy_request_builder.go new file mode 100644 index 00000000000..f17e4579b71 --- /dev/null +++ b/security/cases_ediscovery_cases_item_legal_holds_item_microsoft_graph_security_enable_policy_request_builder.go @@ -0,0 +1,67 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package security + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// CasesEdiscoveryCasesItemLegalHoldsItemMicrosoftGraphSecurityEnablePolicyRequestBuilder provides operations to call the enablePolicy method. +type CasesEdiscoveryCasesItemLegalHoldsItemMicrosoftGraphSecurityEnablePolicyRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// CasesEdiscoveryCasesItemLegalHoldsItemMicrosoftGraphSecurityEnablePolicyRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CasesEdiscoveryCasesItemLegalHoldsItemMicrosoftGraphSecurityEnablePolicyRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewCasesEdiscoveryCasesItemLegalHoldsItemMicrosoftGraphSecurityEnablePolicyRequestBuilderInternal instantiates a new CasesEdiscoveryCasesItemLegalHoldsItemMicrosoftGraphSecurityEnablePolicyRequestBuilder and sets the default values. +func NewCasesEdiscoveryCasesItemLegalHoldsItemMicrosoftGraphSecurityEnablePolicyRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CasesEdiscoveryCasesItemLegalHoldsItemMicrosoftGraphSecurityEnablePolicyRequestBuilder) { + m := &CasesEdiscoveryCasesItemLegalHoldsItemMicrosoftGraphSecurityEnablePolicyRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/security/cases/ediscoveryCases/{ediscoveryCase%2Did}/legalHolds/{ediscoveryHoldPolicy%2Did}/microsoft.graph.security.enablePolicy", pathParameters), + } + return m +} +// NewCasesEdiscoveryCasesItemLegalHoldsItemMicrosoftGraphSecurityEnablePolicyRequestBuilder instantiates a new CasesEdiscoveryCasesItemLegalHoldsItemMicrosoftGraphSecurityEnablePolicyRequestBuilder and sets the default values. +func NewCasesEdiscoveryCasesItemLegalHoldsItemMicrosoftGraphSecurityEnablePolicyRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CasesEdiscoveryCasesItemLegalHoldsItemMicrosoftGraphSecurityEnablePolicyRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewCasesEdiscoveryCasesItemLegalHoldsItemMicrosoftGraphSecurityEnablePolicyRequestBuilderInternal(urlParams, requestAdapter) +} +// Post invoke action enablePolicy +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *CasesEdiscoveryCasesItemLegalHoldsItemMicrosoftGraphSecurityEnablePolicyRequestBuilder) Post(ctx context.Context, requestConfiguration *CasesEdiscoveryCasesItemLegalHoldsItemMicrosoftGraphSecurityEnablePolicyRequestBuilderPostRequestConfiguration)(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation invoke action enablePolicy +// returns a *RequestInformation when successful +func (m *CasesEdiscoveryCasesItemLegalHoldsItemMicrosoftGraphSecurityEnablePolicyRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *CasesEdiscoveryCasesItemLegalHoldsItemMicrosoftGraphSecurityEnablePolicyRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *CasesEdiscoveryCasesItemLegalHoldsItemMicrosoftGraphSecurityEnablePolicyRequestBuilder when successful +func (m *CasesEdiscoveryCasesItemLegalHoldsItemMicrosoftGraphSecurityEnablePolicyRequestBuilder) WithUrl(rawUrl string)(*CasesEdiscoveryCasesItemLegalHoldsItemMicrosoftGraphSecurityEnablePolicyRequestBuilder) { + return NewCasesEdiscoveryCasesItemLegalHoldsItemMicrosoftGraphSecurityEnablePolicyRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/security/security_request_builder.go b/security/security_request_builder.go index 3b7a8ff1be2..7885f77e6ee 100644 --- a/security/security_request_builder.go +++ b/security/security_request_builder.go @@ -57,6 +57,11 @@ func (m *SecurityRequestBuilder) AttackSimulation()(*AttackSimulationRequestBuil func (m *SecurityRequestBuilder) AuditLog()(*AuditLogRequestBuilder) { return NewAuditLogRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// CaseManagement provides operations to manage the caseManagement property of the microsoft.graph.security entity. +// returns a *CaseManagementRequestBuilder when successful +func (m *SecurityRequestBuilder) CaseManagement()(*CaseManagementRequestBuilder) { + return NewCaseManagementRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // Cases provides operations to manage the cases property of the microsoft.graph.security entity. // returns a *CasesRequestBuilder when successful func (m *SecurityRequestBuilder) Cases()(*CasesRequestBuilder) { diff --git a/storage/file_storage_containers_get_by_user_with_user_principal_name_get_response.go b/storage/file_storage_containers_get_by_user_with_user_principal_name_get_response.go new file mode 100644 index 00000000000..7141368dac9 --- /dev/null +++ b/storage/file_storage_containers_get_by_user_with_user_principal_name_get_response.go @@ -0,0 +1,92 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package storage + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" +) + +type FileStorageContainersGetByUserWithUserPrincipalNameGetResponse struct { + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BaseCollectionPaginationCountResponse +} +// NewFileStorageContainersGetByUserWithUserPrincipalNameGetResponse instantiates a new FileStorageContainersGetByUserWithUserPrincipalNameGetResponse and sets the default values. +func NewFileStorageContainersGetByUserWithUserPrincipalNameGetResponse()(*FileStorageContainersGetByUserWithUserPrincipalNameGetResponse) { + m := &FileStorageContainersGetByUserWithUserPrincipalNameGetResponse{ + BaseCollectionPaginationCountResponse: *ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateFileStorageContainersGetByUserWithUserPrincipalNameGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateFileStorageContainersGetByUserWithUserPrincipalNameGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFileStorageContainersGetByUserWithUserPrincipalNameGetResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *FileStorageContainersGetByUserWithUserPrincipalNameGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateFileStorageContainerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileStorageContainerable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileStorageContainerable) + } + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +// returns a []FileStorageContainerable when successful +func (m *FileStorageContainersGetByUserWithUserPrincipalNameGetResponse) GetValue()([]ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileStorageContainerable) { + val, err := m.GetBackingStore().Get("value") + if err != nil { + panic(err) + } + if val != nil { + return val.([]ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileStorageContainerable) + } + return nil +} +// Serialize serializes information the current object +func (m *FileStorageContainersGetByUserWithUserPrincipalNameGetResponse) 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 *FileStorageContainersGetByUserWithUserPrincipalNameGetResponse) SetValue(value []ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileStorageContainerable)() { + err := m.GetBackingStore().Set("value", value) + if err != nil { + panic(err) + } +} +type FileStorageContainersGetByUserWithUserPrincipalNameGetResponseable interface { + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileStorageContainerable) + SetValue(value []ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileStorageContainerable)() +} diff --git a/storage/file_storage_containers_get_by_user_with_user_principal_name_request_builder.go b/storage/file_storage_containers_get_by_user_with_user_principal_name_request_builder.go new file mode 100644 index 00000000000..de8c38f719a --- /dev/null +++ b/storage/file_storage_containers_get_by_user_with_user_principal_name_request_builder.go @@ -0,0 +1,125 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package storage + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// FileStorageContainersGetByUserWithUserPrincipalNameRequestBuilder provides operations to call the getByUser method. +type FileStorageContainersGetByUserWithUserPrincipalNameRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// FileStorageContainersGetByUserWithUserPrincipalNameRequestBuilderGetQueryParameters get a list of fileStorageContainer objects that are owned by a user (either as owner or as principalOwner). You can also filter the results to only list containers for which the user is the principalOwner. +type FileStorageContainersGetByUserWithUserPrincipalNameRequestBuilderGetQueryParameters 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\"" +} +// FileStorageContainersGetByUserWithUserPrincipalNameRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type FileStorageContainersGetByUserWithUserPrincipalNameRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *FileStorageContainersGetByUserWithUserPrincipalNameRequestBuilderGetQueryParameters +} +// NewFileStorageContainersGetByUserWithUserPrincipalNameRequestBuilderInternal instantiates a new FileStorageContainersGetByUserWithUserPrincipalNameRequestBuilder and sets the default values. +func NewFileStorageContainersGetByUserWithUserPrincipalNameRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter, userPrincipalName *string)(*FileStorageContainersGetByUserWithUserPrincipalNameRequestBuilder) { + m := &FileStorageContainersGetByUserWithUserPrincipalNameRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/storage/fileStorage/containers/getByUser(userPrincipalName='{userPrincipalName}'){?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters), + } + if userPrincipalName != nil { + m.BaseRequestBuilder.PathParameters["userPrincipalName"] = *userPrincipalName + } + return m +} +// NewFileStorageContainersGetByUserWithUserPrincipalNameRequestBuilder instantiates a new FileStorageContainersGetByUserWithUserPrincipalNameRequestBuilder and sets the default values. +func NewFileStorageContainersGetByUserWithUserPrincipalNameRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*FileStorageContainersGetByUserWithUserPrincipalNameRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewFileStorageContainersGetByUserWithUserPrincipalNameRequestBuilderInternal(urlParams, requestAdapter, nil) +} +// Get get a list of fileStorageContainer objects that are owned by a user (either as owner or as principalOwner). You can also filter the results to only list containers for which the user is the principalOwner. +// Deprecated: This method is obsolete. Use GetAsGetByUserWithUserPrincipalNameGetResponse instead. +// returns a FileStorageContainersGetByUserWithUserPrincipalNameResponseable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/filestoragecontainer-getbyuser?view=graph-rest-beta +func (m *FileStorageContainersGetByUserWithUserPrincipalNameRequestBuilder) Get(ctx context.Context, requestConfiguration *FileStorageContainersGetByUserWithUserPrincipalNameRequestBuilderGetRequestConfiguration)(FileStorageContainersGetByUserWithUserPrincipalNameResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateFileStorageContainersGetByUserWithUserPrincipalNameResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(FileStorageContainersGetByUserWithUserPrincipalNameResponseable), nil +} +// GetAsGetByUserWithUserPrincipalNameGetResponse get a list of fileStorageContainer objects that are owned by a user (either as owner or as principalOwner). You can also filter the results to only list containers for which the user is the principalOwner. +// returns a FileStorageContainersGetByUserWithUserPrincipalNameGetResponseable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/filestoragecontainer-getbyuser?view=graph-rest-beta +func (m *FileStorageContainersGetByUserWithUserPrincipalNameRequestBuilder) GetAsGetByUserWithUserPrincipalNameGetResponse(ctx context.Context, requestConfiguration *FileStorageContainersGetByUserWithUserPrincipalNameRequestBuilderGetRequestConfiguration)(FileStorageContainersGetByUserWithUserPrincipalNameGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateFileStorageContainersGetByUserWithUserPrincipalNameGetResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(FileStorageContainersGetByUserWithUserPrincipalNameGetResponseable), nil +} +// ToGetRequestInformation get a list of fileStorageContainer objects that are owned by a user (either as owner or as principalOwner). You can also filter the results to only list containers for which the user is the principalOwner. +// returns a *RequestInformation when successful +func (m *FileStorageContainersGetByUserWithUserPrincipalNameRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *FileStorageContainersGetByUserWithUserPrincipalNameRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *FileStorageContainersGetByUserWithUserPrincipalNameRequestBuilder when successful +func (m *FileStorageContainersGetByUserWithUserPrincipalNameRequestBuilder) WithUrl(rawUrl string)(*FileStorageContainersGetByUserWithUserPrincipalNameRequestBuilder) { + return NewFileStorageContainersGetByUserWithUserPrincipalNameRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/storage/file_storage_containers_get_by_user_with_user_principal_name_response.go b/storage/file_storage_containers_get_by_user_with_user_principal_name_response.go new file mode 100644 index 00000000000..f0d27fee42d --- /dev/null +++ b/storage/file_storage_containers_get_by_user_with_user_principal_name_response.go @@ -0,0 +1,30 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package storage + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Deprecated: This class is obsolete. Use FileStorageContainersGetByUserWithUserPrincipalNameGetResponseable instead. +type FileStorageContainersGetByUserWithUserPrincipalNameResponse struct { + FileStorageContainersGetByUserWithUserPrincipalNameGetResponse +} +// NewFileStorageContainersGetByUserWithUserPrincipalNameResponse instantiates a new FileStorageContainersGetByUserWithUserPrincipalNameResponse and sets the default values. +func NewFileStorageContainersGetByUserWithUserPrincipalNameResponse()(*FileStorageContainersGetByUserWithUserPrincipalNameResponse) { + m := &FileStorageContainersGetByUserWithUserPrincipalNameResponse{ + FileStorageContainersGetByUserWithUserPrincipalNameGetResponse: *NewFileStorageContainersGetByUserWithUserPrincipalNameGetResponse(), + } + return m +} +// CreateFileStorageContainersGetByUserWithUserPrincipalNameResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateFileStorageContainersGetByUserWithUserPrincipalNameResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFileStorageContainersGetByUserWithUserPrincipalNameResponse(), nil +} +// Deprecated: This class is obsolete. Use FileStorageContainersGetByUserWithUserPrincipalNameGetResponseable instead. +type FileStorageContainersGetByUserWithUserPrincipalNameResponseable interface { + FileStorageContainersGetByUserWithUserPrincipalNameGetResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/storage/file_storage_containers_get_by_user_with_user_principal_name_with_role_get_response.go b/storage/file_storage_containers_get_by_user_with_user_principal_name_with_role_get_response.go new file mode 100644 index 00000000000..dac8c5497d3 --- /dev/null +++ b/storage/file_storage_containers_get_by_user_with_user_principal_name_with_role_get_response.go @@ -0,0 +1,92 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package storage + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" +) + +type FileStorageContainersGetByUserWithUserPrincipalNameWithRoleGetResponse struct { + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BaseCollectionPaginationCountResponse +} +// NewFileStorageContainersGetByUserWithUserPrincipalNameWithRoleGetResponse instantiates a new FileStorageContainersGetByUserWithUserPrincipalNameWithRoleGetResponse and sets the default values. +func NewFileStorageContainersGetByUserWithUserPrincipalNameWithRoleGetResponse()(*FileStorageContainersGetByUserWithUserPrincipalNameWithRoleGetResponse) { + m := &FileStorageContainersGetByUserWithUserPrincipalNameWithRoleGetResponse{ + BaseCollectionPaginationCountResponse: *ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateFileStorageContainersGetByUserWithUserPrincipalNameWithRoleGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateFileStorageContainersGetByUserWithUserPrincipalNameWithRoleGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFileStorageContainersGetByUserWithUserPrincipalNameWithRoleGetResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *FileStorageContainersGetByUserWithUserPrincipalNameWithRoleGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateFileStorageContainerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileStorageContainerable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileStorageContainerable) + } + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +// returns a []FileStorageContainerable when successful +func (m *FileStorageContainersGetByUserWithUserPrincipalNameWithRoleGetResponse) GetValue()([]ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileStorageContainerable) { + val, err := m.GetBackingStore().Get("value") + if err != nil { + panic(err) + } + if val != nil { + return val.([]ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileStorageContainerable) + } + return nil +} +// Serialize serializes information the current object +func (m *FileStorageContainersGetByUserWithUserPrincipalNameWithRoleGetResponse) 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 *FileStorageContainersGetByUserWithUserPrincipalNameWithRoleGetResponse) SetValue(value []ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileStorageContainerable)() { + err := m.GetBackingStore().Set("value", value) + if err != nil { + panic(err) + } +} +type FileStorageContainersGetByUserWithUserPrincipalNameWithRoleGetResponseable interface { + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileStorageContainerable) + SetValue(value []ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileStorageContainerable)() +} diff --git a/storage/file_storage_containers_get_by_user_with_user_principal_name_with_role_request_builder.go b/storage/file_storage_containers_get_by_user_with_user_principal_name_with_role_request_builder.go new file mode 100644 index 00000000000..0e2c7397a34 --- /dev/null +++ b/storage/file_storage_containers_get_by_user_with_user_principal_name_with_role_request_builder.go @@ -0,0 +1,122 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package storage + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// FileStorageContainersGetByUserWithUserPrincipalNameWithRoleRequestBuilder provides operations to call the getByUser method. +type FileStorageContainersGetByUserWithUserPrincipalNameWithRoleRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// FileStorageContainersGetByUserWithUserPrincipalNameWithRoleRequestBuilderGetQueryParameters invoke function getByUser +type FileStorageContainersGetByUserWithUserPrincipalNameWithRoleRequestBuilderGetQueryParameters 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\"" +} +// FileStorageContainersGetByUserWithUserPrincipalNameWithRoleRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type FileStorageContainersGetByUserWithUserPrincipalNameWithRoleRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *FileStorageContainersGetByUserWithUserPrincipalNameWithRoleRequestBuilderGetQueryParameters +} +// NewFileStorageContainersGetByUserWithUserPrincipalNameWithRoleRequestBuilderInternal instantiates a new FileStorageContainersGetByUserWithUserPrincipalNameWithRoleRequestBuilder and sets the default values. +func NewFileStorageContainersGetByUserWithUserPrincipalNameWithRoleRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter, role *string, userPrincipalName *string)(*FileStorageContainersGetByUserWithUserPrincipalNameWithRoleRequestBuilder) { + m := &FileStorageContainersGetByUserWithUserPrincipalNameWithRoleRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/storage/fileStorage/containers/getByUser(userPrincipalName='{userPrincipalName}',role='{role}'){?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters), + } + if role != nil { + m.BaseRequestBuilder.PathParameters["role"] = *role + } + if userPrincipalName != nil { + m.BaseRequestBuilder.PathParameters["userPrincipalName"] = *userPrincipalName + } + return m +} +// NewFileStorageContainersGetByUserWithUserPrincipalNameWithRoleRequestBuilder instantiates a new FileStorageContainersGetByUserWithUserPrincipalNameWithRoleRequestBuilder and sets the default values. +func NewFileStorageContainersGetByUserWithUserPrincipalNameWithRoleRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*FileStorageContainersGetByUserWithUserPrincipalNameWithRoleRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewFileStorageContainersGetByUserWithUserPrincipalNameWithRoleRequestBuilderInternal(urlParams, requestAdapter, nil, nil) +} +// Get invoke function getByUser +// Deprecated: This method is obsolete. Use GetAsGetByUserWithUserPrincipalNameWithRoleGetResponse instead. +// returns a FileStorageContainersGetByUserWithUserPrincipalNameWithRoleResponseable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *FileStorageContainersGetByUserWithUserPrincipalNameWithRoleRequestBuilder) Get(ctx context.Context, requestConfiguration *FileStorageContainersGetByUserWithUserPrincipalNameWithRoleRequestBuilderGetRequestConfiguration)(FileStorageContainersGetByUserWithUserPrincipalNameWithRoleResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateFileStorageContainersGetByUserWithUserPrincipalNameWithRoleResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(FileStorageContainersGetByUserWithUserPrincipalNameWithRoleResponseable), nil +} +// GetAsGetByUserWithUserPrincipalNameWithRoleGetResponse invoke function getByUser +// returns a FileStorageContainersGetByUserWithUserPrincipalNameWithRoleGetResponseable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *FileStorageContainersGetByUserWithUserPrincipalNameWithRoleRequestBuilder) GetAsGetByUserWithUserPrincipalNameWithRoleGetResponse(ctx context.Context, requestConfiguration *FileStorageContainersGetByUserWithUserPrincipalNameWithRoleRequestBuilderGetRequestConfiguration)(FileStorageContainersGetByUserWithUserPrincipalNameWithRoleGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateFileStorageContainersGetByUserWithUserPrincipalNameWithRoleGetResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(FileStorageContainersGetByUserWithUserPrincipalNameWithRoleGetResponseable), nil +} +// ToGetRequestInformation invoke function getByUser +// returns a *RequestInformation when successful +func (m *FileStorageContainersGetByUserWithUserPrincipalNameWithRoleRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *FileStorageContainersGetByUserWithUserPrincipalNameWithRoleRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *FileStorageContainersGetByUserWithUserPrincipalNameWithRoleRequestBuilder when successful +func (m *FileStorageContainersGetByUserWithUserPrincipalNameWithRoleRequestBuilder) WithUrl(rawUrl string)(*FileStorageContainersGetByUserWithUserPrincipalNameWithRoleRequestBuilder) { + return NewFileStorageContainersGetByUserWithUserPrincipalNameWithRoleRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/storage/file_storage_containers_get_by_user_with_user_principal_name_with_role_response.go b/storage/file_storage_containers_get_by_user_with_user_principal_name_with_role_response.go new file mode 100644 index 00000000000..856cdf9228e --- /dev/null +++ b/storage/file_storage_containers_get_by_user_with_user_principal_name_with_role_response.go @@ -0,0 +1,30 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package storage + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Deprecated: This class is obsolete. Use FileStorageContainersGetByUserWithUserPrincipalNameWithRoleGetResponseable instead. +type FileStorageContainersGetByUserWithUserPrincipalNameWithRoleResponse struct { + FileStorageContainersGetByUserWithUserPrincipalNameWithRoleGetResponse +} +// NewFileStorageContainersGetByUserWithUserPrincipalNameWithRoleResponse instantiates a new FileStorageContainersGetByUserWithUserPrincipalNameWithRoleResponse and sets the default values. +func NewFileStorageContainersGetByUserWithUserPrincipalNameWithRoleResponse()(*FileStorageContainersGetByUserWithUserPrincipalNameWithRoleResponse) { + m := &FileStorageContainersGetByUserWithUserPrincipalNameWithRoleResponse{ + FileStorageContainersGetByUserWithUserPrincipalNameWithRoleGetResponse: *NewFileStorageContainersGetByUserWithUserPrincipalNameWithRoleGetResponse(), + } + return m +} +// CreateFileStorageContainersGetByUserWithUserPrincipalNameWithRoleResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateFileStorageContainersGetByUserWithUserPrincipalNameWithRoleResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFileStorageContainersGetByUserWithUserPrincipalNameWithRoleResponse(), nil +} +// Deprecated: This class is obsolete. Use FileStorageContainersGetByUserWithUserPrincipalNameWithRoleGetResponseable instead. +type FileStorageContainersGetByUserWithUserPrincipalNameWithRoleResponseable interface { + FileStorageContainersGetByUserWithUserPrincipalNameWithRoleGetResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/storage/file_storage_containers_request_builder.go b/storage/file_storage_containers_request_builder.go index d081d53cf09..12580f249ba 100644 --- a/storage/file_storage_containers_request_builder.go +++ b/storage/file_storage_containers_request_builder.go @@ -102,6 +102,16 @@ func (m *FileStorageContainersRequestBuilder) Get(ctx context.Context, requestCo } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileStorageContainerCollectionResponseable), nil } +// GetByUserWithUserPrincipalName provides operations to call the getByUser method. +// returns a *FileStorageContainersGetByUserWithUserPrincipalNameRequestBuilder when successful +func (m *FileStorageContainersRequestBuilder) GetByUserWithUserPrincipalName(userPrincipalName *string)(*FileStorageContainersGetByUserWithUserPrincipalNameRequestBuilder) { + return NewFileStorageContainersGetByUserWithUserPrincipalNameRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter, userPrincipalName) +} +// GetByUserWithUserPrincipalNameWithRole provides operations to call the getByUser method. +// returns a *FileStorageContainersGetByUserWithUserPrincipalNameWithRoleRequestBuilder when successful +func (m *FileStorageContainersRequestBuilder) GetByUserWithUserPrincipalNameWithRole(role *string, userPrincipalName *string)(*FileStorageContainersGetByUserWithUserPrincipalNameWithRoleRequestBuilder) { + return NewFileStorageContainersGetByUserWithUserPrincipalNameWithRoleRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter, role, userPrincipalName) +} // Post create a new fileStorageContainer object. The respective container type identified by containerTypeId must be enabled in the tenant. For delegated calls, the calling user is set as the owner of the fileStorageContainer. // returns a FileStorageContainerable when successful // returns a ODataError error when the service returns a 4XX or 5XX status code diff --git a/storage/file_storage_deleted_containers_get_by_user_with_user_principal_name_get_response.go b/storage/file_storage_deleted_containers_get_by_user_with_user_principal_name_get_response.go new file mode 100644 index 00000000000..6ec2baf3c92 --- /dev/null +++ b/storage/file_storage_deleted_containers_get_by_user_with_user_principal_name_get_response.go @@ -0,0 +1,92 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package storage + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" +) + +type FileStorageDeletedContainersGetByUserWithUserPrincipalNameGetResponse struct { + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BaseCollectionPaginationCountResponse +} +// NewFileStorageDeletedContainersGetByUserWithUserPrincipalNameGetResponse instantiates a new FileStorageDeletedContainersGetByUserWithUserPrincipalNameGetResponse and sets the default values. +func NewFileStorageDeletedContainersGetByUserWithUserPrincipalNameGetResponse()(*FileStorageDeletedContainersGetByUserWithUserPrincipalNameGetResponse) { + m := &FileStorageDeletedContainersGetByUserWithUserPrincipalNameGetResponse{ + BaseCollectionPaginationCountResponse: *ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateFileStorageDeletedContainersGetByUserWithUserPrincipalNameGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateFileStorageDeletedContainersGetByUserWithUserPrincipalNameGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFileStorageDeletedContainersGetByUserWithUserPrincipalNameGetResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *FileStorageDeletedContainersGetByUserWithUserPrincipalNameGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateFileStorageContainerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileStorageContainerable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileStorageContainerable) + } + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +// returns a []FileStorageContainerable when successful +func (m *FileStorageDeletedContainersGetByUserWithUserPrincipalNameGetResponse) GetValue()([]ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileStorageContainerable) { + val, err := m.GetBackingStore().Get("value") + if err != nil { + panic(err) + } + if val != nil { + return val.([]ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileStorageContainerable) + } + return nil +} +// Serialize serializes information the current object +func (m *FileStorageDeletedContainersGetByUserWithUserPrincipalNameGetResponse) 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 *FileStorageDeletedContainersGetByUserWithUserPrincipalNameGetResponse) SetValue(value []ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileStorageContainerable)() { + err := m.GetBackingStore().Set("value", value) + if err != nil { + panic(err) + } +} +type FileStorageDeletedContainersGetByUserWithUserPrincipalNameGetResponseable interface { + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileStorageContainerable) + SetValue(value []ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileStorageContainerable)() +} diff --git a/storage/file_storage_deleted_containers_get_by_user_with_user_principal_name_request_builder.go b/storage/file_storage_deleted_containers_get_by_user_with_user_principal_name_request_builder.go new file mode 100644 index 00000000000..9eec865474a --- /dev/null +++ b/storage/file_storage_deleted_containers_get_by_user_with_user_principal_name_request_builder.go @@ -0,0 +1,125 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package storage + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// FileStorageDeletedContainersGetByUserWithUserPrincipalNameRequestBuilder provides operations to call the getByUser method. +type FileStorageDeletedContainersGetByUserWithUserPrincipalNameRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// FileStorageDeletedContainersGetByUserWithUserPrincipalNameRequestBuilderGetQueryParameters get a list of fileStorageContainer objects that are owned by a user (either as owner or as principalOwner). You can also filter the results to only list containers for which the user is the principalOwner. +type FileStorageDeletedContainersGetByUserWithUserPrincipalNameRequestBuilderGetQueryParameters 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\"" +} +// FileStorageDeletedContainersGetByUserWithUserPrincipalNameRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type FileStorageDeletedContainersGetByUserWithUserPrincipalNameRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *FileStorageDeletedContainersGetByUserWithUserPrincipalNameRequestBuilderGetQueryParameters +} +// NewFileStorageDeletedContainersGetByUserWithUserPrincipalNameRequestBuilderInternal instantiates a new FileStorageDeletedContainersGetByUserWithUserPrincipalNameRequestBuilder and sets the default values. +func NewFileStorageDeletedContainersGetByUserWithUserPrincipalNameRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter, userPrincipalName *string)(*FileStorageDeletedContainersGetByUserWithUserPrincipalNameRequestBuilder) { + m := &FileStorageDeletedContainersGetByUserWithUserPrincipalNameRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/storage/fileStorage/deletedContainers/getByUser(userPrincipalName='{userPrincipalName}'){?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters), + } + if userPrincipalName != nil { + m.BaseRequestBuilder.PathParameters["userPrincipalName"] = *userPrincipalName + } + return m +} +// NewFileStorageDeletedContainersGetByUserWithUserPrincipalNameRequestBuilder instantiates a new FileStorageDeletedContainersGetByUserWithUserPrincipalNameRequestBuilder and sets the default values. +func NewFileStorageDeletedContainersGetByUserWithUserPrincipalNameRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*FileStorageDeletedContainersGetByUserWithUserPrincipalNameRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewFileStorageDeletedContainersGetByUserWithUserPrincipalNameRequestBuilderInternal(urlParams, requestAdapter, nil) +} +// Get get a list of fileStorageContainer objects that are owned by a user (either as owner or as principalOwner). You can also filter the results to only list containers for which the user is the principalOwner. +// Deprecated: This method is obsolete. Use GetAsGetByUserWithUserPrincipalNameGetResponse instead. +// returns a FileStorageDeletedContainersGetByUserWithUserPrincipalNameResponseable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/filestoragecontainer-getbyuser?view=graph-rest-beta +func (m *FileStorageDeletedContainersGetByUserWithUserPrincipalNameRequestBuilder) Get(ctx context.Context, requestConfiguration *FileStorageDeletedContainersGetByUserWithUserPrincipalNameRequestBuilderGetRequestConfiguration)(FileStorageDeletedContainersGetByUserWithUserPrincipalNameResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateFileStorageDeletedContainersGetByUserWithUserPrincipalNameResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(FileStorageDeletedContainersGetByUserWithUserPrincipalNameResponseable), nil +} +// GetAsGetByUserWithUserPrincipalNameGetResponse get a list of fileStorageContainer objects that are owned by a user (either as owner or as principalOwner). You can also filter the results to only list containers for which the user is the principalOwner. +// returns a FileStorageDeletedContainersGetByUserWithUserPrincipalNameGetResponseable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/filestoragecontainer-getbyuser?view=graph-rest-beta +func (m *FileStorageDeletedContainersGetByUserWithUserPrincipalNameRequestBuilder) GetAsGetByUserWithUserPrincipalNameGetResponse(ctx context.Context, requestConfiguration *FileStorageDeletedContainersGetByUserWithUserPrincipalNameRequestBuilderGetRequestConfiguration)(FileStorageDeletedContainersGetByUserWithUserPrincipalNameGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateFileStorageDeletedContainersGetByUserWithUserPrincipalNameGetResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(FileStorageDeletedContainersGetByUserWithUserPrincipalNameGetResponseable), nil +} +// ToGetRequestInformation get a list of fileStorageContainer objects that are owned by a user (either as owner or as principalOwner). You can also filter the results to only list containers for which the user is the principalOwner. +// returns a *RequestInformation when successful +func (m *FileStorageDeletedContainersGetByUserWithUserPrincipalNameRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *FileStorageDeletedContainersGetByUserWithUserPrincipalNameRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *FileStorageDeletedContainersGetByUserWithUserPrincipalNameRequestBuilder when successful +func (m *FileStorageDeletedContainersGetByUserWithUserPrincipalNameRequestBuilder) WithUrl(rawUrl string)(*FileStorageDeletedContainersGetByUserWithUserPrincipalNameRequestBuilder) { + return NewFileStorageDeletedContainersGetByUserWithUserPrincipalNameRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/storage/file_storage_deleted_containers_get_by_user_with_user_principal_name_response.go b/storage/file_storage_deleted_containers_get_by_user_with_user_principal_name_response.go new file mode 100644 index 00000000000..21c00394672 --- /dev/null +++ b/storage/file_storage_deleted_containers_get_by_user_with_user_principal_name_response.go @@ -0,0 +1,30 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package storage + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Deprecated: This class is obsolete. Use FileStorageDeletedContainersGetByUserWithUserPrincipalNameGetResponseable instead. +type FileStorageDeletedContainersGetByUserWithUserPrincipalNameResponse struct { + FileStorageDeletedContainersGetByUserWithUserPrincipalNameGetResponse +} +// NewFileStorageDeletedContainersGetByUserWithUserPrincipalNameResponse instantiates a new FileStorageDeletedContainersGetByUserWithUserPrincipalNameResponse and sets the default values. +func NewFileStorageDeletedContainersGetByUserWithUserPrincipalNameResponse()(*FileStorageDeletedContainersGetByUserWithUserPrincipalNameResponse) { + m := &FileStorageDeletedContainersGetByUserWithUserPrincipalNameResponse{ + FileStorageDeletedContainersGetByUserWithUserPrincipalNameGetResponse: *NewFileStorageDeletedContainersGetByUserWithUserPrincipalNameGetResponse(), + } + return m +} +// CreateFileStorageDeletedContainersGetByUserWithUserPrincipalNameResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateFileStorageDeletedContainersGetByUserWithUserPrincipalNameResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFileStorageDeletedContainersGetByUserWithUserPrincipalNameResponse(), nil +} +// Deprecated: This class is obsolete. Use FileStorageDeletedContainersGetByUserWithUserPrincipalNameGetResponseable instead. +type FileStorageDeletedContainersGetByUserWithUserPrincipalNameResponseable interface { + FileStorageDeletedContainersGetByUserWithUserPrincipalNameGetResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/storage/file_storage_deleted_containers_get_by_user_with_user_principal_name_with_role_get_response.go b/storage/file_storage_deleted_containers_get_by_user_with_user_principal_name_with_role_get_response.go new file mode 100644 index 00000000000..4c48decf6e6 --- /dev/null +++ b/storage/file_storage_deleted_containers_get_by_user_with_user_principal_name_with_role_get_response.go @@ -0,0 +1,92 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package storage + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" +) + +type FileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleGetResponse struct { + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BaseCollectionPaginationCountResponse +} +// NewFileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleGetResponse instantiates a new FileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleGetResponse and sets the default values. +func NewFileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleGetResponse()(*FileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleGetResponse) { + m := &FileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleGetResponse{ + BaseCollectionPaginationCountResponse: *ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateFileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateFileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleGetResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *FileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateFileStorageContainerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileStorageContainerable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileStorageContainerable) + } + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +// returns a []FileStorageContainerable when successful +func (m *FileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleGetResponse) GetValue()([]ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileStorageContainerable) { + val, err := m.GetBackingStore().Get("value") + if err != nil { + panic(err) + } + if val != nil { + return val.([]ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileStorageContainerable) + } + return nil +} +// Serialize serializes information the current object +func (m *FileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleGetResponse) 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 *FileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleGetResponse) SetValue(value []ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileStorageContainerable)() { + err := m.GetBackingStore().Set("value", value) + if err != nil { + panic(err) + } +} +type FileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleGetResponseable interface { + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileStorageContainerable) + SetValue(value []ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileStorageContainerable)() +} diff --git a/storage/file_storage_deleted_containers_get_by_user_with_user_principal_name_with_role_request_builder.go b/storage/file_storage_deleted_containers_get_by_user_with_user_principal_name_with_role_request_builder.go new file mode 100644 index 00000000000..a28d0b8d141 --- /dev/null +++ b/storage/file_storage_deleted_containers_get_by_user_with_user_principal_name_with_role_request_builder.go @@ -0,0 +1,122 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package storage + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// FileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleRequestBuilder provides operations to call the getByUser method. +type FileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// FileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleRequestBuilderGetQueryParameters invoke function getByUser +type FileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleRequestBuilderGetQueryParameters 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\"" +} +// FileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type FileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *FileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleRequestBuilderGetQueryParameters +} +// NewFileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleRequestBuilderInternal instantiates a new FileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleRequestBuilder and sets the default values. +func NewFileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter, role *string, userPrincipalName *string)(*FileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleRequestBuilder) { + m := &FileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/storage/fileStorage/deletedContainers/getByUser(userPrincipalName='{userPrincipalName}',role='{role}'){?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters), + } + if role != nil { + m.BaseRequestBuilder.PathParameters["role"] = *role + } + if userPrincipalName != nil { + m.BaseRequestBuilder.PathParameters["userPrincipalName"] = *userPrincipalName + } + return m +} +// NewFileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleRequestBuilder instantiates a new FileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleRequestBuilder and sets the default values. +func NewFileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*FileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewFileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleRequestBuilderInternal(urlParams, requestAdapter, nil, nil) +} +// Get invoke function getByUser +// Deprecated: This method is obsolete. Use GetAsGetByUserWithUserPrincipalNameWithRoleGetResponse instead. +// returns a FileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleResponseable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *FileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleRequestBuilder) Get(ctx context.Context, requestConfiguration *FileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleRequestBuilderGetRequestConfiguration)(FileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateFileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(FileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleResponseable), nil +} +// GetAsGetByUserWithUserPrincipalNameWithRoleGetResponse invoke function getByUser +// returns a FileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleGetResponseable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *FileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleRequestBuilder) GetAsGetByUserWithUserPrincipalNameWithRoleGetResponse(ctx context.Context, requestConfiguration *FileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleRequestBuilderGetRequestConfiguration)(FileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateFileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleGetResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(FileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleGetResponseable), nil +} +// ToGetRequestInformation invoke function getByUser +// returns a *RequestInformation when successful +func (m *FileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *FileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *FileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleRequestBuilder when successful +func (m *FileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleRequestBuilder) WithUrl(rawUrl string)(*FileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleRequestBuilder) { + return NewFileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/storage/file_storage_deleted_containers_get_by_user_with_user_principal_name_with_role_response.go b/storage/file_storage_deleted_containers_get_by_user_with_user_principal_name_with_role_response.go new file mode 100644 index 00000000000..66949c54242 --- /dev/null +++ b/storage/file_storage_deleted_containers_get_by_user_with_user_principal_name_with_role_response.go @@ -0,0 +1,30 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package storage + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Deprecated: This class is obsolete. Use FileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleGetResponseable instead. +type FileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleResponse struct { + FileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleGetResponse +} +// NewFileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleResponse instantiates a new FileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleResponse and sets the default values. +func NewFileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleResponse()(*FileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleResponse) { + m := &FileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleResponse{ + FileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleGetResponse: *NewFileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleGetResponse(), + } + return m +} +// CreateFileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateFileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleResponse(), nil +} +// Deprecated: This class is obsolete. Use FileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleGetResponseable instead. +type FileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleResponseable interface { + FileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleGetResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/storage/file_storage_deleted_containers_request_builder.go b/storage/file_storage_deleted_containers_request_builder.go index 0eba4b778cf..99a049840bc 100644 --- a/storage/file_storage_deleted_containers_request_builder.go +++ b/storage/file_storage_deleted_containers_request_builder.go @@ -99,6 +99,16 @@ func (m *FileStorageDeletedContainersRequestBuilder) Get(ctx context.Context, re } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.FileStorageContainerCollectionResponseable), nil } +// GetByUserWithUserPrincipalName provides operations to call the getByUser method. +// returns a *FileStorageDeletedContainersGetByUserWithUserPrincipalNameRequestBuilder when successful +func (m *FileStorageDeletedContainersRequestBuilder) GetByUserWithUserPrincipalName(userPrincipalName *string)(*FileStorageDeletedContainersGetByUserWithUserPrincipalNameRequestBuilder) { + return NewFileStorageDeletedContainersGetByUserWithUserPrincipalNameRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter, userPrincipalName) +} +// GetByUserWithUserPrincipalNameWithRole provides operations to call the getByUser method. +// returns a *FileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleRequestBuilder when successful +func (m *FileStorageDeletedContainersRequestBuilder) GetByUserWithUserPrincipalNameWithRole(role *string, userPrincipalName *string)(*FileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleRequestBuilder) { + return NewFileStorageDeletedContainersGetByUserWithUserPrincipalNameWithRoleRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter, role, userPrincipalName) +} // Post create new navigation property to deletedContainers for storage // returns a FileStorageContainerable when successful // returns a ODataError error when the service returns a 4XX or 5XX status code diff --git a/teams/item_channels_item_planner_plans_item_history_items_planner_history_item_item_request_builder.go b/teams/item_channels_item_planner_plans_item_history_items_planner_history_item_item_request_builder.go index 0ad37221a4e..ce0289fc34d 100644 --- a/teams/item_channels_item_planner_plans_item_history_items_planner_history_item_item_request_builder.go +++ b/teams/item_channels_item_planner_plans_item_history_items_planner_history_item_item_request_builder.go @@ -21,7 +21,7 @@ type ItemChannelsItemPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBu // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// ItemChannelsItemPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderGetQueryParameters get historyItems from teams +// ItemChannelsItemPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderGetQueryParameters collection of history items for entities in the plan. Read-only. Nullable. type ItemChannelsItemPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderGetQueryParameters struct { // Expand related entities Expand []string "uriparametername:\"%24expand\"" @@ -73,7 +73,7 @@ func (m *ItemChannelsItemPlannerPlansItemHistoryItemsPlannerHistoryItemItemReque } return nil } -// Get get historyItems from teams +// Get collection of history items for entities in the plan. Read-only. Nullable. // returns a PlannerHistoryItemable when successful // returns a ODataError error when the service returns a 4XX or 5XX status code func (m *ItemChannelsItemPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemChannelsItemPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerHistoryItemable, error) { @@ -124,7 +124,7 @@ func (m *ItemChannelsItemPlannerPlansItemHistoryItemsPlannerHistoryItemItemReque requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToGetRequestInformation get historyItems from teams +// ToGetRequestInformation collection of history items for entities in the plan. Read-only. Nullable. // returns a *RequestInformation when successful func (m *ItemChannelsItemPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemChannelsItemPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/teams/item_channels_item_planner_plans_item_history_items_request_builder.go b/teams/item_channels_item_planner_plans_item_history_items_request_builder.go index ca5724840b9..503f4c382be 100644 --- a/teams/item_channels_item_planner_plans_item_history_items_request_builder.go +++ b/teams/item_channels_item_planner_plans_item_history_items_request_builder.go @@ -14,7 +14,7 @@ import ( type ItemChannelsItemPlannerPlansItemHistoryItemsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ItemChannelsItemPlannerPlansItemHistoryItemsRequestBuilderGetQueryParameters get historyItems from teams +// ItemChannelsItemPlannerPlansItemHistoryItemsRequestBuilderGetQueryParameters collection of history items for entities in the plan. Read-only. Nullable. type ItemChannelsItemPlannerPlansItemHistoryItemsRequestBuilderGetQueryParameters struct { // Include count of items Count *bool "uriparametername:\"%24count\"" @@ -79,7 +79,7 @@ func NewItemChannelsItemPlannerPlansItemHistoryItemsRequestBuilder(rawUrl string func (m *ItemChannelsItemPlannerPlansItemHistoryItemsRequestBuilder) Count()(*ItemChannelsItemPlannerPlansItemHistoryItemsCountRequestBuilder) { return NewItemChannelsItemPlannerPlansItemHistoryItemsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Get get historyItems from teams +// Get collection of history items for entities in the plan. Read-only. Nullable. // returns a PlannerHistoryItemCollectionResponseable when successful // returns a ODataError error when the service returns a 4XX or 5XX status code func (m *ItemChannelsItemPlannerPlansItemHistoryItemsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemChannelsItemPlannerPlansItemHistoryItemsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerHistoryItemCollectionResponseable, error) { @@ -119,7 +119,7 @@ func (m *ItemChannelsItemPlannerPlansItemHistoryItemsRequestBuilder) Post(ctx co } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerHistoryItemable), nil } -// ToGetRequestInformation get historyItems from teams +// ToGetRequestInformation collection of history items for entities in the plan. Read-only. Nullable. // returns a *RequestInformation when successful func (m *ItemChannelsItemPlannerPlansItemHistoryItemsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemChannelsItemPlannerPlansItemHistoryItemsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/teams/item_primary_channel_planner_plans_item_history_items_planner_history_item_item_request_builder.go b/teams/item_primary_channel_planner_plans_item_history_items_planner_history_item_item_request_builder.go index ea6d640cfa6..a58f80cc3da 100644 --- a/teams/item_primary_channel_planner_plans_item_history_items_planner_history_item_item_request_builder.go +++ b/teams/item_primary_channel_planner_plans_item_history_items_planner_history_item_item_request_builder.go @@ -21,7 +21,7 @@ type ItemPrimaryChannelPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequest // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// ItemPrimaryChannelPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderGetQueryParameters get historyItems from teams +// ItemPrimaryChannelPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderGetQueryParameters collection of history items for entities in the plan. Read-only. Nullable. type ItemPrimaryChannelPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderGetQueryParameters struct { // Expand related entities Expand []string "uriparametername:\"%24expand\"" @@ -73,7 +73,7 @@ func (m *ItemPrimaryChannelPlannerPlansItemHistoryItemsPlannerHistoryItemItemReq } return nil } -// Get get historyItems from teams +// Get collection of history items for entities in the plan. Read-only. Nullable. // returns a PlannerHistoryItemable when successful // returns a ODataError error when the service returns a 4XX or 5XX status code func (m *ItemPrimaryChannelPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemPrimaryChannelPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerHistoryItemable, error) { @@ -124,7 +124,7 @@ func (m *ItemPrimaryChannelPlannerPlansItemHistoryItemsPlannerHistoryItemItemReq requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToGetRequestInformation get historyItems from teams +// ToGetRequestInformation collection of history items for entities in the plan. Read-only. Nullable. // returns a *RequestInformation when successful func (m *ItemPrimaryChannelPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemPrimaryChannelPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/teams/item_primary_channel_planner_plans_item_history_items_request_builder.go b/teams/item_primary_channel_planner_plans_item_history_items_request_builder.go index 82ce3279e50..924ad93d5cd 100644 --- a/teams/item_primary_channel_planner_plans_item_history_items_request_builder.go +++ b/teams/item_primary_channel_planner_plans_item_history_items_request_builder.go @@ -14,7 +14,7 @@ import ( type ItemPrimaryChannelPlannerPlansItemHistoryItemsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ItemPrimaryChannelPlannerPlansItemHistoryItemsRequestBuilderGetQueryParameters get historyItems from teams +// ItemPrimaryChannelPlannerPlansItemHistoryItemsRequestBuilderGetQueryParameters collection of history items for entities in the plan. Read-only. Nullable. type ItemPrimaryChannelPlannerPlansItemHistoryItemsRequestBuilderGetQueryParameters struct { // Include count of items Count *bool "uriparametername:\"%24count\"" @@ -79,7 +79,7 @@ func NewItemPrimaryChannelPlannerPlansItemHistoryItemsRequestBuilder(rawUrl stri func (m *ItemPrimaryChannelPlannerPlansItemHistoryItemsRequestBuilder) Count()(*ItemPrimaryChannelPlannerPlansItemHistoryItemsCountRequestBuilder) { return NewItemPrimaryChannelPlannerPlansItemHistoryItemsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Get get historyItems from teams +// Get collection of history items for entities in the plan. Read-only. Nullable. // returns a PlannerHistoryItemCollectionResponseable when successful // returns a ODataError error when the service returns a 4XX or 5XX status code func (m *ItemPrimaryChannelPlannerPlansItemHistoryItemsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemPrimaryChannelPlannerPlansItemHistoryItemsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerHistoryItemCollectionResponseable, error) { @@ -119,7 +119,7 @@ func (m *ItemPrimaryChannelPlannerPlansItemHistoryItemsRequestBuilder) Post(ctx } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerHistoryItemable), nil } -// ToGetRequestInformation get historyItems from teams +// ToGetRequestInformation collection of history items for entities in the plan. Read-only. Nullable. // returns a *RequestInformation when successful func (m *ItemPrimaryChannelPlannerPlansItemHistoryItemsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemPrimaryChannelPlannerPlansItemHistoryItemsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/teamtemplatedefinition/174bdc986c17ce2f45be631e0719f27b24b7e7160123d3fd9c3693c7963fa0b5.go b/teamtemplatedefinition/174bdc986c17ce2f45be631e0719f27b24b7e7160123d3fd9c3693c7963fa0b5.go index 0b6a79a4653..f0a76a50439 100644 --- a/teamtemplatedefinition/174bdc986c17ce2f45be631e0719f27b24b7e7160123d3fd9c3693c7963fa0b5.go +++ b/teamtemplatedefinition/174bdc986c17ce2f45be631e0719f27b24b7e7160123d3fd9c3693c7963fa0b5.go @@ -21,7 +21,7 @@ type ItemTeamDefinitionPrimaryChannelPlannerPlansItemHistoryItemsPlannerHistoryI // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// ItemTeamDefinitionPrimaryChannelPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderGetQueryParameters get historyItems from teamTemplateDefinition +// ItemTeamDefinitionPrimaryChannelPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderGetQueryParameters collection of history items for entities in the plan. Read-only. Nullable. type ItemTeamDefinitionPrimaryChannelPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderGetQueryParameters struct { // Expand related entities Expand []string "uriparametername:\"%24expand\"" @@ -73,7 +73,7 @@ func (m *ItemTeamDefinitionPrimaryChannelPlannerPlansItemHistoryItemsPlannerHist } return nil } -// Get get historyItems from teamTemplateDefinition +// Get collection of history items for entities in the plan. Read-only. Nullable. // returns a PlannerHistoryItemable when successful // returns a ODataError error when the service returns a 4XX or 5XX status code func (m *ItemTeamDefinitionPrimaryChannelPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemTeamDefinitionPrimaryChannelPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerHistoryItemable, error) { @@ -124,7 +124,7 @@ func (m *ItemTeamDefinitionPrimaryChannelPlannerPlansItemHistoryItemsPlannerHist requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToGetRequestInformation get historyItems from teamTemplateDefinition +// ToGetRequestInformation collection of history items for entities in the plan. Read-only. Nullable. // returns a *RequestInformation when successful func (m *ItemTeamDefinitionPrimaryChannelPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemTeamDefinitionPrimaryChannelPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/teamtemplatedefinition/2753b070f3f494f8f3aa540c3be138272271fb006a4a2d1e14902cd0dbfed72f.go b/teamtemplatedefinition/2753b070f3f494f8f3aa540c3be138272271fb006a4a2d1e14902cd0dbfed72f.go index 3d1f822ceb6..970baff3f3b 100644 --- a/teamtemplatedefinition/2753b070f3f494f8f3aa540c3be138272271fb006a4a2d1e14902cd0dbfed72f.go +++ b/teamtemplatedefinition/2753b070f3f494f8f3aa540c3be138272271fb006a4a2d1e14902cd0dbfed72f.go @@ -21,7 +21,7 @@ type ItemTeamDefinitionChannelsItemPlannerPlansItemHistoryItemsPlannerHistoryIte // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// ItemTeamDefinitionChannelsItemPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderGetQueryParameters get historyItems from teamTemplateDefinition +// ItemTeamDefinitionChannelsItemPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderGetQueryParameters collection of history items for entities in the plan. Read-only. Nullable. type ItemTeamDefinitionChannelsItemPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderGetQueryParameters struct { // Expand related entities Expand []string "uriparametername:\"%24expand\"" @@ -73,7 +73,7 @@ func (m *ItemTeamDefinitionChannelsItemPlannerPlansItemHistoryItemsPlannerHistor } return nil } -// Get get historyItems from teamTemplateDefinition +// Get collection of history items for entities in the plan. Read-only. Nullable. // returns a PlannerHistoryItemable when successful // returns a ODataError error when the service returns a 4XX or 5XX status code func (m *ItemTeamDefinitionChannelsItemPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemTeamDefinitionChannelsItemPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerHistoryItemable, error) { @@ -124,7 +124,7 @@ func (m *ItemTeamDefinitionChannelsItemPlannerPlansItemHistoryItemsPlannerHistor requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToGetRequestInformation get historyItems from teamTemplateDefinition +// ToGetRequestInformation collection of history items for entities in the plan. Read-only. Nullable. // returns a *RequestInformation when successful func (m *ItemTeamDefinitionChannelsItemPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemTeamDefinitionChannelsItemPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/teamtemplatedefinition/item_team_definition_channels_item_planner_plans_item_history_items_request_builder.go b/teamtemplatedefinition/item_team_definition_channels_item_planner_plans_item_history_items_request_builder.go index 28a94f214f7..cccef5ef7ab 100644 --- a/teamtemplatedefinition/item_team_definition_channels_item_planner_plans_item_history_items_request_builder.go +++ b/teamtemplatedefinition/item_team_definition_channels_item_planner_plans_item_history_items_request_builder.go @@ -14,7 +14,7 @@ import ( type ItemTeamDefinitionChannelsItemPlannerPlansItemHistoryItemsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ItemTeamDefinitionChannelsItemPlannerPlansItemHistoryItemsRequestBuilderGetQueryParameters get historyItems from teamTemplateDefinition +// ItemTeamDefinitionChannelsItemPlannerPlansItemHistoryItemsRequestBuilderGetQueryParameters collection of history items for entities in the plan. Read-only. Nullable. type ItemTeamDefinitionChannelsItemPlannerPlansItemHistoryItemsRequestBuilderGetQueryParameters struct { // Include count of items Count *bool "uriparametername:\"%24count\"" @@ -79,7 +79,7 @@ func NewItemTeamDefinitionChannelsItemPlannerPlansItemHistoryItemsRequestBuilder func (m *ItemTeamDefinitionChannelsItemPlannerPlansItemHistoryItemsRequestBuilder) Count()(*ItemTeamDefinitionChannelsItemPlannerPlansItemHistoryItemsCountRequestBuilder) { return NewItemTeamDefinitionChannelsItemPlannerPlansItemHistoryItemsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Get get historyItems from teamTemplateDefinition +// Get collection of history items for entities in the plan. Read-only. Nullable. // returns a PlannerHistoryItemCollectionResponseable when successful // returns a ODataError error when the service returns a 4XX or 5XX status code func (m *ItemTeamDefinitionChannelsItemPlannerPlansItemHistoryItemsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemTeamDefinitionChannelsItemPlannerPlansItemHistoryItemsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerHistoryItemCollectionResponseable, error) { @@ -119,7 +119,7 @@ func (m *ItemTeamDefinitionChannelsItemPlannerPlansItemHistoryItemsRequestBuilde } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerHistoryItemable), nil } -// ToGetRequestInformation get historyItems from teamTemplateDefinition +// ToGetRequestInformation collection of history items for entities in the plan. Read-only. Nullable. // returns a *RequestInformation when successful func (m *ItemTeamDefinitionChannelsItemPlannerPlansItemHistoryItemsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemTeamDefinitionChannelsItemPlannerPlansItemHistoryItemsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/teamtemplatedefinition/item_team_definition_primary_channel_planner_plans_item_history_items_request_builder.go b/teamtemplatedefinition/item_team_definition_primary_channel_planner_plans_item_history_items_request_builder.go index eaeba5a91be..815158a0444 100644 --- a/teamtemplatedefinition/item_team_definition_primary_channel_planner_plans_item_history_items_request_builder.go +++ b/teamtemplatedefinition/item_team_definition_primary_channel_planner_plans_item_history_items_request_builder.go @@ -14,7 +14,7 @@ import ( type ItemTeamDefinitionPrimaryChannelPlannerPlansItemHistoryItemsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ItemTeamDefinitionPrimaryChannelPlannerPlansItemHistoryItemsRequestBuilderGetQueryParameters get historyItems from teamTemplateDefinition +// ItemTeamDefinitionPrimaryChannelPlannerPlansItemHistoryItemsRequestBuilderGetQueryParameters collection of history items for entities in the plan. Read-only. Nullable. type ItemTeamDefinitionPrimaryChannelPlannerPlansItemHistoryItemsRequestBuilderGetQueryParameters struct { // Include count of items Count *bool "uriparametername:\"%24count\"" @@ -79,7 +79,7 @@ func NewItemTeamDefinitionPrimaryChannelPlannerPlansItemHistoryItemsRequestBuild func (m *ItemTeamDefinitionPrimaryChannelPlannerPlansItemHistoryItemsRequestBuilder) Count()(*ItemTeamDefinitionPrimaryChannelPlannerPlansItemHistoryItemsCountRequestBuilder) { return NewItemTeamDefinitionPrimaryChannelPlannerPlansItemHistoryItemsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Get get historyItems from teamTemplateDefinition +// Get collection of history items for entities in the plan. Read-only. Nullable. // returns a PlannerHistoryItemCollectionResponseable when successful // returns a ODataError error when the service returns a 4XX or 5XX status code func (m *ItemTeamDefinitionPrimaryChannelPlannerPlansItemHistoryItemsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemTeamDefinitionPrimaryChannelPlannerPlansItemHistoryItemsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerHistoryItemCollectionResponseable, error) { @@ -119,7 +119,7 @@ func (m *ItemTeamDefinitionPrimaryChannelPlannerPlansItemHistoryItemsRequestBuil } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerHistoryItemable), nil } -// ToGetRequestInformation get historyItems from teamTemplateDefinition +// ToGetRequestInformation collection of history items for entities in the plan. Read-only. Nullable. // returns a *RequestInformation when successful func (m *ItemTeamDefinitionPrimaryChannelPlannerPlansItemHistoryItemsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemTeamDefinitionPrimaryChannelPlannerPlansItemHistoryItemsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/teamwork/3545100444b0d18dffbff1169c9fbff78e9dbe2796f525e6f4846daa7b329a6f.go b/teamwork/3545100444b0d18dffbff1169c9fbff78e9dbe2796f525e6f4846daa7b329a6f.go index 1e7b9eaf1dc..2180314a719 100644 --- a/teamwork/3545100444b0d18dffbff1169c9fbff78e9dbe2796f525e6f4846daa7b329a6f.go +++ b/teamwork/3545100444b0d18dffbff1169c9fbff78e9dbe2796f525e6f4846daa7b329a6f.go @@ -14,7 +14,7 @@ import ( type TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemHistoryItemsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemHistoryItemsRequestBuilderGetQueryParameters get historyItems from teamwork +// TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemHistoryItemsRequestBuilderGetQueryParameters collection of history items for entities in the plan. Read-only. Nullable. type TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemHistoryItemsRequestBuilderGetQueryParameters struct { // Include count of items Count *bool "uriparametername:\"%24count\"" @@ -79,7 +79,7 @@ func NewTeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlans func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemHistoryItemsRequestBuilder) Count()(*TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemHistoryItemsCountRequestBuilder) { return NewTeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemHistoryItemsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Get get historyItems from teamwork +// Get collection of history items for entities in the plan. Read-only. Nullable. // returns a PlannerHistoryItemCollectionResponseable when successful // returns a ODataError error when the service returns a 4XX or 5XX status code func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemHistoryItemsRequestBuilder) Get(ctx context.Context, requestConfiguration *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemHistoryItemsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerHistoryItemCollectionResponseable, error) { @@ -119,7 +119,7 @@ func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlan } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerHistoryItemable), nil } -// ToGetRequestInformation get historyItems from teamwork +// ToGetRequestInformation collection of history items for entities in the plan. Read-only. Nullable. // returns a *RequestInformation when successful func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemHistoryItemsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemHistoryItemsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/teamwork/983a356ac86ca4349aa102bf9ce856b01457de16915da8e55f929a9351187d4a.go b/teamwork/983a356ac86ca4349aa102bf9ce856b01457de16915da8e55f929a9351187d4a.go index b5ff9892ffd..104f00ccb64 100644 --- a/teamwork/983a356ac86ca4349aa102bf9ce856b01457de16915da8e55f929a9351187d4a.go +++ b/teamwork/983a356ac86ca4349aa102bf9ce856b01457de16915da8e55f929a9351187d4a.go @@ -21,7 +21,7 @@ type TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemH // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderGetQueryParameters get historyItems from teamwork +// TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderGetQueryParameters collection of history items for entities in the plan. Read-only. Nullable. type TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderGetQueryParameters struct { // Expand related entities Expand []string "uriparametername:\"%24expand\"" @@ -73,7 +73,7 @@ func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansI } return nil } -// Get get historyItems from teamwork +// Get collection of history items for entities in the plan. Read-only. Nullable. // returns a PlannerHistoryItemable when successful // returns a ODataError error when the service returns a 4XX or 5XX status code func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilder) Get(ctx context.Context, requestConfiguration *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerHistoryItemable, error) { @@ -124,7 +124,7 @@ func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansI requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToGetRequestInformation get historyItems from teamwork +// ToGetRequestInformation collection of history items for entities in the plan. Read-only. Nullable. // returns a *RequestInformation when successful func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/teamwork/b1d3c11d8df61e0bf4b25ffd47d2d78990ebf4464e3536452ffe4fe997f0cabc.go b/teamwork/b1d3c11d8df61e0bf4b25ffd47d2d78990ebf4464e3536452ffe4fe997f0cabc.go index 92632ff1088..bec0986cb0c 100644 --- a/teamwork/b1d3c11d8df61e0bf4b25ffd47d2d78990ebf4464e3536452ffe4fe997f0cabc.go +++ b/teamwork/b1d3c11d8df61e0bf4b25ffd47d2d78990ebf4464e3536452ffe4fe997f0cabc.go @@ -21,7 +21,7 @@ type TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansIte // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderGetQueryParameters get historyItems from teamwork +// TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderGetQueryParameters collection of history items for entities in the plan. Read-only. Nullable. type TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderGetQueryParameters struct { // Expand related entities Expand []string "uriparametername:\"%24expand\"" @@ -73,7 +73,7 @@ func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlan } return nil } -// Get get historyItems from teamwork +// Get collection of history items for entities in the plan. Read-only. Nullable. // returns a PlannerHistoryItemable when successful // returns a ODataError error when the service returns a 4XX or 5XX status code func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilder) Get(ctx context.Context, requestConfiguration *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerHistoryItemable, error) { @@ -124,7 +124,7 @@ func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlan requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToGetRequestInformation get historyItems from teamwork +// ToGetRequestInformation collection of history items for entities in the plan. Read-only. Nullable. // returns a *RequestInformation when successful func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/teamwork/deleted_teams_item_channels_item_planner_plans_item_history_items_request_builder.go b/teamwork/deleted_teams_item_channels_item_planner_plans_item_history_items_request_builder.go index ce399418534..90c86108e55 100644 --- a/teamwork/deleted_teams_item_channels_item_planner_plans_item_history_items_request_builder.go +++ b/teamwork/deleted_teams_item_channels_item_planner_plans_item_history_items_request_builder.go @@ -14,7 +14,7 @@ import ( type DeletedTeamsItemChannelsItemPlannerPlansItemHistoryItemsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// DeletedTeamsItemChannelsItemPlannerPlansItemHistoryItemsRequestBuilderGetQueryParameters get historyItems from teamwork +// DeletedTeamsItemChannelsItemPlannerPlansItemHistoryItemsRequestBuilderGetQueryParameters collection of history items for entities in the plan. Read-only. Nullable. type DeletedTeamsItemChannelsItemPlannerPlansItemHistoryItemsRequestBuilderGetQueryParameters struct { // Include count of items Count *bool "uriparametername:\"%24count\"" @@ -79,7 +79,7 @@ func NewDeletedTeamsItemChannelsItemPlannerPlansItemHistoryItemsRequestBuilder(r func (m *DeletedTeamsItemChannelsItemPlannerPlansItemHistoryItemsRequestBuilder) Count()(*DeletedTeamsItemChannelsItemPlannerPlansItemHistoryItemsCountRequestBuilder) { return NewDeletedTeamsItemChannelsItemPlannerPlansItemHistoryItemsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Get get historyItems from teamwork +// Get collection of history items for entities in the plan. Read-only. Nullable. // returns a PlannerHistoryItemCollectionResponseable when successful // returns a ODataError error when the service returns a 4XX or 5XX status code func (m *DeletedTeamsItemChannelsItemPlannerPlansItemHistoryItemsRequestBuilder) Get(ctx context.Context, requestConfiguration *DeletedTeamsItemChannelsItemPlannerPlansItemHistoryItemsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerHistoryItemCollectionResponseable, error) { @@ -119,7 +119,7 @@ func (m *DeletedTeamsItemChannelsItemPlannerPlansItemHistoryItemsRequestBuilder) } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerHistoryItemable), nil } -// ToGetRequestInformation get historyItems from teamwork +// ToGetRequestInformation collection of history items for entities in the plan. Read-only. Nullable. // returns a *RequestInformation when successful func (m *DeletedTeamsItemChannelsItemPlannerPlansItemHistoryItemsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *DeletedTeamsItemChannelsItemPlannerPlansItemHistoryItemsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/teamwork/f3b061d0cc09ddb7058da2f43512a2b6ecbaf3167999659997b11cdfd970b2ba.go b/teamwork/f3b061d0cc09ddb7058da2f43512a2b6ecbaf3167999659997b11cdfd970b2ba.go index 23843440c45..cb122f21662 100644 --- a/teamwork/f3b061d0cc09ddb7058da2f43512a2b6ecbaf3167999659997b11cdfd970b2ba.go +++ b/teamwork/f3b061d0cc09ddb7058da2f43512a2b6ecbaf3167999659997b11cdfd970b2ba.go @@ -21,7 +21,7 @@ type DeletedTeamsItemChannelsItemPlannerPlansItemHistoryItemsPlannerHistoryItemI // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// DeletedTeamsItemChannelsItemPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderGetQueryParameters get historyItems from teamwork +// DeletedTeamsItemChannelsItemPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderGetQueryParameters collection of history items for entities in the plan. Read-only. Nullable. type DeletedTeamsItemChannelsItemPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderGetQueryParameters struct { // Expand related entities Expand []string "uriparametername:\"%24expand\"" @@ -73,7 +73,7 @@ func (m *DeletedTeamsItemChannelsItemPlannerPlansItemHistoryItemsPlannerHistoryI } return nil } -// Get get historyItems from teamwork +// Get collection of history items for entities in the plan. Read-only. Nullable. // returns a PlannerHistoryItemable when successful // returns a ODataError error when the service returns a 4XX or 5XX status code func (m *DeletedTeamsItemChannelsItemPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilder) Get(ctx context.Context, requestConfiguration *DeletedTeamsItemChannelsItemPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerHistoryItemable, error) { @@ -124,7 +124,7 @@ func (m *DeletedTeamsItemChannelsItemPlannerPlansItemHistoryItemsPlannerHistoryI requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToGetRequestInformation get historyItems from teamwork +// ToGetRequestInformation collection of history items for entities in the plan. Read-only. Nullable. // returns a *RequestInformation when successful func (m *DeletedTeamsItemChannelsItemPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *DeletedTeamsItemChannelsItemPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/teamwork/fc6489138afc2d8a783868cdfccab35ee848760be7cc4b69a1709db6f6eb2d61.go b/teamwork/fc6489138afc2d8a783868cdfccab35ee848760be7cc4b69a1709db6f6eb2d61.go index fd02172a713..c3af0068573 100644 --- a/teamwork/fc6489138afc2d8a783868cdfccab35ee848760be7cc4b69a1709db6f6eb2d61.go +++ b/teamwork/fc6489138afc2d8a783868cdfccab35ee848760be7cc4b69a1709db6f6eb2d61.go @@ -14,7 +14,7 @@ import ( type TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemHistoryItemsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemHistoryItemsRequestBuilderGetQueryParameters get historyItems from teamwork +// TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemHistoryItemsRequestBuilderGetQueryParameters collection of history items for entities in the plan. Read-only. Nullable. type TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemHistoryItemsRequestBuilderGetQueryParameters struct { // Include count of items Count *bool "uriparametername:\"%24count\"" @@ -79,7 +79,7 @@ func NewTeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansIt func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemHistoryItemsRequestBuilder) Count()(*TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemHistoryItemsCountRequestBuilder) { return NewTeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemHistoryItemsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Get get historyItems from teamwork +// Get collection of history items for entities in the plan. Read-only. Nullable. // returns a PlannerHistoryItemCollectionResponseable when successful // returns a ODataError error when the service returns a 4XX or 5XX status code func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemHistoryItemsRequestBuilder) Get(ctx context.Context, requestConfiguration *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemHistoryItemsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerHistoryItemCollectionResponseable, error) { @@ -119,7 +119,7 @@ func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansI } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerHistoryItemable), nil } -// ToGetRequestInformation get historyItems from teamwork +// ToGetRequestInformation collection of history items for entities in the plan. Read-only. Nullable. // returns a *RequestInformation when successful func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemHistoryItemsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemHistoryItemsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/users/item_managed_devices_item_get_sync_status_request_builder.go b/users/item_managed_devices_item_get_sync_status_request_builder.go new file mode 100644 index 00000000000..7c39b4ea5b8 --- /dev/null +++ b/users/item_managed_devices_item_get_sync_status_request_builder.go @@ -0,0 +1,72 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +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" +) + +// ItemManagedDevicesItemGetSyncStatusRequestBuilder provides operations to call the getSyncStatus method. +type ItemManagedDevicesItemGetSyncStatusRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemManagedDevicesItemGetSyncStatusRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemManagedDevicesItemGetSyncStatusRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewItemManagedDevicesItemGetSyncStatusRequestBuilderInternal instantiates a new ItemManagedDevicesItemGetSyncStatusRequestBuilder and sets the default values. +func NewItemManagedDevicesItemGetSyncStatusRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemManagedDevicesItemGetSyncStatusRequestBuilder) { + m := &ItemManagedDevicesItemGetSyncStatusRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/users/{user%2Did}/managedDevices/{managedDevice%2Did}/getSyncStatus()", pathParameters), + } + return m +} +// NewItemManagedDevicesItemGetSyncStatusRequestBuilder instantiates a new ItemManagedDevicesItemGetSyncStatusRequestBuilder and sets the default values. +func NewItemManagedDevicesItemGetSyncStatusRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemManagedDevicesItemGetSyncStatusRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemManagedDevicesItemGetSyncStatusRequestBuilderInternal(urlParams, requestAdapter) +} +// Get invoke function getSyncStatus +// returns a DeviceSyncStatusResponseable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *ItemManagedDevicesItemGetSyncStatusRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemManagedDevicesItemGetSyncStatusRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DeviceSyncStatusResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateDeviceSyncStatusResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DeviceSyncStatusResponseable), nil +} +// ToGetRequestInformation invoke function getSyncStatus +// returns a *RequestInformation when successful +func (m *ItemManagedDevicesItemGetSyncStatusRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemManagedDevicesItemGetSyncStatusRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemManagedDevicesItemGetSyncStatusRequestBuilder when successful +func (m *ItemManagedDevicesItemGetSyncStatusRequestBuilder) WithUrl(rawUrl string)(*ItemManagedDevicesItemGetSyncStatusRequestBuilder) { + return NewItemManagedDevicesItemGetSyncStatusRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/users/item_managed_devices_item_remove_device_esim_post_request_body.go b/users/item_managed_devices_item_remove_device_esim_post_request_body.go new file mode 100644 index 00000000000..8d4bafc42ba --- /dev/null +++ b/users/item_managed_devices_item_remove_device_esim_post_request_body.go @@ -0,0 +1,116 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package users + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +type ItemManagedDevicesItemRemoveDeviceEsimPostRequestBody struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewItemManagedDevicesItemRemoveDeviceEsimPostRequestBody instantiates a new ItemManagedDevicesItemRemoveDeviceEsimPostRequestBody and sets the default values. +func NewItemManagedDevicesItemRemoveDeviceEsimPostRequestBody()(*ItemManagedDevicesItemRemoveDeviceEsimPostRequestBody) { + m := &ItemManagedDevicesItemRemoveDeviceEsimPostRequestBody{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemManagedDevicesItemRemoveDeviceEsimPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemManagedDevicesItemRemoveDeviceEsimPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemManagedDevicesItemRemoveDeviceEsimPostRequestBody(), 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. +// returns a map[string]any when successful +func (m *ItemManagedDevicesItemRemoveDeviceEsimPostRequestBody) 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. +// returns a BackingStore when successful +func (m *ItemManagedDevicesItemRemoveDeviceEsimPostRequestBody) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemManagedDevicesItemRemoveDeviceEsimPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["iccId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIccId(val) + } + return nil + } + return res +} +// GetIccId gets the iccId property value. The iccId property +// returns a *string when successful +func (m *ItemManagedDevicesItemRemoveDeviceEsimPostRequestBody) GetIccId()(*string) { + val, err := m.GetBackingStore().Get("iccId") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// Serialize serializes information the current object +func (m *ItemManagedDevicesItemRemoveDeviceEsimPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("iccId", m.GetIccId()) + 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 *ItemManagedDevicesItemRemoveDeviceEsimPostRequestBody) 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 *ItemManagedDevicesItemRemoveDeviceEsimPostRequestBody) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetIccId sets the iccId property value. The iccId property +func (m *ItemManagedDevicesItemRemoveDeviceEsimPostRequestBody) SetIccId(value *string)() { + err := m.GetBackingStore().Set("iccId", value) + if err != nil { + panic(err) + } +} +type ItemManagedDevicesItemRemoveDeviceEsimPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetIccId()(*string) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetIccId(value *string)() +} diff --git a/users/item_managed_devices_item_remove_device_esim_request_builder.go b/users/item_managed_devices_item_remove_device_esim_request_builder.go new file mode 100644 index 00000000000..add92842d3f --- /dev/null +++ b/users/item_managed_devices_item_remove_device_esim_request_builder.go @@ -0,0 +1,71 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package users + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemManagedDevicesItemRemoveDeviceEsimRequestBuilder provides operations to call the removeDeviceEsim method. +type ItemManagedDevicesItemRemoveDeviceEsimRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemManagedDevicesItemRemoveDeviceEsimRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemManagedDevicesItemRemoveDeviceEsimRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewItemManagedDevicesItemRemoveDeviceEsimRequestBuilderInternal instantiates a new ItemManagedDevicesItemRemoveDeviceEsimRequestBuilder and sets the default values. +func NewItemManagedDevicesItemRemoveDeviceEsimRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemManagedDevicesItemRemoveDeviceEsimRequestBuilder) { + m := &ItemManagedDevicesItemRemoveDeviceEsimRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/users/{user%2Did}/managedDevices/{managedDevice%2Did}/removeDeviceEsim", pathParameters), + } + return m +} +// NewItemManagedDevicesItemRemoveDeviceEsimRequestBuilder instantiates a new ItemManagedDevicesItemRemoveDeviceEsimRequestBuilder and sets the default values. +func NewItemManagedDevicesItemRemoveDeviceEsimRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemManagedDevicesItemRemoveDeviceEsimRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemManagedDevicesItemRemoveDeviceEsimRequestBuilderInternal(urlParams, requestAdapter) +} +// Post remove eSIM from the device +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *ItemManagedDevicesItemRemoveDeviceEsimRequestBuilder) Post(ctx context.Context, body ItemManagedDevicesItemRemoveDeviceEsimPostRequestBodyable, requestConfiguration *ItemManagedDevicesItemRemoveDeviceEsimRequestBuilderPostRequestConfiguration)(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation remove eSIM from the device +// returns a *RequestInformation when successful +func (m *ItemManagedDevicesItemRemoveDeviceEsimRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemManagedDevicesItemRemoveDeviceEsimPostRequestBodyable, requestConfiguration *ItemManagedDevicesItemRemoveDeviceEsimRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemManagedDevicesItemRemoveDeviceEsimRequestBuilder when successful +func (m *ItemManagedDevicesItemRemoveDeviceEsimRequestBuilder) WithUrl(rawUrl string)(*ItemManagedDevicesItemRemoveDeviceEsimRequestBuilder) { + return NewItemManagedDevicesItemRemoveDeviceEsimRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/users/item_managed_devices_managed_device_item_request_builder.go b/users/item_managed_devices_managed_device_item_request_builder.go index 912958e9198..f1dbdae0e81 100644 --- a/users/item_managed_devices_managed_device_item_request_builder.go +++ b/users/item_managed_devices_managed_device_item_request_builder.go @@ -188,6 +188,11 @@ func (m *ItemManagedDevicesManagedDeviceItemRequestBuilder) GetFileVaultKey()(*I func (m *ItemManagedDevicesManagedDeviceItemRequestBuilder) GetNonCompliantSettings()(*ItemManagedDevicesItemGetNonCompliantSettingsRequestBuilder) { return NewItemManagedDevicesItemGetNonCompliantSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// GetSyncStatus provides operations to call the getSyncStatus method. +// returns a *ItemManagedDevicesItemGetSyncStatusRequestBuilder when successful +func (m *ItemManagedDevicesManagedDeviceItemRequestBuilder) GetSyncStatus()(*ItemManagedDevicesItemGetSyncStatusRequestBuilder) { + return NewItemManagedDevicesItemGetSyncStatusRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // InitiateDeviceAttestation provides operations to call the initiateDeviceAttestation method. // returns a *ItemManagedDevicesItemInitiateDeviceAttestationRequestBuilder when successful func (m *ItemManagedDevicesManagedDeviceItemRequestBuilder) InitiateDeviceAttestation()(*ItemManagedDevicesItemInitiateDeviceAttestationRequestBuilder) { @@ -278,6 +283,11 @@ func (m *ItemManagedDevicesManagedDeviceItemRequestBuilder) Reenable()(*ItemMana func (m *ItemManagedDevicesManagedDeviceItemRequestBuilder) RemoteLock()(*ItemManagedDevicesItemRemoteLockRequestBuilder) { return NewItemManagedDevicesItemRemoteLockRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// RemoveDeviceEsim provides operations to call the removeDeviceEsim method. +// returns a *ItemManagedDevicesItemRemoveDeviceEsimRequestBuilder when successful +func (m *ItemManagedDevicesManagedDeviceItemRequestBuilder) RemoveDeviceEsim()(*ItemManagedDevicesItemRemoveDeviceEsimRequestBuilder) { + return NewItemManagedDevicesItemRemoveDeviceEsimRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // RemoveDeviceFirmwareConfigurationInterfaceManagement provides operations to call the removeDeviceFirmwareConfigurationInterfaceManagement method. // returns a *ItemManagedDevicesItemRemoveDeviceFirmwareConfigurationInterfaceManagementRequestBuilder when successful func (m *ItemManagedDevicesManagedDeviceItemRequestBuilder) RemoveDeviceFirmwareConfigurationInterfaceManagement()(*ItemManagedDevicesItemRemoveDeviceFirmwareConfigurationInterfaceManagementRequestBuilder) { diff --git a/users/item_planner_plans_item_history_items_planner_history_item_item_request_builder.go b/users/item_planner_plans_item_history_items_planner_history_item_item_request_builder.go index 27fcfaeb0fb..f8f57618162 100644 --- a/users/item_planner_plans_item_history_items_planner_history_item_item_request_builder.go +++ b/users/item_planner_plans_item_history_items_planner_history_item_item_request_builder.go @@ -21,7 +21,7 @@ type ItemPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderDeleteR // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// ItemPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderGetQueryParameters get historyItems from users +// ItemPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderGetQueryParameters collection of history items for entities in the plan. Read-only. Nullable. type ItemPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderGetQueryParameters struct { // Expand related entities Expand []string "uriparametername:\"%24expand\"" @@ -73,7 +73,7 @@ func (m *ItemPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilder) D } return nil } -// Get get historyItems from users +// Get collection of history items for entities in the plan. Read-only. Nullable. // returns a PlannerHistoryItemable when successful // returns a ODataError error when the service returns a 4XX or 5XX status code func (m *ItemPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerHistoryItemable, error) { @@ -124,7 +124,7 @@ func (m *ItemPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilder) T requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToGetRequestInformation get historyItems from users +// ToGetRequestInformation collection of history items for entities in the plan. Read-only. Nullable. // returns a *RequestInformation when successful func (m *ItemPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemPlannerPlansItemHistoryItemsPlannerHistoryItemItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/users/item_planner_plans_item_history_items_request_builder.go b/users/item_planner_plans_item_history_items_request_builder.go index 4b625d6c1a0..a2097053615 100644 --- a/users/item_planner_plans_item_history_items_request_builder.go +++ b/users/item_planner_plans_item_history_items_request_builder.go @@ -14,7 +14,7 @@ import ( type ItemPlannerPlansItemHistoryItemsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ItemPlannerPlansItemHistoryItemsRequestBuilderGetQueryParameters get historyItems from users +// ItemPlannerPlansItemHistoryItemsRequestBuilderGetQueryParameters collection of history items for entities in the plan. Read-only. Nullable. type ItemPlannerPlansItemHistoryItemsRequestBuilderGetQueryParameters struct { // Include count of items Count *bool "uriparametername:\"%24count\"" @@ -79,7 +79,7 @@ func NewItemPlannerPlansItemHistoryItemsRequestBuilder(rawUrl string, requestAda func (m *ItemPlannerPlansItemHistoryItemsRequestBuilder) Count()(*ItemPlannerPlansItemHistoryItemsCountRequestBuilder) { return NewItemPlannerPlansItemHistoryItemsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Get get historyItems from users +// Get collection of history items for entities in the plan. Read-only. Nullable. // returns a PlannerHistoryItemCollectionResponseable when successful // returns a ODataError error when the service returns a 4XX or 5XX status code func (m *ItemPlannerPlansItemHistoryItemsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemPlannerPlansItemHistoryItemsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerHistoryItemCollectionResponseable, error) { @@ -119,7 +119,7 @@ func (m *ItemPlannerPlansItemHistoryItemsRequestBuilder) Post(ctx context.Contex } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerHistoryItemable), nil } -// ToGetRequestInformation get historyItems from users +// ToGetRequestInformation collection of history items for entities in the plan. Read-only. Nullable. // returns a *RequestInformation when successful func (m *ItemPlannerPlansItemHistoryItemsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemPlannerPlansItemHistoryItemsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters)