diff --git a/CHANGELOG.md b/CHANGELOG.md index 29b95dd4ba..6d721e882e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +## [1.40.0]- 2024-04-30 + +### Changed + +- Weekly generation. + ## [1.39.0]- 2024-04-25 ### Changed diff --git a/communications/calls_item_participants_invite_request_builder.go b/communications/calls_item_participants_invite_request_builder.go index 4194bb7808..a73f4bcd92 100644 --- a/communications/calls_item_participants_invite_request_builder.go +++ b/communications/calls_item_participants_invite_request_builder.go @@ -31,12 +31,12 @@ func NewCallsItemParticipantsInviteRequestBuilder(rawUrl string, requestAdapter urlParams["request-raw-url"] = rawUrl return NewCallsItemParticipantsInviteRequestBuilderInternal(urlParams, requestAdapter) } -// Post invite participants to the active call. For more information about how to handle operations, see commsOperation. +// Post delete a specific participant in a call. In some situations, it is appropriate for an application to remove a participant from an active call. This action can be done before or after the participant answers the call. When an active caller is removed, they are immediately dropped from the call with no pre- or post-removal notification. When an invited participant is removed, any outstanding add participant request is canceled. // returns a InviteParticipantsOperationable 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/participant-invite?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/participant-delete?view=graph-rest-1.0 func (m *CallsItemParticipantsInviteRequestBuilder) Post(ctx context.Context, body CallsItemParticipantsInvitePostRequestBodyable, requestConfiguration *CallsItemParticipantsInviteRequestBuilderPostRequestConfiguration)(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.InviteParticipantsOperationable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -54,7 +54,7 @@ func (m *CallsItemParticipantsInviteRequestBuilder) Post(ctx context.Context, bo } return res.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.InviteParticipantsOperationable), nil } -// ToPostRequestInformation invite participants to the active call. For more information about how to handle operations, see commsOperation. +// ToPostRequestInformation delete a specific participant in a call. In some situations, it is appropriate for an application to remove a participant from an active call. This action can be done before or after the participant answers the call. When an active caller is removed, they are immediately dropped from the call with no pre- or post-removal notification. When an invited participant is removed, any outstanding add participant request is canceled. // returns a *RequestInformation when successful func (m *CallsItemParticipantsInviteRequestBuilder) ToPostRequestInformation(ctx context.Context, body CallsItemParticipantsInvitePostRequestBodyable, requestConfiguration *CallsItemParticipantsInviteRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/deviceappmanagement/device_app_management_request_builder.go b/deviceappmanagement/device_app_management_request_builder.go index 9820ff1c45..df7eb5182c 100644 --- a/deviceappmanagement/device_app_management_request_builder.go +++ b/deviceappmanagement/device_app_management_request_builder.go @@ -62,7 +62,7 @@ func (m *DeviceAppManagementRequestBuilder) DefaultManagedAppProtections()(*Defa // 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/intune-partnerintegration-deviceappmanagement-get?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/intune-books-deviceappmanagement-get?view=graph-rest-1.0 func (m *DeviceAppManagementRequestBuilder) Get(ctx context.Context, requestConfiguration *DeviceAppManagementRequestBuilderGetRequestConfiguration)(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.DeviceAppManagementable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -130,7 +130,7 @@ func (m *DeviceAppManagementRequestBuilder) MobileApps()(*MobileAppsRequestBuild // 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/intune-policyset-deviceappmanagement-update?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/intune-apps-deviceappmanagement-update?view=graph-rest-1.0 func (m *DeviceAppManagementRequestBuilder) Patch(ctx context.Context, body iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.DeviceAppManagementable, requestConfiguration *DeviceAppManagementRequestBuilderPatchRequestConfiguration)(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.DeviceAppManagementable, error) { requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); if err != nil { diff --git a/deviceappmanagement/managed_app_policies_item_target_apps_request_builder.go b/deviceappmanagement/managed_app_policies_item_target_apps_request_builder.go index d052b75590..1a6181f78a 100644 --- a/deviceappmanagement/managed_app_policies_item_target_apps_request_builder.go +++ b/deviceappmanagement/managed_app_policies_item_target_apps_request_builder.go @@ -34,7 +34,7 @@ func NewManagedAppPoliciesItemTargetAppsRequestBuilder(rawUrl string, requestAda // 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/intune-mam-managedappprotection-targetapps?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/intune-mam-managedapppolicy-targetapps?view=graph-rest-1.0 func (m *ManagedAppPoliciesItemTargetAppsRequestBuilder) Post(ctx context.Context, body ManagedAppPoliciesItemTargetAppsPostRequestBodyable, requestConfiguration *ManagedAppPoliciesItemTargetAppsRequestBuilderPostRequestConfiguration)(error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { diff --git a/deviceappmanagement/managed_app_registrations_item_applied_policies_item_target_apps_request_builder.go b/deviceappmanagement/managed_app_registrations_item_applied_policies_item_target_apps_request_builder.go index 936e9913e5..36a08e1b66 100644 --- a/deviceappmanagement/managed_app_registrations_item_applied_policies_item_target_apps_request_builder.go +++ b/deviceappmanagement/managed_app_registrations_item_applied_policies_item_target_apps_request_builder.go @@ -34,7 +34,7 @@ func NewManagedAppRegistrationsItemAppliedPoliciesItemTargetAppsRequestBuilder(r // 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/intune-mam-managedappprotection-targetapps?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/intune-mam-managedapppolicy-targetapps?view=graph-rest-1.0 func (m *ManagedAppRegistrationsItemAppliedPoliciesItemTargetAppsRequestBuilder) Post(ctx context.Context, body ManagedAppRegistrationsItemAppliedPoliciesItemTargetAppsPostRequestBodyable, requestConfiguration *ManagedAppRegistrationsItemAppliedPoliciesItemTargetAppsRequestBuilderPostRequestConfiguration)(error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { diff --git a/deviceappmanagement/managed_app_registrations_item_intended_policies_item_target_apps_request_builder.go b/deviceappmanagement/managed_app_registrations_item_intended_policies_item_target_apps_request_builder.go index 2013f7ca57..aaa08ba093 100644 --- a/deviceappmanagement/managed_app_registrations_item_intended_policies_item_target_apps_request_builder.go +++ b/deviceappmanagement/managed_app_registrations_item_intended_policies_item_target_apps_request_builder.go @@ -34,7 +34,7 @@ func NewManagedAppRegistrationsItemIntendedPoliciesItemTargetAppsRequestBuilder( // 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/intune-mam-managedappprotection-targetapps?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/intune-mam-managedapppolicy-targetapps?view=graph-rest-1.0 func (m *ManagedAppRegistrationsItemIntendedPoliciesItemTargetAppsRequestBuilder) Post(ctx context.Context, body ManagedAppRegistrationsItemIntendedPoliciesItemTargetAppsPostRequestBodyable, requestConfiguration *ManagedAppRegistrationsItemIntendedPoliciesItemTargetAppsRequestBuilderPostRequestConfiguration)(error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { diff --git a/devicemanagement/device_management_request_builder.go b/devicemanagement/device_management_request_builder.go index a4ecb48ce5..7f92906077 100644 --- a/devicemanagement/device_management_request_builder.go +++ b/devicemanagement/device_management_request_builder.go @@ -122,7 +122,7 @@ func (m *DeviceManagementRequestBuilder) ExchangeConnectors()(*ExchangeConnector // 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/intune-deviceconfig-devicemanagement-get?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/intune-notification-devicemanagement-get?view=graph-rest-1.0 func (m *DeviceManagementRequestBuilder) Get(ctx context.Context, requestConfiguration *DeviceManagementRequestBuilderGetRequestConfiguration)(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.DeviceManagementable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -185,7 +185,7 @@ func (m *DeviceManagementRequestBuilder) NotificationMessageTemplates()(*Notific // 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/intune-rbac-devicemanagement-update?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/intune-companyterms-devicemanagement-update?view=graph-rest-1.0 func (m *DeviceManagementRequestBuilder) Patch(ctx context.Context, body iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.DeviceManagementable, requestConfiguration *DeviceManagementRequestBuilderPatchRequestConfiguration)(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.DeviceManagementable, error) { requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); if err != nil { diff --git a/directory/directory_request_builder.go b/directory/directory_request_builder.go index e9b7acf373..b544aa0d40 100644 --- a/directory/directory_request_builder.go +++ b/directory/directory_request_builder.go @@ -122,6 +122,16 @@ func (m *DirectoryRequestBuilder) Patch(ctx context.Context, body iadcd81124412c } return res.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.Directoryable), nil } +// Subscriptions provides operations to manage the subscriptions property of the microsoft.graph.directory entity. +// returns a *SubscriptionsRequestBuilder when successful +func (m *DirectoryRequestBuilder) Subscriptions()(*SubscriptionsRequestBuilder) { + return NewSubscriptionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// SubscriptionsWithCommerceSubscriptionId provides operations to manage the subscriptions property of the microsoft.graph.directory entity. +// returns a *SubscriptionsWithCommerceSubscriptionIdRequestBuilder when successful +func (m *DirectoryRequestBuilder) SubscriptionsWithCommerceSubscriptionId(commerceSubscriptionId *string)(*SubscriptionsWithCommerceSubscriptionIdRequestBuilder) { + return NewSubscriptionsWithCommerceSubscriptionIdRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter, commerceSubscriptionId) +} // ToGetRequestInformation get directory // returns a *RequestInformation when successful func (m *DirectoryRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *DirectoryRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { diff --git a/directory/subscriptions_company_subscription_item_request_builder.go b/directory/subscriptions_company_subscription_item_request_builder.go new file mode 100644 index 0000000000..eca4a96fcb --- /dev/null +++ b/directory/subscriptions_company_subscription_item_request_builder.go @@ -0,0 +1,157 @@ +package directory + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242 "github.com/microsoftgraph/msgraph-sdk-go/models" + ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a "github.com/microsoftgraph/msgraph-sdk-go/models/odataerrors" +) + +// SubscriptionsCompanySubscriptionItemRequestBuilder provides operations to manage the subscriptions property of the microsoft.graph.directory entity. +type SubscriptionsCompanySubscriptionItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// SubscriptionsCompanySubscriptionItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type SubscriptionsCompanySubscriptionItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// SubscriptionsCompanySubscriptionItemRequestBuilderGetQueryParameters get subscriptions from directory +type SubscriptionsCompanySubscriptionItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// SubscriptionsCompanySubscriptionItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type SubscriptionsCompanySubscriptionItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *SubscriptionsCompanySubscriptionItemRequestBuilderGetQueryParameters +} +// SubscriptionsCompanySubscriptionItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type SubscriptionsCompanySubscriptionItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewSubscriptionsCompanySubscriptionItemRequestBuilderInternal instantiates a new SubscriptionsCompanySubscriptionItemRequestBuilder and sets the default values. +func NewSubscriptionsCompanySubscriptionItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*SubscriptionsCompanySubscriptionItemRequestBuilder) { + m := &SubscriptionsCompanySubscriptionItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/directory/subscriptions/{companySubscription%2Did}{?%24expand,%24select}", pathParameters), + } + return m +} +// NewSubscriptionsCompanySubscriptionItemRequestBuilder instantiates a new SubscriptionsCompanySubscriptionItemRequestBuilder and sets the default values. +func NewSubscriptionsCompanySubscriptionItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*SubscriptionsCompanySubscriptionItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewSubscriptionsCompanySubscriptionItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property subscriptions for directory +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *SubscriptionsCompanySubscriptionItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *SubscriptionsCompanySubscriptionItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get get subscriptions from directory +// returns a CompanySubscriptionable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *SubscriptionsCompanySubscriptionItemRequestBuilder) Get(ctx context.Context, requestConfiguration *SubscriptionsCompanySubscriptionItemRequestBuilderGetRequestConfiguration)(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CompanySubscriptionable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CreateCompanySubscriptionFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CompanySubscriptionable), nil +} +// Patch update the navigation property subscriptions in directory +// returns a CompanySubscriptionable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *SubscriptionsCompanySubscriptionItemRequestBuilder) Patch(ctx context.Context, body iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CompanySubscriptionable, requestConfiguration *SubscriptionsCompanySubscriptionItemRequestBuilderPatchRequestConfiguration)(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CompanySubscriptionable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CreateCompanySubscriptionFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CompanySubscriptionable), nil +} +// ToDeleteRequestInformation delete navigation property subscriptions for directory +// returns a *RequestInformation when successful +func (m *SubscriptionsCompanySubscriptionItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *SubscriptionsCompanySubscriptionItemRequestBuilderDeleteRequestConfiguration)(*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 get subscriptions from directory +// returns a *RequestInformation when successful +func (m *SubscriptionsCompanySubscriptionItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *SubscriptionsCompanySubscriptionItemRequestBuilderGetRequestConfiguration)(*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 subscriptions in directory +// returns a *RequestInformation when successful +func (m *SubscriptionsCompanySubscriptionItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CompanySubscriptionable, requestConfiguration *SubscriptionsCompanySubscriptionItemRequestBuilderPatchRequestConfiguration)(*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 *SubscriptionsCompanySubscriptionItemRequestBuilder when successful +func (m *SubscriptionsCompanySubscriptionItemRequestBuilder) WithUrl(rawUrl string)(*SubscriptionsCompanySubscriptionItemRequestBuilder) { + return NewSubscriptionsCompanySubscriptionItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/directory/subscriptions_count_request_builder.go b/directory/subscriptions_count_request_builder.go new file mode 100644 index 0000000000..85851e7a3f --- /dev/null +++ b/directory/subscriptions_count_request_builder.go @@ -0,0 +1,80 @@ +package directory + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a "github.com/microsoftgraph/msgraph-sdk-go/models/odataerrors" +) + +// SubscriptionsCountRequestBuilder provides operations to count the resources in the collection. +type SubscriptionsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// SubscriptionsCountRequestBuilderGetQueryParameters get the number of the resource +type SubscriptionsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// SubscriptionsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type SubscriptionsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *SubscriptionsCountRequestBuilderGetQueryParameters +} +// NewSubscriptionsCountRequestBuilderInternal instantiates a new SubscriptionsCountRequestBuilder and sets the default values. +func NewSubscriptionsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*SubscriptionsCountRequestBuilder) { + m := &SubscriptionsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/directory/subscriptions/$count{?%24filter,%24search}", pathParameters), + } + return m +} +// NewSubscriptionsCountRequestBuilder instantiates a new SubscriptionsCountRequestBuilder and sets the default values. +func NewSubscriptionsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*SubscriptionsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewSubscriptionsCountRequestBuilderInternal(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 *SubscriptionsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *SubscriptionsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.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 *SubscriptionsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *SubscriptionsCountRequestBuilderGetRequestConfiguration)(*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 *SubscriptionsCountRequestBuilder when successful +func (m *SubscriptionsCountRequestBuilder) WithUrl(rawUrl string)(*SubscriptionsCountRequestBuilder) { + return NewSubscriptionsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/directory/subscriptions_request_builder.go b/directory/subscriptions_request_builder.go new file mode 100644 index 0000000000..e57e583516 --- /dev/null +++ b/directory/subscriptions_request_builder.go @@ -0,0 +1,152 @@ +package directory + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242 "github.com/microsoftgraph/msgraph-sdk-go/models" + ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a "github.com/microsoftgraph/msgraph-sdk-go/models/odataerrors" +) + +// SubscriptionsRequestBuilder provides operations to manage the subscriptions property of the microsoft.graph.directory entity. +type SubscriptionsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// SubscriptionsRequestBuilderGetQueryParameters get subscriptions from directory +type SubscriptionsRequestBuilderGetQueryParameters 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"` +} +// SubscriptionsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type SubscriptionsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *SubscriptionsRequestBuilderGetQueryParameters +} +// SubscriptionsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type SubscriptionsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByCompanySubscriptionId provides operations to manage the subscriptions property of the microsoft.graph.directory entity. +// returns a *SubscriptionsCompanySubscriptionItemRequestBuilder when successful +func (m *SubscriptionsRequestBuilder) ByCompanySubscriptionId(companySubscriptionId string)(*SubscriptionsCompanySubscriptionItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if companySubscriptionId != "" { + urlTplParams["companySubscription%2Did"] = companySubscriptionId + } + return NewSubscriptionsCompanySubscriptionItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewSubscriptionsRequestBuilderInternal instantiates a new SubscriptionsRequestBuilder and sets the default values. +func NewSubscriptionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*SubscriptionsRequestBuilder) { + m := &SubscriptionsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/directory/subscriptions{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters), + } + return m +} +// NewSubscriptionsRequestBuilder instantiates a new SubscriptionsRequestBuilder and sets the default values. +func NewSubscriptionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*SubscriptionsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewSubscriptionsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +// returns a *SubscriptionsCountRequestBuilder when successful +func (m *SubscriptionsRequestBuilder) Count()(*SubscriptionsCountRequestBuilder) { + return NewSubscriptionsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get get subscriptions from directory +// returns a CompanySubscriptionCollectionResponseable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *SubscriptionsRequestBuilder) Get(ctx context.Context, requestConfiguration *SubscriptionsRequestBuilderGetRequestConfiguration)(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CompanySubscriptionCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CreateCompanySubscriptionCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CompanySubscriptionCollectionResponseable), nil +} +// Post create new navigation property to subscriptions for directory +// returns a CompanySubscriptionable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *SubscriptionsRequestBuilder) Post(ctx context.Context, body iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CompanySubscriptionable, requestConfiguration *SubscriptionsRequestBuilderPostRequestConfiguration)(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CompanySubscriptionable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CreateCompanySubscriptionFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CompanySubscriptionable), nil +} +// ToGetRequestInformation get subscriptions from directory +// returns a *RequestInformation when successful +func (m *SubscriptionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *SubscriptionsRequestBuilderGetRequestConfiguration)(*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 new navigation property to subscriptions for directory +// returns a *RequestInformation when successful +func (m *SubscriptionsRequestBuilder) ToPostRequestInformation(ctx context.Context, body iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CompanySubscriptionable, requestConfiguration *SubscriptionsRequestBuilderPostRequestConfiguration)(*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 *SubscriptionsRequestBuilder when successful +func (m *SubscriptionsRequestBuilder) WithUrl(rawUrl string)(*SubscriptionsRequestBuilder) { + return NewSubscriptionsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/directory/subscriptions_with_commerce_subscription_id_request_builder.go b/directory/subscriptions_with_commerce_subscription_id_request_builder.go new file mode 100644 index 0000000000..77832bd4f0 --- /dev/null +++ b/directory/subscriptions_with_commerce_subscription_id_request_builder.go @@ -0,0 +1,160 @@ +package directory + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242 "github.com/microsoftgraph/msgraph-sdk-go/models" + ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a "github.com/microsoftgraph/msgraph-sdk-go/models/odataerrors" +) + +// SubscriptionsWithCommerceSubscriptionIdRequestBuilder provides operations to manage the subscriptions property of the microsoft.graph.directory entity. +type SubscriptionsWithCommerceSubscriptionIdRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// SubscriptionsWithCommerceSubscriptionIdRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type SubscriptionsWithCommerceSubscriptionIdRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// SubscriptionsWithCommerceSubscriptionIdRequestBuilderGetQueryParameters get subscriptions from directory +type SubscriptionsWithCommerceSubscriptionIdRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// SubscriptionsWithCommerceSubscriptionIdRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type SubscriptionsWithCommerceSubscriptionIdRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *SubscriptionsWithCommerceSubscriptionIdRequestBuilderGetQueryParameters +} +// SubscriptionsWithCommerceSubscriptionIdRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type SubscriptionsWithCommerceSubscriptionIdRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewSubscriptionsWithCommerceSubscriptionIdRequestBuilderInternal instantiates a new SubscriptionsWithCommerceSubscriptionIdRequestBuilder and sets the default values. +func NewSubscriptionsWithCommerceSubscriptionIdRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter, commerceSubscriptionId *string)(*SubscriptionsWithCommerceSubscriptionIdRequestBuilder) { + m := &SubscriptionsWithCommerceSubscriptionIdRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/directory/subscriptions(commerceSubscriptionId='{commerceSubscriptionId}'){?%24expand,%24select}", pathParameters), + } + if commerceSubscriptionId != nil { + m.BaseRequestBuilder.PathParameters["commerceSubscriptionId"] = *commerceSubscriptionId + } + return m +} +// NewSubscriptionsWithCommerceSubscriptionIdRequestBuilder instantiates a new SubscriptionsWithCommerceSubscriptionIdRequestBuilder and sets the default values. +func NewSubscriptionsWithCommerceSubscriptionIdRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*SubscriptionsWithCommerceSubscriptionIdRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewSubscriptionsWithCommerceSubscriptionIdRequestBuilderInternal(urlParams, requestAdapter, nil) +} +// Delete delete navigation property subscriptions for directory +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *SubscriptionsWithCommerceSubscriptionIdRequestBuilder) Delete(ctx context.Context, requestConfiguration *SubscriptionsWithCommerceSubscriptionIdRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get get subscriptions from directory +// returns a CompanySubscriptionable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *SubscriptionsWithCommerceSubscriptionIdRequestBuilder) Get(ctx context.Context, requestConfiguration *SubscriptionsWithCommerceSubscriptionIdRequestBuilderGetRequestConfiguration)(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CompanySubscriptionable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CreateCompanySubscriptionFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CompanySubscriptionable), nil +} +// Patch update the navigation property subscriptions in directory +// returns a CompanySubscriptionable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *SubscriptionsWithCommerceSubscriptionIdRequestBuilder) Patch(ctx context.Context, body iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CompanySubscriptionable, requestConfiguration *SubscriptionsWithCommerceSubscriptionIdRequestBuilderPatchRequestConfiguration)(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CompanySubscriptionable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CreateCompanySubscriptionFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CompanySubscriptionable), nil +} +// ToDeleteRequestInformation delete navigation property subscriptions for directory +// returns a *RequestInformation when successful +func (m *SubscriptionsWithCommerceSubscriptionIdRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *SubscriptionsWithCommerceSubscriptionIdRequestBuilderDeleteRequestConfiguration)(*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 get subscriptions from directory +// returns a *RequestInformation when successful +func (m *SubscriptionsWithCommerceSubscriptionIdRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *SubscriptionsWithCommerceSubscriptionIdRequestBuilderGetRequestConfiguration)(*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 subscriptions in directory +// returns a *RequestInformation when successful +func (m *SubscriptionsWithCommerceSubscriptionIdRequestBuilder) ToPatchRequestInformation(ctx context.Context, body iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CompanySubscriptionable, requestConfiguration *SubscriptionsWithCommerceSubscriptionIdRequestBuilderPatchRequestConfiguration)(*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 *SubscriptionsWithCommerceSubscriptionIdRequestBuilder when successful +func (m *SubscriptionsWithCommerceSubscriptionIdRequestBuilder) WithUrl(rawUrl string)(*SubscriptionsWithCommerceSubscriptionIdRequestBuilder) { + return NewSubscriptionsWithCommerceSubscriptionIdRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/domains/domain_item_request_builder.go b/domains/domain_item_request_builder.go index d9bd2c7053..3ca09377b1 100644 --- a/domains/domain_item_request_builder.go +++ b/domains/domain_item_request_builder.go @@ -54,7 +54,7 @@ func NewDomainItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263 urlParams["request-raw-url"] = rawUrl return NewDomainItemRequestBuilderInternal(urlParams, requestAdapter) } -// Delete deletes a domain from a tenant. +// Delete delete a domain from a tenant. // returns a ODataError error when the service returns a 4XX or 5XX status code // [Find more info here] // @@ -111,7 +111,7 @@ func (m *DomainItemRequestBuilder) Get(ctx context.Context, requestConfiguration } return res.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.Domainable), nil } -// Patch update the properties of domain object. +// Patch update the properties of domain object. Only verified domains can be updated. // returns a Domainable when successful // returns a ODataError error when the service returns a 4XX or 5XX status code // [Find more info here] @@ -144,7 +144,7 @@ func (m *DomainItemRequestBuilder) Promote()(*ItemPromoteRequestBuilder) { func (m *DomainItemRequestBuilder) ServiceConfigurationRecords()(*ItemServiceConfigurationRecordsRequestBuilder) { return NewItemServiceConfigurationRecordsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// ToDeleteRequestInformation deletes a domain from a tenant. +// ToDeleteRequestInformation delete a domain from a tenant. // returns a *RequestInformation when successful func (m *DomainItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *DomainItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) @@ -169,7 +169,7 @@ func (m *DomainItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPatchRequestInformation update the properties of domain object. +// ToPatchRequestInformation update the properties of domain object. Only verified domains can be updated. // returns a *RequestInformation when successful func (m *DomainItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.Domainable, requestConfiguration *DomainItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/domains/item_domain_name_references_directory_object_item_request_builder.go b/domains/item_domain_name_references_directory_object_item_request_builder.go index 0af642117c..b414495011 100644 --- a/domains/item_domain_name_references_directory_object_item_request_builder.go +++ b/domains/item_domain_name_references_directory_object_item_request_builder.go @@ -11,7 +11,7 @@ import ( type ItemDomainNameReferencesDirectoryObjectItemRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ItemDomainNameReferencesDirectoryObjectItemRequestBuilderGetQueryParameters the objects such as users and groups that reference the domain ID. Read-only, Nullable. Supports $expand and $filter by the OData type of objects returned. For example /domains/{domainId}/domainNameReferences/microsoft.graph.user and /domains/{domainId}/domainNameReferences/microsoft.graph.group. +// ItemDomainNameReferencesDirectoryObjectItemRequestBuilderGetQueryParameters the objects such as users and groups that reference the domain ID. Read-only, Nullable. Supports $expand and $filter by the OData type of objects returned. For example, /domains/{domainId}/domainNameReferences/microsoft.graph.user and /domains/{domainId}/domainNameReferences/microsoft.graph.group. type ItemDomainNameReferencesDirectoryObjectItemRequestBuilderGetQueryParameters struct { // Expand related entities Expand []string `uriparametername:"%24expand"` @@ -40,7 +40,7 @@ func NewItemDomainNameReferencesDirectoryObjectItemRequestBuilder(rawUrl string, urlParams["request-raw-url"] = rawUrl return NewItemDomainNameReferencesDirectoryObjectItemRequestBuilderInternal(urlParams, requestAdapter) } -// Get the objects such as users and groups that reference the domain ID. Read-only, Nullable. Supports $expand and $filter by the OData type of objects returned. For example /domains/{domainId}/domainNameReferences/microsoft.graph.user and /domains/{domainId}/domainNameReferences/microsoft.graph.group. +// Get the objects such as users and groups that reference the domain ID. Read-only, Nullable. Supports $expand and $filter by the OData type of objects returned. For example, /domains/{domainId}/domainNameReferences/microsoft.graph.user and /domains/{domainId}/domainNameReferences/microsoft.graph.group. // returns a DirectoryObjectable when successful // returns a ODataError error when the service returns a 4XX or 5XX status code func (m *ItemDomainNameReferencesDirectoryObjectItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemDomainNameReferencesDirectoryObjectItemRequestBuilderGetRequestConfiguration)(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.DirectoryObjectable, error) { @@ -60,7 +60,7 @@ func (m *ItemDomainNameReferencesDirectoryObjectItemRequestBuilder) Get(ctx cont } return res.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.DirectoryObjectable), nil } -// ToGetRequestInformation the objects such as users and groups that reference the domain ID. Read-only, Nullable. Supports $expand and $filter by the OData type of objects returned. For example /domains/{domainId}/domainNameReferences/microsoft.graph.user and /domains/{domainId}/domainNameReferences/microsoft.graph.group. +// ToGetRequestInformation the objects such as users and groups that reference the domain ID. Read-only, Nullable. Supports $expand and $filter by the OData type of objects returned. For example, /domains/{domainId}/domainNameReferences/microsoft.graph.user and /domains/{domainId}/domainNameReferences/microsoft.graph.group. // returns a *RequestInformation when successful func (m *ItemDomainNameReferencesDirectoryObjectItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemDomainNameReferencesDirectoryObjectItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/domains/item_domain_name_references_request_builder.go b/domains/item_domain_name_references_request_builder.go index 680b2ad0e8..923beaf29e 100644 --- a/domains/item_domain_name_references_request_builder.go +++ b/domains/item_domain_name_references_request_builder.go @@ -11,7 +11,7 @@ import ( type ItemDomainNameReferencesRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ItemDomainNameReferencesRequestBuilderGetQueryParameters the objects such as users and groups that reference the domain ID. Read-only, Nullable. Supports $expand and $filter by the OData type of objects returned. For example /domains/{domainId}/domainNameReferences/microsoft.graph.user and /domains/{domainId}/domainNameReferences/microsoft.graph.group. +// ItemDomainNameReferencesRequestBuilderGetQueryParameters the objects such as users and groups that reference the domain ID. Read-only, Nullable. Supports $expand and $filter by the OData type of objects returned. For example, /domains/{domainId}/domainNameReferences/microsoft.graph.user and /domains/{domainId}/domainNameReferences/microsoft.graph.group. type ItemDomainNameReferencesRequestBuilderGetQueryParameters struct { // Include count of items Count *bool `uriparametername:"%24count"` @@ -69,7 +69,7 @@ func NewItemDomainNameReferencesRequestBuilder(rawUrl string, requestAdapter i2a func (m *ItemDomainNameReferencesRequestBuilder) Count()(*ItemDomainNameReferencesCountRequestBuilder) { return NewItemDomainNameReferencesCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Get the objects such as users and groups that reference the domain ID. Read-only, Nullable. Supports $expand and $filter by the OData type of objects returned. For example /domains/{domainId}/domainNameReferences/microsoft.graph.user and /domains/{domainId}/domainNameReferences/microsoft.graph.group. +// Get the objects such as users and groups that reference the domain ID. Read-only, Nullable. Supports $expand and $filter by the OData type of objects returned. For example, /domains/{domainId}/domainNameReferences/microsoft.graph.user and /domains/{domainId}/domainNameReferences/microsoft.graph.group. // returns a DirectoryObjectCollectionResponseable when successful // returns a ODataError error when the service returns a 4XX or 5XX status code func (m *ItemDomainNameReferencesRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemDomainNameReferencesRequestBuilderGetRequestConfiguration)(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.DirectoryObjectCollectionResponseable, error) { @@ -89,7 +89,7 @@ func (m *ItemDomainNameReferencesRequestBuilder) Get(ctx context.Context, reques } return res.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.DirectoryObjectCollectionResponseable), nil } -// ToGetRequestInformation the objects such as users and groups that reference the domain ID. Read-only, Nullable. Supports $expand and $filter by the OData type of objects returned. For example /domains/{domainId}/domainNameReferences/microsoft.graph.user and /domains/{domainId}/domainNameReferences/microsoft.graph.group. +// ToGetRequestInformation the objects such as users and groups that reference the domain ID. Read-only, Nullable. Supports $expand and $filter by the OData type of objects returned. For example, /domains/{domainId}/domainNameReferences/microsoft.graph.user and /domains/{domainId}/domainNameReferences/microsoft.graph.group. // returns a *RequestInformation when successful func (m *ItemDomainNameReferencesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemDomainNameReferencesRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/domains/item_force_delete_request_builder.go b/domains/item_force_delete_request_builder.go index f441e69266..8541aabdfe 100644 --- a/domains/item_force_delete_request_builder.go +++ b/domains/item_force_delete_request_builder.go @@ -30,7 +30,7 @@ func NewItemForceDeleteRequestBuilder(rawUrl string, requestAdapter i2ae4187f7da urlParams["request-raw-url"] = rawUrl return NewItemForceDeleteRequestBuilderInternal(urlParams, requestAdapter) } -// Post deletes a domain using an asynchronous long-running operation. Prior to calling forceDelete, you must update or remove any references to Exchange as the provisioning service. The following actions are performed as part of this operation: After the domain deletion completes, API operations for the deleted domain will return an HTTP 404 status code. To verify deletion of a domain, you can perform a get domain operation. +// Post delete a domain using an asynchronous long-running operation. Before performing this operation, you must update or remove any references to Exchange as the provisioning service. The following actions are performed as part of this operation: After the domain deletion completes, API operations for the deleted domain return an HTTP 404 status code. To verify deletion of a domain, you can perform a get domain operation. // returns a ODataError error when the service returns a 4XX or 5XX status code // [Find more info here] // @@ -49,7 +49,7 @@ func (m *ItemForceDeleteRequestBuilder) Post(ctx context.Context, body ItemForce } return nil } -// ToPostRequestInformation deletes a domain using an asynchronous long-running operation. Prior to calling forceDelete, you must update or remove any references to Exchange as the provisioning service. The following actions are performed as part of this operation: After the domain deletion completes, API operations for the deleted domain will return an HTTP 404 status code. To verify deletion of a domain, you can perform a get domain operation. +// ToPostRequestInformation delete a domain using an asynchronous long-running operation. Before performing this operation, you must update or remove any references to Exchange as the provisioning service. The following actions are performed as part of this operation: After the domain deletion completes, API operations for the deleted domain return an HTTP 404 status code. To verify deletion of a domain, you can perform a get domain operation. // returns a *RequestInformation when successful func (m *ItemForceDeleteRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemForceDeletePostRequestBodyable, requestConfiguration *ItemForceDeleteRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/drives/item_items_item_workbook_tables_add_request_builder.go b/drives/item_items_item_workbook_tables_add_request_builder.go index b1eb8a65bb..808418034c 100644 --- a/drives/item_items_item_workbook_tables_add_request_builder.go +++ b/drives/item_items_item_workbook_tables_add_request_builder.go @@ -31,12 +31,12 @@ func NewItemItemsItemWorkbookTablesAddRequestBuilder(rawUrl string, requestAdapt urlParams["request-raw-url"] = rawUrl return NewItemItemsItemWorkbookTablesAddRequestBuilderInternal(urlParams, requestAdapter) } -// Post use this API to create a new Table. +// Post create a new table. The range source address determines the worksheet under which the table will be added. If the table can't be added (for example, because the address is invalid, or the table would overlap with another table), an error is generated. // returns a WorkbookTableable 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/workbook-post-tables?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/tablecollection-add?view=graph-rest-1.0 func (m *ItemItemsItemWorkbookTablesAddRequestBuilder) Post(ctx context.Context, body ItemItemsItemWorkbookTablesAddPostRequestBodyable, requestConfiguration *ItemItemsItemWorkbookTablesAddRequestBuilderPostRequestConfiguration)(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.WorkbookTableable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -54,7 +54,7 @@ func (m *ItemItemsItemWorkbookTablesAddRequestBuilder) Post(ctx context.Context, } return res.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.WorkbookTableable), nil } -// ToPostRequestInformation use this API to create a new Table. +// ToPostRequestInformation create a new table. The range source address determines the worksheet under which the table will be added. If the table can't be added (for example, because the address is invalid, or the table would overlap with another table), an error is generated. // returns a *RequestInformation when successful func (m *ItemItemsItemWorkbookTablesAddRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemsItemWorkbookTablesAddPostRequestBodyable, requestConfiguration *ItemItemsItemWorkbookTablesAddRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/drives/item_items_item_workbook_worksheets_item_tables_add_request_builder.go b/drives/item_items_item_workbook_worksheets_item_tables_add_request_builder.go index cfd54936ce..5f903bd102 100644 --- a/drives/item_items_item_workbook_worksheets_item_tables_add_request_builder.go +++ b/drives/item_items_item_workbook_worksheets_item_tables_add_request_builder.go @@ -31,12 +31,12 @@ func NewItemItemsItemWorkbookWorksheetsItemTablesAddRequestBuilder(rawUrl string urlParams["request-raw-url"] = rawUrl return NewItemItemsItemWorkbookWorksheetsItemTablesAddRequestBuilderInternal(urlParams, requestAdapter) } -// Post use this API to create a new Table. +// Post create a new table. The range source address determines the worksheet under which the table will be added. If the table can't be added (for example, because the address is invalid, or the table would overlap with another table), an error is generated. // returns a WorkbookTableable 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/workbook-post-tables?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/tablecollection-add?view=graph-rest-1.0 func (m *ItemItemsItemWorkbookWorksheetsItemTablesAddRequestBuilder) Post(ctx context.Context, body ItemItemsItemWorkbookWorksheetsItemTablesAddPostRequestBodyable, requestConfiguration *ItemItemsItemWorkbookWorksheetsItemTablesAddRequestBuilderPostRequestConfiguration)(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.WorkbookTableable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -54,7 +54,7 @@ func (m *ItemItemsItemWorkbookWorksheetsItemTablesAddRequestBuilder) Post(ctx co } return res.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.WorkbookTableable), nil } -// ToPostRequestInformation use this API to create a new Table. +// ToPostRequestInformation create a new table. The range source address determines the worksheet under which the table will be added. If the table can't be added (for example, because the address is invalid, or the table would overlap with another table), an error is generated. // returns a *RequestInformation when successful func (m *ItemItemsItemWorkbookWorksheetsItemTablesAddRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemsItemWorkbookWorksheetsItemTablesAddPostRequestBodyable, requestConfiguration *ItemItemsItemWorkbookWorksheetsItemTablesAddRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/graph_request_adapter.go b/graph_request_adapter.go index 7900ee446f..9e892f8ea5 100644 --- a/graph_request_adapter.go +++ b/graph_request_adapter.go @@ -10,7 +10,7 @@ import ( var clientOptions = core.GraphClientOptions{ GraphServiceVersion: "", //v1 doesn't include the service version in the telemetry header - GraphServiceLibraryVersion: "1.39.0", + GraphServiceLibraryVersion: "1.40.0", } // GetDefaultClientOptions returns the default client options used by the GraphRequestAdapterBase and the middleware. @@ -107,5 +107,6 @@ func NewGraphRequestAdapterWithParseNodeFactoryAndSerializationWriterFactoryAndH + diff --git a/groups/group_item_request_builder.go b/groups/group_item_request_builder.go index 691e949afa..b4d9440280 100644 --- a/groups/group_item_request_builder.go +++ b/groups/group_item_request_builder.go @@ -211,7 +211,7 @@ func (m *GroupItemRequestBuilder) Onenote()(*ItemOnenoteRequestBuilder) { func (m *GroupItemRequestBuilder) Owners()(*ItemOwnersRequestBuilder) { return NewItemOwnersRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Patch create a new group object if it doesn't exist, or update the properties of an existing group object.You can create or update the following types of group: By default, this operation returns only a subset of the properties for each group. For a list of properties that are returned by default, see thethe Properties section of the group resource. To get properties that are not returned by default, do a GET operation and specify the properties in a $select OData query option. +// Patch create a new group object if it doesn't exist, or update the properties of an existing group object.You can create or update the following types of group: By default, this operation returns only a subset of the properties for each group. For a list of properties that are returned by default, see the Properties section of the group resource. To get properties that are not returned by default, do a GET operation and specify the properties in a $select OData query option. // returns a Groupable when successful // returns a ODataError error when the service returns a 4XX or 5XX status code // [Find more info here] @@ -339,7 +339,7 @@ func (m *GroupItemRequestBuilder) ToGetRequestInformation(ctx context.Context, r requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPatchRequestInformation create a new group object if it doesn't exist, or update the properties of an existing group object.You can create or update the following types of group: By default, this operation returns only a subset of the properties for each group. For a list of properties that are returned by default, see thethe Properties section of the group resource. To get properties that are not returned by default, do a GET operation and specify the properties in a $select OData query option. +// ToPatchRequestInformation create a new group object if it doesn't exist, or update the properties of an existing group object.You can create or update the following types of group: By default, this operation returns only a subset of the properties for each group. For a list of properties that are returned by default, see the Properties section of the group resource. To get properties that are not returned by default, do a GET operation and specify the properties in a $select OData query option. // returns a *RequestInformation when successful func (m *GroupItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.Groupable, requestConfiguration *GroupItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/groups/groups_request_builder.go b/groups/groups_request_builder.go index f5e81b3054..3c46511b9e 100644 --- a/groups/groups_request_builder.go +++ b/groups/groups_request_builder.go @@ -114,12 +114,12 @@ func (m *GroupsRequestBuilder) GetAvailableExtensionProperties()(*GetAvailableEx func (m *GroupsRequestBuilder) GetByIds()(*GetByIdsRequestBuilder) { return NewGetByIdsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Post create a new group object if it doesn't exist, or update the properties of an existing group object.You can create or update the following types of group: By default, this operation returns only a subset of the properties for each group. For a list of properties that are returned by default, see thethe Properties section of the group resource. To get properties that are not returned by default, do a GET operation and specify the properties in a $select OData query option. +// Post create a new group as specified in the request body. You can create the following types of groups: This operation returns by default only a subset of the properties for each group. These default properties are noted in the Properties section. To get properties that are not returned by default, do a GET operation and specify the properties in a $select OData query option. // returns a Groupable 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/group-upsert?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/group-post-groups?view=graph-rest-1.0 func (m *GroupsRequestBuilder) Post(ctx context.Context, body iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.Groupable, requestConfiguration *GroupsRequestBuilderPostRequestConfiguration)(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.Groupable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -151,7 +151,7 @@ func (m *GroupsRequestBuilder) ToGetRequestInformation(ctx context.Context, requ requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation create a new group object if it doesn't exist, or update the properties of an existing group object.You can create or update the following types of group: By default, this operation returns only a subset of the properties for each group. For a list of properties that are returned by default, see thethe Properties section of the group resource. To get properties that are not returned by default, do a GET operation and specify the properties in a $select OData query option. +// ToPostRequestInformation create a new group as specified in the request body. You can create the following types of groups: This operation returns by default only a subset of the properties for each group. These default properties are noted in the Properties section. To get properties that are not returned by default, do a GET operation and specify the properties in a $select OData query option. // returns a *RequestInformation when successful func (m *GroupsRequestBuilder) ToPostRequestInformation(ctx context.Context, body iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.Groupable, requestConfiguration *GroupsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/groups/item_conversations_item_threads_item_reply_request_builder.go b/groups/item_conversations_item_threads_item_reply_request_builder.go index 0caa6b08a6..01fd23161c 100644 --- a/groups/item_conversations_item_threads_item_reply_request_builder.go +++ b/groups/item_conversations_item_threads_item_reply_request_builder.go @@ -30,11 +30,11 @@ func NewItemConversationsItemThreadsItemReplyRequestBuilder(rawUrl string, reque urlParams["request-raw-url"] = rawUrl return NewItemConversationsItemThreadsItemReplyRequestBuilderInternal(urlParams, requestAdapter) } -// Post create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. The table in the Permissions section lists the resources that support open extensions. +// Post reply to a post and add a new post to the specified thread in a group conversation. You can specify both the parent conversation and thread in the request, or, you can specify just the parent thread without the parent conversation. // 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/opentypeextension-post-opentypeextension?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/post-reply?view=graph-rest-1.0 func (m *ItemConversationsItemThreadsItemReplyRequestBuilder) Post(ctx context.Context, body ItemConversationsItemThreadsItemReplyPostRequestBodyable, requestConfiguration *ItemConversationsItemThreadsItemReplyRequestBuilderPostRequestConfiguration)(error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -49,7 +49,7 @@ func (m *ItemConversationsItemThreadsItemReplyRequestBuilder) Post(ctx context.C } return nil } -// ToPostRequestInformation create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. The table in the Permissions section lists the resources that support open extensions. +// ToPostRequestInformation reply to a post and add a new post to the specified thread in a group conversation. You can specify both the parent conversation and thread in the request, or, you can specify just the parent thread without the parent conversation. // returns a *RequestInformation when successful func (m *ItemConversationsItemThreadsItemReplyRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemConversationsItemThreadsItemReplyPostRequestBodyable, requestConfiguration *ItemConversationsItemThreadsItemReplyRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/groups/item_threads_item_reply_request_builder.go b/groups/item_threads_item_reply_request_builder.go index fbdaa2d0b8..aa5013a5c7 100644 --- a/groups/item_threads_item_reply_request_builder.go +++ b/groups/item_threads_item_reply_request_builder.go @@ -30,11 +30,11 @@ func NewItemThreadsItemReplyRequestBuilder(rawUrl string, requestAdapter i2ae418 urlParams["request-raw-url"] = rawUrl return NewItemThreadsItemReplyRequestBuilderInternal(urlParams, requestAdapter) } -// Post create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. The table in the Permissions section lists the resources that support open extensions. +// Post reply to a post and add a new post to the specified thread in a group conversation. You can specify both the parent conversation and thread in the request, or, you can specify just the parent thread without the parent conversation. // 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/opentypeextension-post-opentypeextension?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/post-reply?view=graph-rest-1.0 func (m *ItemThreadsItemReplyRequestBuilder) Post(ctx context.Context, body ItemThreadsItemReplyPostRequestBodyable, requestConfiguration *ItemThreadsItemReplyRequestBuilderPostRequestConfiguration)(error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -49,7 +49,7 @@ func (m *ItemThreadsItemReplyRequestBuilder) Post(ctx context.Context, body Item } return nil } -// ToPostRequestInformation create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. The table in the Permissions section lists the resources that support open extensions. +// ToPostRequestInformation reply to a post and add a new post to the specified thread in a group conversation. You can specify both the parent conversation and thread in the request, or, you can specify just the parent thread without the parent conversation. // returns a *RequestInformation when successful func (m *ItemThreadsItemReplyRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemThreadsItemReplyPostRequestBodyable, requestConfiguration *ItemThreadsItemReplyRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/groupswithuniquename/groups_with_unique_name_request_builder.go b/groupswithuniquename/groups_with_unique_name_request_builder.go index 58508e3998..e8d2c6c1b8 100644 --- a/groupswithuniquename/groups_with_unique_name_request_builder.go +++ b/groupswithuniquename/groups_with_unique_name_request_builder.go @@ -99,7 +99,7 @@ func (m *GroupsWithUniqueNameRequestBuilder) Get(ctx context.Context, requestCon } return res.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.Groupable), nil } -// Patch create a new group object if it doesn't exist, or update the properties of an existing group object.You can create or update the following types of group: By default, this operation returns only a subset of the properties for each group. For a list of properties that are returned by default, see thethe Properties section of the group resource. To get properties that are not returned by default, do a GET operation and specify the properties in a $select OData query option. +// Patch create a new group object if it doesn't exist, or update the properties of an existing group object.You can create or update the following types of group: By default, this operation returns only a subset of the properties for each group. For a list of properties that are returned by default, see the Properties section of the group resource. To get properties that are not returned by default, do a GET operation and specify the properties in a $select OData query option. // returns a Groupable when successful // returns a ODataError error when the service returns a 4XX or 5XX status code // [Find more info here] @@ -147,7 +147,7 @@ func (m *GroupsWithUniqueNameRequestBuilder) ToGetRequestInformation(ctx context requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPatchRequestInformation create a new group object if it doesn't exist, or update the properties of an existing group object.You can create or update the following types of group: By default, this operation returns only a subset of the properties for each group. For a list of properties that are returned by default, see thethe Properties section of the group resource. To get properties that are not returned by default, do a GET operation and specify the properties in a $select OData query option. +// ToPatchRequestInformation create a new group object if it doesn't exist, or update the properties of an existing group object.You can create or update the following types of group: By default, this operation returns only a subset of the properties for each group. For a list of properties that are returned by default, see the Properties section of the group resource. To get properties that are not returned by default, do a GET operation and specify the properties in a $select OData query option. // returns a *RequestInformation when successful func (m *GroupsWithUniqueNameRequestBuilder) ToPatchRequestInformation(ctx context.Context, body iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.Groupable, requestConfiguration *GroupsWithUniqueNameRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/identity/authentication_event_listeners_authentication_event_listener_item_request_builder.go b/identity/authentication_event_listeners_authentication_event_listener_item_request_builder.go new file mode 100644 index 0000000000..88fc5c3242 --- /dev/null +++ b/identity/authentication_event_listeners_authentication_event_listener_item_request_builder.go @@ -0,0 +1,157 @@ +package identity + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242 "github.com/microsoftgraph/msgraph-sdk-go/models" + ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a "github.com/microsoftgraph/msgraph-sdk-go/models/odataerrors" +) + +// AuthenticationEventListenersAuthenticationEventListenerItemRequestBuilder provides operations to manage the authenticationEventListeners property of the microsoft.graph.identityContainer entity. +type AuthenticationEventListenersAuthenticationEventListenerItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// AuthenticationEventListenersAuthenticationEventListenerItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type AuthenticationEventListenersAuthenticationEventListenerItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// AuthenticationEventListenersAuthenticationEventListenerItemRequestBuilderGetQueryParameters represents listeners for custom authentication extension events in Azure AD for workforce and customers. +type AuthenticationEventListenersAuthenticationEventListenerItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// AuthenticationEventListenersAuthenticationEventListenerItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type AuthenticationEventListenersAuthenticationEventListenerItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *AuthenticationEventListenersAuthenticationEventListenerItemRequestBuilderGetQueryParameters +} +// AuthenticationEventListenersAuthenticationEventListenerItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type AuthenticationEventListenersAuthenticationEventListenerItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewAuthenticationEventListenersAuthenticationEventListenerItemRequestBuilderInternal instantiates a new AuthenticationEventListenersAuthenticationEventListenerItemRequestBuilder and sets the default values. +func NewAuthenticationEventListenersAuthenticationEventListenerItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*AuthenticationEventListenersAuthenticationEventListenerItemRequestBuilder) { + m := &AuthenticationEventListenersAuthenticationEventListenerItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identity/authenticationEventListeners/{authenticationEventListener%2Did}{?%24expand,%24select}", pathParameters), + } + return m +} +// NewAuthenticationEventListenersAuthenticationEventListenerItemRequestBuilder instantiates a new AuthenticationEventListenersAuthenticationEventListenerItemRequestBuilder and sets the default values. +func NewAuthenticationEventListenersAuthenticationEventListenerItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*AuthenticationEventListenersAuthenticationEventListenerItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewAuthenticationEventListenersAuthenticationEventListenerItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property authenticationEventListeners for identity +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *AuthenticationEventListenersAuthenticationEventListenerItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *AuthenticationEventListenersAuthenticationEventListenerItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get represents listeners for custom authentication extension events in Azure AD for workforce and customers. +// returns a AuthenticationEventListenerable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *AuthenticationEventListenersAuthenticationEventListenerItemRequestBuilder) Get(ctx context.Context, requestConfiguration *AuthenticationEventListenersAuthenticationEventListenerItemRequestBuilderGetRequestConfiguration)(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.AuthenticationEventListenerable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CreateAuthenticationEventListenerFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.AuthenticationEventListenerable), nil +} +// Patch update the navigation property authenticationEventListeners in identity +// returns a AuthenticationEventListenerable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *AuthenticationEventListenersAuthenticationEventListenerItemRequestBuilder) Patch(ctx context.Context, body iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.AuthenticationEventListenerable, requestConfiguration *AuthenticationEventListenersAuthenticationEventListenerItemRequestBuilderPatchRequestConfiguration)(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.AuthenticationEventListenerable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CreateAuthenticationEventListenerFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.AuthenticationEventListenerable), nil +} +// ToDeleteRequestInformation delete navigation property authenticationEventListeners for identity +// returns a *RequestInformation when successful +func (m *AuthenticationEventListenersAuthenticationEventListenerItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *AuthenticationEventListenersAuthenticationEventListenerItemRequestBuilderDeleteRequestConfiguration)(*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 represents listeners for custom authentication extension events in Azure AD for workforce and customers. +// returns a *RequestInformation when successful +func (m *AuthenticationEventListenersAuthenticationEventListenerItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *AuthenticationEventListenersAuthenticationEventListenerItemRequestBuilderGetRequestConfiguration)(*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 authenticationEventListeners in identity +// returns a *RequestInformation when successful +func (m *AuthenticationEventListenersAuthenticationEventListenerItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.AuthenticationEventListenerable, requestConfiguration *AuthenticationEventListenersAuthenticationEventListenerItemRequestBuilderPatchRequestConfiguration)(*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 *AuthenticationEventListenersAuthenticationEventListenerItemRequestBuilder when successful +func (m *AuthenticationEventListenersAuthenticationEventListenerItemRequestBuilder) WithUrl(rawUrl string)(*AuthenticationEventListenersAuthenticationEventListenerItemRequestBuilder) { + return NewAuthenticationEventListenersAuthenticationEventListenerItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identity/authentication_event_listeners_count_request_builder.go b/identity/authentication_event_listeners_count_request_builder.go new file mode 100644 index 0000000000..15b9f3c9fd --- /dev/null +++ b/identity/authentication_event_listeners_count_request_builder.go @@ -0,0 +1,80 @@ +package identity + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a "github.com/microsoftgraph/msgraph-sdk-go/models/odataerrors" +) + +// AuthenticationEventListenersCountRequestBuilder provides operations to count the resources in the collection. +type AuthenticationEventListenersCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// AuthenticationEventListenersCountRequestBuilderGetQueryParameters get the number of the resource +type AuthenticationEventListenersCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// AuthenticationEventListenersCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type AuthenticationEventListenersCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *AuthenticationEventListenersCountRequestBuilderGetQueryParameters +} +// NewAuthenticationEventListenersCountRequestBuilderInternal instantiates a new AuthenticationEventListenersCountRequestBuilder and sets the default values. +func NewAuthenticationEventListenersCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*AuthenticationEventListenersCountRequestBuilder) { + m := &AuthenticationEventListenersCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identity/authenticationEventListeners/$count{?%24filter,%24search}", pathParameters), + } + return m +} +// NewAuthenticationEventListenersCountRequestBuilder instantiates a new AuthenticationEventListenersCountRequestBuilder and sets the default values. +func NewAuthenticationEventListenersCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*AuthenticationEventListenersCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewAuthenticationEventListenersCountRequestBuilderInternal(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 *AuthenticationEventListenersCountRequestBuilder) Get(ctx context.Context, requestConfiguration *AuthenticationEventListenersCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.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 *AuthenticationEventListenersCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *AuthenticationEventListenersCountRequestBuilderGetRequestConfiguration)(*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 *AuthenticationEventListenersCountRequestBuilder when successful +func (m *AuthenticationEventListenersCountRequestBuilder) WithUrl(rawUrl string)(*AuthenticationEventListenersCountRequestBuilder) { + return NewAuthenticationEventListenersCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identity/authentication_event_listeners_request_builder.go b/identity/authentication_event_listeners_request_builder.go new file mode 100644 index 0000000000..9e3a4abdd0 --- /dev/null +++ b/identity/authentication_event_listeners_request_builder.go @@ -0,0 +1,152 @@ +package identity + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242 "github.com/microsoftgraph/msgraph-sdk-go/models" + ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a "github.com/microsoftgraph/msgraph-sdk-go/models/odataerrors" +) + +// AuthenticationEventListenersRequestBuilder provides operations to manage the authenticationEventListeners property of the microsoft.graph.identityContainer entity. +type AuthenticationEventListenersRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// AuthenticationEventListenersRequestBuilderGetQueryParameters represents listeners for custom authentication extension events in Azure AD for workforce and customers. +type AuthenticationEventListenersRequestBuilderGetQueryParameters 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"` +} +// AuthenticationEventListenersRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type AuthenticationEventListenersRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *AuthenticationEventListenersRequestBuilderGetQueryParameters +} +// AuthenticationEventListenersRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type AuthenticationEventListenersRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByAuthenticationEventListenerId provides operations to manage the authenticationEventListeners property of the microsoft.graph.identityContainer entity. +// returns a *AuthenticationEventListenersAuthenticationEventListenerItemRequestBuilder when successful +func (m *AuthenticationEventListenersRequestBuilder) ByAuthenticationEventListenerId(authenticationEventListenerId string)(*AuthenticationEventListenersAuthenticationEventListenerItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if authenticationEventListenerId != "" { + urlTplParams["authenticationEventListener%2Did"] = authenticationEventListenerId + } + return NewAuthenticationEventListenersAuthenticationEventListenerItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewAuthenticationEventListenersRequestBuilderInternal instantiates a new AuthenticationEventListenersRequestBuilder and sets the default values. +func NewAuthenticationEventListenersRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*AuthenticationEventListenersRequestBuilder) { + m := &AuthenticationEventListenersRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identity/authenticationEventListeners{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters), + } + return m +} +// NewAuthenticationEventListenersRequestBuilder instantiates a new AuthenticationEventListenersRequestBuilder and sets the default values. +func NewAuthenticationEventListenersRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*AuthenticationEventListenersRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewAuthenticationEventListenersRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +// returns a *AuthenticationEventListenersCountRequestBuilder when successful +func (m *AuthenticationEventListenersRequestBuilder) Count()(*AuthenticationEventListenersCountRequestBuilder) { + return NewAuthenticationEventListenersCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get represents listeners for custom authentication extension events in Azure AD for workforce and customers. +// returns a AuthenticationEventListenerCollectionResponseable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *AuthenticationEventListenersRequestBuilder) Get(ctx context.Context, requestConfiguration *AuthenticationEventListenersRequestBuilderGetRequestConfiguration)(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.AuthenticationEventListenerCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CreateAuthenticationEventListenerCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.AuthenticationEventListenerCollectionResponseable), nil +} +// Post create new navigation property to authenticationEventListeners for identity +// returns a AuthenticationEventListenerable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *AuthenticationEventListenersRequestBuilder) Post(ctx context.Context, body iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.AuthenticationEventListenerable, requestConfiguration *AuthenticationEventListenersRequestBuilderPostRequestConfiguration)(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.AuthenticationEventListenerable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CreateAuthenticationEventListenerFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.AuthenticationEventListenerable), nil +} +// ToGetRequestInformation represents listeners for custom authentication extension events in Azure AD for workforce and customers. +// returns a *RequestInformation when successful +func (m *AuthenticationEventListenersRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *AuthenticationEventListenersRequestBuilderGetRequestConfiguration)(*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 new navigation property to authenticationEventListeners for identity +// returns a *RequestInformation when successful +func (m *AuthenticationEventListenersRequestBuilder) ToPostRequestInformation(ctx context.Context, body iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.AuthenticationEventListenerable, requestConfiguration *AuthenticationEventListenersRequestBuilderPostRequestConfiguration)(*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 *AuthenticationEventListenersRequestBuilder when successful +func (m *AuthenticationEventListenersRequestBuilder) WithUrl(rawUrl string)(*AuthenticationEventListenersRequestBuilder) { + return NewAuthenticationEventListenersRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identity/custom_authentication_extensions_count_request_builder.go b/identity/custom_authentication_extensions_count_request_builder.go new file mode 100644 index 0000000000..696223f0f5 --- /dev/null +++ b/identity/custom_authentication_extensions_count_request_builder.go @@ -0,0 +1,80 @@ +package identity + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a "github.com/microsoftgraph/msgraph-sdk-go/models/odataerrors" +) + +// CustomAuthenticationExtensionsCountRequestBuilder provides operations to count the resources in the collection. +type CustomAuthenticationExtensionsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// CustomAuthenticationExtensionsCountRequestBuilderGetQueryParameters get the number of the resource +type CustomAuthenticationExtensionsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// CustomAuthenticationExtensionsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CustomAuthenticationExtensionsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *CustomAuthenticationExtensionsCountRequestBuilderGetQueryParameters +} +// NewCustomAuthenticationExtensionsCountRequestBuilderInternal instantiates a new CustomAuthenticationExtensionsCountRequestBuilder and sets the default values. +func NewCustomAuthenticationExtensionsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CustomAuthenticationExtensionsCountRequestBuilder) { + m := &CustomAuthenticationExtensionsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identity/customAuthenticationExtensions/$count{?%24filter,%24search}", pathParameters), + } + return m +} +// NewCustomAuthenticationExtensionsCountRequestBuilder instantiates a new CustomAuthenticationExtensionsCountRequestBuilder and sets the default values. +func NewCustomAuthenticationExtensionsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CustomAuthenticationExtensionsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewCustomAuthenticationExtensionsCountRequestBuilderInternal(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 *CustomAuthenticationExtensionsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *CustomAuthenticationExtensionsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.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 *CustomAuthenticationExtensionsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *CustomAuthenticationExtensionsCountRequestBuilderGetRequestConfiguration)(*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 *CustomAuthenticationExtensionsCountRequestBuilder when successful +func (m *CustomAuthenticationExtensionsCountRequestBuilder) WithUrl(rawUrl string)(*CustomAuthenticationExtensionsCountRequestBuilder) { + return NewCustomAuthenticationExtensionsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identity/custom_authentication_extensions_custom_authentication_extension_item_request_builder.go b/identity/custom_authentication_extensions_custom_authentication_extension_item_request_builder.go new file mode 100644 index 0000000000..748bcbec63 --- /dev/null +++ b/identity/custom_authentication_extensions_custom_authentication_extension_item_request_builder.go @@ -0,0 +1,162 @@ +package identity + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242 "github.com/microsoftgraph/msgraph-sdk-go/models" + ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a "github.com/microsoftgraph/msgraph-sdk-go/models/odataerrors" +) + +// CustomAuthenticationExtensionsCustomAuthenticationExtensionItemRequestBuilder provides operations to manage the customAuthenticationExtensions property of the microsoft.graph.identityContainer entity. +type CustomAuthenticationExtensionsCustomAuthenticationExtensionItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// CustomAuthenticationExtensionsCustomAuthenticationExtensionItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CustomAuthenticationExtensionsCustomAuthenticationExtensionItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// CustomAuthenticationExtensionsCustomAuthenticationExtensionItemRequestBuilderGetQueryParameters represents custom extensions to authentication flows in Azure AD for workforce and customers. +type CustomAuthenticationExtensionsCustomAuthenticationExtensionItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// CustomAuthenticationExtensionsCustomAuthenticationExtensionItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CustomAuthenticationExtensionsCustomAuthenticationExtensionItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *CustomAuthenticationExtensionsCustomAuthenticationExtensionItemRequestBuilderGetQueryParameters +} +// CustomAuthenticationExtensionsCustomAuthenticationExtensionItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CustomAuthenticationExtensionsCustomAuthenticationExtensionItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewCustomAuthenticationExtensionsCustomAuthenticationExtensionItemRequestBuilderInternal instantiates a new CustomAuthenticationExtensionsCustomAuthenticationExtensionItemRequestBuilder and sets the default values. +func NewCustomAuthenticationExtensionsCustomAuthenticationExtensionItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CustomAuthenticationExtensionsCustomAuthenticationExtensionItemRequestBuilder) { + m := &CustomAuthenticationExtensionsCustomAuthenticationExtensionItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identity/customAuthenticationExtensions/{customAuthenticationExtension%2Did}{?%24expand,%24select}", pathParameters), + } + return m +} +// NewCustomAuthenticationExtensionsCustomAuthenticationExtensionItemRequestBuilder instantiates a new CustomAuthenticationExtensionsCustomAuthenticationExtensionItemRequestBuilder and sets the default values. +func NewCustomAuthenticationExtensionsCustomAuthenticationExtensionItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CustomAuthenticationExtensionsCustomAuthenticationExtensionItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewCustomAuthenticationExtensionsCustomAuthenticationExtensionItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property customAuthenticationExtensions for identity +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *CustomAuthenticationExtensionsCustomAuthenticationExtensionItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *CustomAuthenticationExtensionsCustomAuthenticationExtensionItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get represents custom extensions to authentication flows in Azure AD for workforce and customers. +// returns a CustomAuthenticationExtensionable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *CustomAuthenticationExtensionsCustomAuthenticationExtensionItemRequestBuilder) Get(ctx context.Context, requestConfiguration *CustomAuthenticationExtensionsCustomAuthenticationExtensionItemRequestBuilderGetRequestConfiguration)(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CustomAuthenticationExtensionable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CreateCustomAuthenticationExtensionFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CustomAuthenticationExtensionable), nil +} +// Patch update the navigation property customAuthenticationExtensions in identity +// returns a CustomAuthenticationExtensionable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *CustomAuthenticationExtensionsCustomAuthenticationExtensionItemRequestBuilder) Patch(ctx context.Context, body iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CustomAuthenticationExtensionable, requestConfiguration *CustomAuthenticationExtensionsCustomAuthenticationExtensionItemRequestBuilderPatchRequestConfiguration)(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CustomAuthenticationExtensionable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CreateCustomAuthenticationExtensionFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CustomAuthenticationExtensionable), nil +} +// ToDeleteRequestInformation delete navigation property customAuthenticationExtensions for identity +// returns a *RequestInformation when successful +func (m *CustomAuthenticationExtensionsCustomAuthenticationExtensionItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *CustomAuthenticationExtensionsCustomAuthenticationExtensionItemRequestBuilderDeleteRequestConfiguration)(*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 represents custom extensions to authentication flows in Azure AD for workforce and customers. +// returns a *RequestInformation when successful +func (m *CustomAuthenticationExtensionsCustomAuthenticationExtensionItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *CustomAuthenticationExtensionsCustomAuthenticationExtensionItemRequestBuilderGetRequestConfiguration)(*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 customAuthenticationExtensions in identity +// returns a *RequestInformation when successful +func (m *CustomAuthenticationExtensionsCustomAuthenticationExtensionItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CustomAuthenticationExtensionable, requestConfiguration *CustomAuthenticationExtensionsCustomAuthenticationExtensionItemRequestBuilderPatchRequestConfiguration)(*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 +} +// ValidateAuthenticationConfiguration provides operations to call the validateAuthenticationConfiguration method. +// returns a *CustomAuthenticationExtensionsItemValidateAuthenticationConfigurationRequestBuilder when successful +func (m *CustomAuthenticationExtensionsCustomAuthenticationExtensionItemRequestBuilder) ValidateAuthenticationConfiguration()(*CustomAuthenticationExtensionsItemValidateAuthenticationConfigurationRequestBuilder) { + return NewCustomAuthenticationExtensionsItemValidateAuthenticationConfigurationRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *CustomAuthenticationExtensionsCustomAuthenticationExtensionItemRequestBuilder when successful +func (m *CustomAuthenticationExtensionsCustomAuthenticationExtensionItemRequestBuilder) WithUrl(rawUrl string)(*CustomAuthenticationExtensionsCustomAuthenticationExtensionItemRequestBuilder) { + return NewCustomAuthenticationExtensionsCustomAuthenticationExtensionItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identity/custom_authentication_extensions_item_validate_authentication_configuration_request_builder.go b/identity/custom_authentication_extensions_item_validate_authentication_configuration_request_builder.go new file mode 100644 index 0000000000..2658323fe9 --- /dev/null +++ b/identity/custom_authentication_extensions_item_validate_authentication_configuration_request_builder.go @@ -0,0 +1,72 @@ +package identity + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242 "github.com/microsoftgraph/msgraph-sdk-go/models" + ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a "github.com/microsoftgraph/msgraph-sdk-go/models/odataerrors" +) + +// CustomAuthenticationExtensionsItemValidateAuthenticationConfigurationRequestBuilder provides operations to call the validateAuthenticationConfiguration method. +type CustomAuthenticationExtensionsItemValidateAuthenticationConfigurationRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// CustomAuthenticationExtensionsItemValidateAuthenticationConfigurationRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CustomAuthenticationExtensionsItemValidateAuthenticationConfigurationRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewCustomAuthenticationExtensionsItemValidateAuthenticationConfigurationRequestBuilderInternal instantiates a new CustomAuthenticationExtensionsItemValidateAuthenticationConfigurationRequestBuilder and sets the default values. +func NewCustomAuthenticationExtensionsItemValidateAuthenticationConfigurationRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CustomAuthenticationExtensionsItemValidateAuthenticationConfigurationRequestBuilder) { + m := &CustomAuthenticationExtensionsItemValidateAuthenticationConfigurationRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identity/customAuthenticationExtensions/{customAuthenticationExtension%2Did}/validateAuthenticationConfiguration", pathParameters), + } + return m +} +// NewCustomAuthenticationExtensionsItemValidateAuthenticationConfigurationRequestBuilder instantiates a new CustomAuthenticationExtensionsItemValidateAuthenticationConfigurationRequestBuilder and sets the default values. +func NewCustomAuthenticationExtensionsItemValidateAuthenticationConfigurationRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CustomAuthenticationExtensionsItemValidateAuthenticationConfigurationRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewCustomAuthenticationExtensionsItemValidateAuthenticationConfigurationRequestBuilderInternal(urlParams, requestAdapter) +} +// Post an API to check validity of the endpoint and and authentication configuration for a customAuthenticationExtension. +// returns a AuthenticationConfigurationValidationable 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/customauthenticationextension-validateauthenticationconfiguration?view=graph-rest-1.0 +func (m *CustomAuthenticationExtensionsItemValidateAuthenticationConfigurationRequestBuilder) Post(ctx context.Context, requestConfiguration *CustomAuthenticationExtensionsItemValidateAuthenticationConfigurationRequestBuilderPostRequestConfiguration)(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.AuthenticationConfigurationValidationable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CreateAuthenticationConfigurationValidationFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.AuthenticationConfigurationValidationable), nil +} +// ToPostRequestInformation an API to check validity of the endpoint and and authentication configuration for a customAuthenticationExtension. +// returns a *RequestInformation when successful +func (m *CustomAuthenticationExtensionsItemValidateAuthenticationConfigurationRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *CustomAuthenticationExtensionsItemValidateAuthenticationConfigurationRequestBuilderPostRequestConfiguration)(*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 *CustomAuthenticationExtensionsItemValidateAuthenticationConfigurationRequestBuilder when successful +func (m *CustomAuthenticationExtensionsItemValidateAuthenticationConfigurationRequestBuilder) WithUrl(rawUrl string)(*CustomAuthenticationExtensionsItemValidateAuthenticationConfigurationRequestBuilder) { + return NewCustomAuthenticationExtensionsItemValidateAuthenticationConfigurationRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identity/custom_authentication_extensions_request_builder.go b/identity/custom_authentication_extensions_request_builder.go new file mode 100644 index 0000000000..7b89384915 --- /dev/null +++ b/identity/custom_authentication_extensions_request_builder.go @@ -0,0 +1,157 @@ +package identity + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242 "github.com/microsoftgraph/msgraph-sdk-go/models" + ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a "github.com/microsoftgraph/msgraph-sdk-go/models/odataerrors" +) + +// CustomAuthenticationExtensionsRequestBuilder provides operations to manage the customAuthenticationExtensions property of the microsoft.graph.identityContainer entity. +type CustomAuthenticationExtensionsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// CustomAuthenticationExtensionsRequestBuilderGetQueryParameters represents custom extensions to authentication flows in Azure AD for workforce and customers. +type CustomAuthenticationExtensionsRequestBuilderGetQueryParameters 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"` +} +// CustomAuthenticationExtensionsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CustomAuthenticationExtensionsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *CustomAuthenticationExtensionsRequestBuilderGetQueryParameters +} +// CustomAuthenticationExtensionsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CustomAuthenticationExtensionsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByCustomAuthenticationExtensionId provides operations to manage the customAuthenticationExtensions property of the microsoft.graph.identityContainer entity. +// returns a *CustomAuthenticationExtensionsCustomAuthenticationExtensionItemRequestBuilder when successful +func (m *CustomAuthenticationExtensionsRequestBuilder) ByCustomAuthenticationExtensionId(customAuthenticationExtensionId string)(*CustomAuthenticationExtensionsCustomAuthenticationExtensionItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if customAuthenticationExtensionId != "" { + urlTplParams["customAuthenticationExtension%2Did"] = customAuthenticationExtensionId + } + return NewCustomAuthenticationExtensionsCustomAuthenticationExtensionItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewCustomAuthenticationExtensionsRequestBuilderInternal instantiates a new CustomAuthenticationExtensionsRequestBuilder and sets the default values. +func NewCustomAuthenticationExtensionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CustomAuthenticationExtensionsRequestBuilder) { + m := &CustomAuthenticationExtensionsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identity/customAuthenticationExtensions{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters), + } + return m +} +// NewCustomAuthenticationExtensionsRequestBuilder instantiates a new CustomAuthenticationExtensionsRequestBuilder and sets the default values. +func NewCustomAuthenticationExtensionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CustomAuthenticationExtensionsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewCustomAuthenticationExtensionsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +// returns a *CustomAuthenticationExtensionsCountRequestBuilder when successful +func (m *CustomAuthenticationExtensionsRequestBuilder) Count()(*CustomAuthenticationExtensionsCountRequestBuilder) { + return NewCustomAuthenticationExtensionsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get represents custom extensions to authentication flows in Azure AD for workforce and customers. +// returns a CustomAuthenticationExtensionCollectionResponseable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *CustomAuthenticationExtensionsRequestBuilder) Get(ctx context.Context, requestConfiguration *CustomAuthenticationExtensionsRequestBuilderGetRequestConfiguration)(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CustomAuthenticationExtensionCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CreateCustomAuthenticationExtensionCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CustomAuthenticationExtensionCollectionResponseable), nil +} +// Post create new navigation property to customAuthenticationExtensions for identity +// returns a CustomAuthenticationExtensionable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *CustomAuthenticationExtensionsRequestBuilder) Post(ctx context.Context, body iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CustomAuthenticationExtensionable, requestConfiguration *CustomAuthenticationExtensionsRequestBuilderPostRequestConfiguration)(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CustomAuthenticationExtensionable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CreateCustomAuthenticationExtensionFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CustomAuthenticationExtensionable), nil +} +// ToGetRequestInformation represents custom extensions to authentication flows in Azure AD for workforce and customers. +// returns a *RequestInformation when successful +func (m *CustomAuthenticationExtensionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *CustomAuthenticationExtensionsRequestBuilderGetRequestConfiguration)(*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 new navigation property to customAuthenticationExtensions for identity +// returns a *RequestInformation when successful +func (m *CustomAuthenticationExtensionsRequestBuilder) ToPostRequestInformation(ctx context.Context, body iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CustomAuthenticationExtensionable, requestConfiguration *CustomAuthenticationExtensionsRequestBuilderPostRequestConfiguration)(*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 +} +// ValidateAuthenticationConfiguration provides operations to call the validateAuthenticationConfiguration method. +// returns a *CustomAuthenticationExtensionsValidateAuthenticationConfigurationRequestBuilder when successful +func (m *CustomAuthenticationExtensionsRequestBuilder) ValidateAuthenticationConfiguration()(*CustomAuthenticationExtensionsValidateAuthenticationConfigurationRequestBuilder) { + return NewCustomAuthenticationExtensionsValidateAuthenticationConfigurationRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *CustomAuthenticationExtensionsRequestBuilder when successful +func (m *CustomAuthenticationExtensionsRequestBuilder) WithUrl(rawUrl string)(*CustomAuthenticationExtensionsRequestBuilder) { + return NewCustomAuthenticationExtensionsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identity/custom_authentication_extensions_validate_authentication_configuration_post_request_body.go b/identity/custom_authentication_extensions_validate_authentication_configuration_post_request_body.go new file mode 100644 index 0000000000..5cfa820995 --- /dev/null +++ b/identity/custom_authentication_extensions_validate_authentication_configuration_post_request_body.go @@ -0,0 +1,151 @@ +package identity + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242 "github.com/microsoftgraph/msgraph-sdk-go/models" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +type CustomAuthenticationExtensionsValidateAuthenticationConfigurationPostRequestBody struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewCustomAuthenticationExtensionsValidateAuthenticationConfigurationPostRequestBody instantiates a new CustomAuthenticationExtensionsValidateAuthenticationConfigurationPostRequestBody and sets the default values. +func NewCustomAuthenticationExtensionsValidateAuthenticationConfigurationPostRequestBody()(*CustomAuthenticationExtensionsValidateAuthenticationConfigurationPostRequestBody) { + m := &CustomAuthenticationExtensionsValidateAuthenticationConfigurationPostRequestBody{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCustomAuthenticationExtensionsValidateAuthenticationConfigurationPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCustomAuthenticationExtensionsValidateAuthenticationConfigurationPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCustomAuthenticationExtensionsValidateAuthenticationConfigurationPostRequestBody(), 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 *CustomAuthenticationExtensionsValidateAuthenticationConfigurationPostRequestBody) 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) +} +// GetAuthenticationConfiguration gets the authenticationConfiguration property value. The authenticationConfiguration property +// returns a CustomExtensionAuthenticationConfigurationable when successful +func (m *CustomAuthenticationExtensionsValidateAuthenticationConfigurationPostRequestBody) GetAuthenticationConfiguration()(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CustomExtensionAuthenticationConfigurationable) { + val, err := m.GetBackingStore().Get("authenticationConfiguration") + if err != nil { + panic(err) + } + if val != nil { + return val.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CustomExtensionAuthenticationConfigurationable) + } + return nil +} +// GetBackingStore gets the BackingStore property value. Stores model information. +// returns a BackingStore when successful +func (m *CustomAuthenticationExtensionsValidateAuthenticationConfigurationPostRequestBody) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetEndpointConfiguration gets the endpointConfiguration property value. The endpointConfiguration property +// returns a CustomExtensionEndpointConfigurationable when successful +func (m *CustomAuthenticationExtensionsValidateAuthenticationConfigurationPostRequestBody) GetEndpointConfiguration()(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CustomExtensionEndpointConfigurationable) { + val, err := m.GetBackingStore().Get("endpointConfiguration") + if err != nil { + panic(err) + } + if val != nil { + return val.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CustomExtensionEndpointConfigurationable) + } + return nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CustomAuthenticationExtensionsValidateAuthenticationConfigurationPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["authenticationConfiguration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CreateCustomExtensionAuthenticationConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAuthenticationConfiguration(val.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CustomExtensionAuthenticationConfigurationable)) + } + return nil + } + res["endpointConfiguration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CreateCustomExtensionEndpointConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetEndpointConfiguration(val.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CustomExtensionEndpointConfigurationable)) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *CustomAuthenticationExtensionsValidateAuthenticationConfigurationPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("authenticationConfiguration", m.GetAuthenticationConfiguration()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("endpointConfiguration", m.GetEndpointConfiguration()) + 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 *CustomAuthenticationExtensionsValidateAuthenticationConfigurationPostRequestBody) SetAdditionalData(value map[string]any)() { + err := m.GetBackingStore().Set("additionalData", value) + if err != nil { + panic(err) + } +} +// SetAuthenticationConfiguration sets the authenticationConfiguration property value. The authenticationConfiguration property +func (m *CustomAuthenticationExtensionsValidateAuthenticationConfigurationPostRequestBody) SetAuthenticationConfiguration(value iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CustomExtensionAuthenticationConfigurationable)() { + err := m.GetBackingStore().Set("authenticationConfiguration", value) + if err != nil { + panic(err) + } +} +// SetBackingStore sets the BackingStore property value. Stores model information. +func (m *CustomAuthenticationExtensionsValidateAuthenticationConfigurationPostRequestBody) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetEndpointConfiguration sets the endpointConfiguration property value. The endpointConfiguration property +func (m *CustomAuthenticationExtensionsValidateAuthenticationConfigurationPostRequestBody) SetEndpointConfiguration(value iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CustomExtensionEndpointConfigurationable)() { + err := m.GetBackingStore().Set("endpointConfiguration", value) + if err != nil { + panic(err) + } +} +type CustomAuthenticationExtensionsValidateAuthenticationConfigurationPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthenticationConfiguration()(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CustomExtensionAuthenticationConfigurationable) + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetEndpointConfiguration()(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CustomExtensionEndpointConfigurationable) + SetAuthenticationConfiguration(value iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CustomExtensionAuthenticationConfigurationable)() + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetEndpointConfiguration(value iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CustomExtensionEndpointConfigurationable)() +} diff --git a/identity/custom_authentication_extensions_validate_authentication_configuration_request_builder.go b/identity/custom_authentication_extensions_validate_authentication_configuration_request_builder.go new file mode 100644 index 0000000000..ce3192bcd5 --- /dev/null +++ b/identity/custom_authentication_extensions_validate_authentication_configuration_request_builder.go @@ -0,0 +1,73 @@ +package identity + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242 "github.com/microsoftgraph/msgraph-sdk-go/models" + ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a "github.com/microsoftgraph/msgraph-sdk-go/models/odataerrors" +) + +// CustomAuthenticationExtensionsValidateAuthenticationConfigurationRequestBuilder provides operations to call the validateAuthenticationConfiguration method. +type CustomAuthenticationExtensionsValidateAuthenticationConfigurationRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// CustomAuthenticationExtensionsValidateAuthenticationConfigurationRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CustomAuthenticationExtensionsValidateAuthenticationConfigurationRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewCustomAuthenticationExtensionsValidateAuthenticationConfigurationRequestBuilderInternal instantiates a new CustomAuthenticationExtensionsValidateAuthenticationConfigurationRequestBuilder and sets the default values. +func NewCustomAuthenticationExtensionsValidateAuthenticationConfigurationRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CustomAuthenticationExtensionsValidateAuthenticationConfigurationRequestBuilder) { + m := &CustomAuthenticationExtensionsValidateAuthenticationConfigurationRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/identity/customAuthenticationExtensions/validateAuthenticationConfiguration", pathParameters), + } + return m +} +// NewCustomAuthenticationExtensionsValidateAuthenticationConfigurationRequestBuilder instantiates a new CustomAuthenticationExtensionsValidateAuthenticationConfigurationRequestBuilder and sets the default values. +func NewCustomAuthenticationExtensionsValidateAuthenticationConfigurationRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CustomAuthenticationExtensionsValidateAuthenticationConfigurationRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewCustomAuthenticationExtensionsValidateAuthenticationConfigurationRequestBuilderInternal(urlParams, requestAdapter) +} +// Post invoke action validateAuthenticationConfiguration +// returns a AuthenticationConfigurationValidationable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *CustomAuthenticationExtensionsValidateAuthenticationConfigurationRequestBuilder) Post(ctx context.Context, body CustomAuthenticationExtensionsValidateAuthenticationConfigurationPostRequestBodyable, requestConfiguration *CustomAuthenticationExtensionsValidateAuthenticationConfigurationRequestBuilderPostRequestConfiguration)(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.AuthenticationConfigurationValidationable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CreateAuthenticationConfigurationValidationFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.AuthenticationConfigurationValidationable), nil +} +// ToPostRequestInformation invoke action validateAuthenticationConfiguration +// returns a *RequestInformation when successful +func (m *CustomAuthenticationExtensionsValidateAuthenticationConfigurationRequestBuilder) ToPostRequestInformation(ctx context.Context, body CustomAuthenticationExtensionsValidateAuthenticationConfigurationPostRequestBodyable, requestConfiguration *CustomAuthenticationExtensionsValidateAuthenticationConfigurationRequestBuilderPostRequestConfiguration)(*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 *CustomAuthenticationExtensionsValidateAuthenticationConfigurationRequestBuilder when successful +func (m *CustomAuthenticationExtensionsValidateAuthenticationConfigurationRequestBuilder) WithUrl(rawUrl string)(*CustomAuthenticationExtensionsValidateAuthenticationConfigurationRequestBuilder) { + return NewCustomAuthenticationExtensionsValidateAuthenticationConfigurationRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identity/identity_request_builder.go b/identity/identity_request_builder.go index e936545607..7a1ee14d72 100644 --- a/identity/identity_request_builder.go +++ b/identity/identity_request_builder.go @@ -39,6 +39,11 @@ type IdentityRequestBuilderPatchRequestConfiguration struct { func (m *IdentityRequestBuilder) ApiConnectors()(*ApiConnectorsRequestBuilder) { return NewApiConnectorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// AuthenticationEventListeners provides operations to manage the authenticationEventListeners property of the microsoft.graph.identityContainer entity. +// returns a *AuthenticationEventListenersRequestBuilder when successful +func (m *IdentityRequestBuilder) AuthenticationEventListeners()(*AuthenticationEventListenersRequestBuilder) { + return NewAuthenticationEventListenersRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // B2xUserFlows provides operations to manage the b2xUserFlows property of the microsoft.graph.identityContainer entity. // returns a *B2xUserFlowsRequestBuilder when successful func (m *IdentityRequestBuilder) B2xUserFlows()(*B2xUserFlowsRequestBuilder) { @@ -62,6 +67,11 @@ func NewIdentityRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee26337 urlParams["request-raw-url"] = rawUrl return NewIdentityRequestBuilderInternal(urlParams, requestAdapter) } +// CustomAuthenticationExtensions provides operations to manage the customAuthenticationExtensions property of the microsoft.graph.identityContainer entity. +// returns a *CustomAuthenticationExtensionsRequestBuilder when successful +func (m *IdentityRequestBuilder) CustomAuthenticationExtensions()(*CustomAuthenticationExtensionsRequestBuilder) { + return NewCustomAuthenticationExtensionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // Get get identity // returns a IdentityContainerable when successful // returns a ODataError error when the service returns a 4XX or 5XX status code diff --git a/kiota-lock.json b/kiota-lock.json index 64415c2c93..c1eec73cff 100644 --- a/kiota-lock.json +++ b/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "1FA5A73C80B5B535C74165934EA57BBEB80E01CB91CFC4F4F6B7B21D613B71AD4B9942DDE4150AD865F37B2475B998C472AC4C243BEFBF39F50240D410AC2250", + "descriptionHash": "801A3D86D0C29399A3F7783193B0E8E23B6655E770F29AC921BEF74DBE2E1AEC745EFCA886EAE8672A562EDB72EF4F4D98214A68C8FF2751573677EB5F23C668", "descriptionLocation": "../../msgraph-metadata/clean_v10_openapi/openapi.yaml", "lockFileVersion": "1.0.0", "kiotaVersion": "1.14.0", diff --git a/models/authentication_condition_application.go b/models/authentication_condition_application.go new file mode 100644 index 0000000000..854f11dae0 --- /dev/null +++ b/models/authentication_condition_application.go @@ -0,0 +1,150 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +type AuthenticationConditionApplication struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewAuthenticationConditionApplication instantiates a new AuthenticationConditionApplication and sets the default values. +func NewAuthenticationConditionApplication()(*AuthenticationConditionApplication) { + m := &AuthenticationConditionApplication{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateAuthenticationConditionApplicationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateAuthenticationConditionApplicationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuthenticationConditionApplication(), 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 *AuthenticationConditionApplication) 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) +} +// GetAppId gets the appId property value. The identifier for an application corresponding to a condition that triggers an authenticationEventListener. +// returns a *string when successful +func (m *AuthenticationConditionApplication) GetAppId()(*string) { + val, err := m.GetBackingStore().Get("appId") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetBackingStore gets the BackingStore property value. Stores model information. +// returns a BackingStore when successful +func (m *AuthenticationConditionApplication) 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 *AuthenticationConditionApplication) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["appId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAppId(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 *AuthenticationConditionApplication) 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 *AuthenticationConditionApplication) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("appId", m.GetAppId()) + if err != nil { + return err + } + } + { + 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 *AuthenticationConditionApplication) SetAdditionalData(value map[string]any)() { + err := m.GetBackingStore().Set("additionalData", value) + if err != nil { + panic(err) + } +} +// SetAppId sets the appId property value. The identifier for an application corresponding to a condition that triggers an authenticationEventListener. +func (m *AuthenticationConditionApplication) SetAppId(value *string)() { + err := m.GetBackingStore().Set("appId", value) + if err != nil { + panic(err) + } +} +// SetBackingStore sets the BackingStore property value. Stores model information. +func (m *AuthenticationConditionApplication) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AuthenticationConditionApplication) SetOdataType(value *string)() { + err := m.GetBackingStore().Set("odataType", value) + if err != nil { + panic(err) + } +} +type AuthenticationConditionApplicationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppId()(*string) + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetOdataType()(*string) + SetAppId(value *string)() + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetOdataType(value *string)() +} diff --git a/models/authentication_conditions.go b/models/authentication_conditions.go new file mode 100644 index 0000000000..382e1338b3 --- /dev/null +++ b/models/authentication_conditions.go @@ -0,0 +1,150 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +type AuthenticationConditions struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewAuthenticationConditions instantiates a new AuthenticationConditions and sets the default values. +func NewAuthenticationConditions()(*AuthenticationConditions) { + m := &AuthenticationConditions{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateAuthenticationConditionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateAuthenticationConditionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuthenticationConditions(), 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 *AuthenticationConditions) 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) +} +// GetApplications gets the applications property value. Applications which trigger a custom authentication extension. +// returns a AuthenticationConditionsApplicationsable when successful +func (m *AuthenticationConditions) GetApplications()(AuthenticationConditionsApplicationsable) { + val, err := m.GetBackingStore().Get("applications") + if err != nil { + panic(err) + } + if val != nil { + return val.(AuthenticationConditionsApplicationsable) + } + return nil +} +// GetBackingStore gets the BackingStore property value. Stores model information. +// returns a BackingStore when successful +func (m *AuthenticationConditions) 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 *AuthenticationConditions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["applications"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAuthenticationConditionsApplicationsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetApplications(val.(AuthenticationConditionsApplicationsable)) + } + 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 *AuthenticationConditions) 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 *AuthenticationConditions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("applications", m.GetApplications()) + if err != nil { + return err + } + } + { + 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 *AuthenticationConditions) SetAdditionalData(value map[string]any)() { + err := m.GetBackingStore().Set("additionalData", value) + if err != nil { + panic(err) + } +} +// SetApplications sets the applications property value. Applications which trigger a custom authentication extension. +func (m *AuthenticationConditions) SetApplications(value AuthenticationConditionsApplicationsable)() { + err := m.GetBackingStore().Set("applications", value) + if err != nil { + panic(err) + } +} +// SetBackingStore sets the BackingStore property value. Stores model information. +func (m *AuthenticationConditions) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AuthenticationConditions) SetOdataType(value *string)() { + err := m.GetBackingStore().Set("odataType", value) + if err != nil { + panic(err) + } +} +type AuthenticationConditionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApplications()(AuthenticationConditionsApplicationsable) + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetOdataType()(*string) + SetApplications(value AuthenticationConditionsApplicationsable)() + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetOdataType(value *string)() +} diff --git a/models/authentication_conditions_applications.go b/models/authentication_conditions_applications.go new file mode 100644 index 0000000000..052e245e5a --- /dev/null +++ b/models/authentication_conditions_applications.go @@ -0,0 +1,162 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +type AuthenticationConditionsApplications struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewAuthenticationConditionsApplications instantiates a new AuthenticationConditionsApplications and sets the default values. +func NewAuthenticationConditionsApplications()(*AuthenticationConditionsApplications) { + m := &AuthenticationConditionsApplications{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateAuthenticationConditionsApplicationsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateAuthenticationConditionsApplicationsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuthenticationConditionsApplications(), 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 *AuthenticationConditionsApplications) 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 *AuthenticationConditionsApplications) 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 *AuthenticationConditionsApplications) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["includeApplications"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAuthenticationConditionApplicationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AuthenticationConditionApplicationable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(AuthenticationConditionApplicationable) + } + } + m.SetIncludeApplications(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 + } + return res +} +// GetIncludeApplications gets the includeApplications property value. The includeApplications property +// returns a []AuthenticationConditionApplicationable when successful +func (m *AuthenticationConditionsApplications) GetIncludeApplications()([]AuthenticationConditionApplicationable) { + val, err := m.GetBackingStore().Get("includeApplications") + if err != nil { + panic(err) + } + if val != nil { + return val.([]AuthenticationConditionApplicationable) + } + return nil +} +// GetOdataType gets the @odata.type property value. The OdataType property +// returns a *string when successful +func (m *AuthenticationConditionsApplications) 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 *AuthenticationConditionsApplications) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetIncludeApplications() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncludeApplications())) + for i, v := range m.GetIncludeApplications() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("includeApplications", cast) + if err != nil { + return err + } + } + { + 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 *AuthenticationConditionsApplications) 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 *AuthenticationConditionsApplications) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetIncludeApplications sets the includeApplications property value. The includeApplications property +func (m *AuthenticationConditionsApplications) SetIncludeApplications(value []AuthenticationConditionApplicationable)() { + err := m.GetBackingStore().Set("includeApplications", value) + if err != nil { + panic(err) + } +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AuthenticationConditionsApplications) SetOdataType(value *string)() { + err := m.GetBackingStore().Set("odataType", value) + if err != nil { + panic(err) + } +} +type AuthenticationConditionsApplicationsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetIncludeApplications()([]AuthenticationConditionApplicationable) + GetOdataType()(*string) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetIncludeApplications(value []AuthenticationConditionApplicationable)() + SetOdataType(value *string)() +} diff --git a/models/authentication_configuration_validation.go b/models/authentication_configuration_validation.go new file mode 100644 index 0000000000..10bc00c237 --- /dev/null +++ b/models/authentication_configuration_validation.go @@ -0,0 +1,211 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +type AuthenticationConfigurationValidation struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewAuthenticationConfigurationValidation instantiates a new AuthenticationConfigurationValidation and sets the default values. +func NewAuthenticationConfigurationValidation()(*AuthenticationConfigurationValidation) { + m := &AuthenticationConfigurationValidation{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateAuthenticationConfigurationValidationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateAuthenticationConfigurationValidationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuthenticationConfigurationValidation(), 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 *AuthenticationConfigurationValidation) 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 *AuthenticationConfigurationValidation) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetErrors gets the errors property value. Errors in the validation result of a customAuthenticationExtension. +// returns a []GenericErrorable when successful +func (m *AuthenticationConfigurationValidation) GetErrors()([]GenericErrorable) { + val, err := m.GetBackingStore().Get("errors") + if err != nil { + panic(err) + } + if val != nil { + return val.([]GenericErrorable) + } + return nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *AuthenticationConfigurationValidation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["errors"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGenericErrorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GenericErrorable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(GenericErrorable) + } + } + m.SetErrors(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["warnings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGenericErrorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GenericErrorable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(GenericErrorable) + } + } + m.SetWarnings(res) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +// returns a *string when successful +func (m *AuthenticationConfigurationValidation) GetOdataType()(*string) { + val, err := m.GetBackingStore().Get("odataType") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetWarnings gets the warnings property value. Warnings in the validation result of a customAuthenticationExtension. +// returns a []GenericErrorable when successful +func (m *AuthenticationConfigurationValidation) GetWarnings()([]GenericErrorable) { + val, err := m.GetBackingStore().Get("warnings") + if err != nil { + panic(err) + } + if val != nil { + return val.([]GenericErrorable) + } + return nil +} +// Serialize serializes information the current object +func (m *AuthenticationConfigurationValidation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetErrors() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetErrors())) + for i, v := range m.GetErrors() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("errors", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetWarnings() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetWarnings())) + for i, v := range m.GetWarnings() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("warnings", 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 *AuthenticationConfigurationValidation) 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 *AuthenticationConfigurationValidation) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetErrors sets the errors property value. Errors in the validation result of a customAuthenticationExtension. +func (m *AuthenticationConfigurationValidation) SetErrors(value []GenericErrorable)() { + err := m.GetBackingStore().Set("errors", value) + if err != nil { + panic(err) + } +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AuthenticationConfigurationValidation) SetOdataType(value *string)() { + err := m.GetBackingStore().Set("odataType", value) + if err != nil { + panic(err) + } +} +// SetWarnings sets the warnings property value. Warnings in the validation result of a customAuthenticationExtension. +func (m *AuthenticationConfigurationValidation) SetWarnings(value []GenericErrorable)() { + err := m.GetBackingStore().Set("warnings", value) + if err != nil { + panic(err) + } +} +type AuthenticationConfigurationValidationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetErrors()([]GenericErrorable) + GetOdataType()(*string) + GetWarnings()([]GenericErrorable) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetErrors(value []GenericErrorable)() + SetOdataType(value *string)() + SetWarnings(value []GenericErrorable)() +} diff --git a/models/authentication_event_listener.go b/models/authentication_event_listener.go new file mode 100644 index 0000000000..161c6e4bff --- /dev/null +++ b/models/authentication_event_listener.go @@ -0,0 +1,131 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type AuthenticationEventListener struct { + Entity +} +// NewAuthenticationEventListener instantiates a new AuthenticationEventListener and sets the default values. +func NewAuthenticationEventListener()(*AuthenticationEventListener) { + m := &AuthenticationEventListener{ + Entity: *NewEntity(), + } + return m +} +// CreateAuthenticationEventListenerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateAuthenticationEventListenerFromDiscriminatorValue(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.onTokenIssuanceStartListener": + return NewOnTokenIssuanceStartListener(), nil + } + } + } + } + return NewAuthenticationEventListener(), nil +} +// GetAuthenticationEventsFlowId gets the authenticationEventsFlowId property value. The authenticationEventsFlowId property +// returns a *string when successful +func (m *AuthenticationEventListener) GetAuthenticationEventsFlowId()(*string) { + val, err := m.GetBackingStore().Get("authenticationEventsFlowId") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetConditions gets the conditions property value. The conditions on which this authenticationEventListener should trigger. +// returns a AuthenticationConditionsable when successful +func (m *AuthenticationEventListener) GetConditions()(AuthenticationConditionsable) { + val, err := m.GetBackingStore().Get("conditions") + if err != nil { + panic(err) + } + if val != nil { + return val.(AuthenticationConditionsable) + } + return nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *AuthenticationEventListener) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["authenticationEventsFlowId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAuthenticationEventsFlowId(val) + } + return nil + } + res["conditions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAuthenticationConditionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetConditions(val.(AuthenticationConditionsable)) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *AuthenticationEventListener) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("authenticationEventsFlowId", m.GetAuthenticationEventsFlowId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("conditions", m.GetConditions()) + if err != nil { + return err + } + } + return nil +} +// SetAuthenticationEventsFlowId sets the authenticationEventsFlowId property value. The authenticationEventsFlowId property +func (m *AuthenticationEventListener) SetAuthenticationEventsFlowId(value *string)() { + err := m.GetBackingStore().Set("authenticationEventsFlowId", value) + if err != nil { + panic(err) + } +} +// SetConditions sets the conditions property value. The conditions on which this authenticationEventListener should trigger. +func (m *AuthenticationEventListener) SetConditions(value AuthenticationConditionsable)() { + err := m.GetBackingStore().Set("conditions", value) + if err != nil { + panic(err) + } +} +type AuthenticationEventListenerable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthenticationEventsFlowId()(*string) + GetConditions()(AuthenticationConditionsable) + SetAuthenticationEventsFlowId(value *string)() + SetConditions(value AuthenticationConditionsable)() +} diff --git a/models/authentication_event_listener_collection_response.go b/models/authentication_event_listener_collection_response.go new file mode 100644 index 0000000000..c75ecf056f --- /dev/null +++ b/models/authentication_event_listener_collection_response.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type AuthenticationEventListenerCollectionResponse struct { + BaseCollectionPaginationCountResponse +} +// NewAuthenticationEventListenerCollectionResponse instantiates a new AuthenticationEventListenerCollectionResponse and sets the default values. +func NewAuthenticationEventListenerCollectionResponse()(*AuthenticationEventListenerCollectionResponse) { + m := &AuthenticationEventListenerCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAuthenticationEventListenerCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateAuthenticationEventListenerCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuthenticationEventListenerCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *AuthenticationEventListenerCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAuthenticationEventListenerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AuthenticationEventListenerable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(AuthenticationEventListenerable) + } + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +// returns a []AuthenticationEventListenerable when successful +func (m *AuthenticationEventListenerCollectionResponse) GetValue()([]AuthenticationEventListenerable) { + val, err := m.GetBackingStore().Get("value") + if err != nil { + panic(err) + } + if val != nil { + return val.([]AuthenticationEventListenerable) + } + return nil +} +// Serialize serializes information the current object +func (m *AuthenticationEventListenerCollectionResponse) 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 *AuthenticationEventListenerCollectionResponse) SetValue(value []AuthenticationEventListenerable)() { + err := m.GetBackingStore().Set("value", value) + if err != nil { + panic(err) + } +} +type AuthenticationEventListenerCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AuthenticationEventListenerable) + SetValue(value []AuthenticationEventListenerable)() +} diff --git a/models/azure_ad_token_authentication.go b/models/azure_ad_token_authentication.go new file mode 100644 index 0000000000..af75d308b9 --- /dev/null +++ b/models/azure_ad_token_authentication.go @@ -0,0 +1,78 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type AzureAdTokenAuthentication struct { + CustomExtensionAuthenticationConfiguration +} +// NewAzureAdTokenAuthentication instantiates a new AzureAdTokenAuthentication and sets the default values. +func NewAzureAdTokenAuthentication()(*AzureAdTokenAuthentication) { + m := &AzureAdTokenAuthentication{ + CustomExtensionAuthenticationConfiguration: *NewCustomExtensionAuthenticationConfiguration(), + } + odataTypeValue := "#microsoft.graph.azureAdTokenAuthentication" + m.SetOdataType(&odataTypeValue) + return m +} +// CreateAzureAdTokenAuthenticationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateAzureAdTokenAuthenticationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAzureAdTokenAuthentication(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *AzureAdTokenAuthentication) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.CustomExtensionAuthenticationConfiguration.GetFieldDeserializers() + 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 +} +// GetResourceId gets the resourceId property value. The appID of the Microsoft Entra application to use to authenticate an app with a custom extension. +// returns a *string when successful +func (m *AzureAdTokenAuthentication) 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 *AzureAdTokenAuthentication) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.CustomExtensionAuthenticationConfiguration.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("resourceId", m.GetResourceId()) + if err != nil { + return err + } + } + return nil +} +// SetResourceId sets the resourceId property value. The appID of the Microsoft Entra application to use to authenticate an app with a custom extension. +func (m *AzureAdTokenAuthentication) SetResourceId(value *string)() { + err := m.GetBackingStore().Set("resourceId", value) + if err != nil { + panic(err) + } +} +type AzureAdTokenAuthenticationable interface { + CustomExtensionAuthenticationConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetResourceId()(*string) + SetResourceId(value *string)() +} diff --git a/models/booking_appointment.go b/models/booking_appointment.go index 79282d42af..5301e4e061 100644 --- a/models/booking_appointment.go +++ b/models/booking_appointment.go @@ -44,6 +44,54 @@ func (m *BookingAppointment) GetAnonymousJoinWebUrl()(*string) { } return nil } +// GetCustomerEmailAddress gets the customerEmailAddress property value. The customerEmailAddress property +// returns a *string when successful +func (m *BookingAppointment) GetCustomerEmailAddress()(*string) { + val, err := m.GetBackingStore().Get("customerEmailAddress") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetCustomerName gets the customerName property value. The customerName property +// returns a *string when successful +func (m *BookingAppointment) GetCustomerName()(*string) { + val, err := m.GetBackingStore().Get("customerName") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetCustomerNotes gets the customerNotes property value. Notes from the customer associated with this appointment. +// returns a *string when successful +func (m *BookingAppointment) GetCustomerNotes()(*string) { + val, err := m.GetBackingStore().Get("customerNotes") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetCustomerPhone gets the customerPhone property value. The customerPhone property +// returns a *string when successful +func (m *BookingAppointment) GetCustomerPhone()(*string) { + val, err := m.GetBackingStore().Get("customerPhone") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} // GetCustomers gets the customers property value. A collection of customer properties for an appointment. An appointment contains a list of customer information and each unit will indicate the properties of a customer who is part of that appointment. Optional. // returns a []BookingCustomerInformationBaseable when successful func (m *BookingAppointment) GetCustomers()([]BookingCustomerInformationBaseable) { @@ -116,6 +164,46 @@ func (m *BookingAppointment) GetFieldDeserializers()(map[string]func(i878a80d233 } return nil } + res["customerEmailAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomerEmailAddress(val) + } + return nil + } + res["customerName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomerName(val) + } + return nil + } + res["customerNotes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomerNotes(val) + } + return nil + } + res["customerPhone"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomerPhone(val) + } + return nil + } res["customers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetCollectionOfObjectValues(CreateBookingCustomerInformationBaseFromDiscriminatorValue) if err != nil { @@ -590,6 +678,30 @@ func (m *BookingAppointment) Serialize(writer i878a80d2330e89d26896388a3f487eef2 return err } } + { + err = writer.WriteStringValue("customerEmailAddress", m.GetCustomerEmailAddress()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("customerName", m.GetCustomerName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("customerNotes", m.GetCustomerNotes()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("customerPhone", m.GetCustomerPhone()) + if err != nil { + return err + } + } if m.GetCustomers() != nil { cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCustomers())) for i, v := range m.GetCustomers() { @@ -739,6 +851,34 @@ func (m *BookingAppointment) SetAnonymousJoinWebUrl(value *string)() { panic(err) } } +// SetCustomerEmailAddress sets the customerEmailAddress property value. The customerEmailAddress property +func (m *BookingAppointment) SetCustomerEmailAddress(value *string)() { + err := m.GetBackingStore().Set("customerEmailAddress", value) + if err != nil { + panic(err) + } +} +// SetCustomerName sets the customerName property value. The customerName property +func (m *BookingAppointment) SetCustomerName(value *string)() { + err := m.GetBackingStore().Set("customerName", value) + if err != nil { + panic(err) + } +} +// SetCustomerNotes sets the customerNotes property value. Notes from the customer associated with this appointment. +func (m *BookingAppointment) SetCustomerNotes(value *string)() { + err := m.GetBackingStore().Set("customerNotes", value) + if err != nil { + panic(err) + } +} +// SetCustomerPhone sets the customerPhone property value. The customerPhone property +func (m *BookingAppointment) SetCustomerPhone(value *string)() { + err := m.GetBackingStore().Set("customerPhone", value) + if err != nil { + panic(err) + } +} // SetCustomers sets the customers property value. A collection of customer properties for an appointment. An appointment contains a list of customer information and each unit will indicate the properties of a customer who is part of that appointment. Optional. func (m *BookingAppointment) SetCustomers(value []BookingCustomerInformationBaseable)() { err := m.GetBackingStore().Set("customers", value) @@ -898,6 +1038,10 @@ type BookingAppointmentable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetAdditionalInformation()(*string) GetAnonymousJoinWebUrl()(*string) + GetCustomerEmailAddress()(*string) + GetCustomerName()(*string) + GetCustomerNotes()(*string) + GetCustomerPhone()(*string) GetCustomers()([]BookingCustomerInformationBaseable) GetCustomerTimeZone()(*string) GetDuration()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) @@ -922,6 +1066,10 @@ type BookingAppointmentable interface { GetStartDateTime()(DateTimeTimeZoneable) SetAdditionalInformation(value *string)() SetAnonymousJoinWebUrl(value *string)() + SetCustomerEmailAddress(value *string)() + SetCustomerName(value *string)() + SetCustomerNotes(value *string)() + SetCustomerPhone(value *string)() SetCustomers(value []BookingCustomerInformationBaseable)() SetCustomerTimeZone(value *string)() SetDuration(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() diff --git a/models/booking_staff_member.go b/models/booking_staff_member.go index 0a9aa60298..4dd129018d 100644 --- a/models/booking_staff_member.go +++ b/models/booking_staff_member.go @@ -102,6 +102,16 @@ func (m *BookingStaffMember) GetFieldDeserializers()(map[string]func(i878a80d233 } return nil } + res["membershipStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseBookingStaffMembershipStatus) + if err != nil { + return err + } + if val != nil { + m.SetMembershipStatus(val.(*BookingStaffMembershipStatus)) + } + return nil + } res["role"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetEnumValue(ParseBookingStaffRole) if err != nil { @@ -162,6 +172,18 @@ func (m *BookingStaffMember) GetIsEmailNotificationEnabled()(*bool) { } return nil } +// GetMembershipStatus gets the membershipStatus property value. The membershipStatus property +// returns a *BookingStaffMembershipStatus when successful +func (m *BookingStaffMember) GetMembershipStatus()(*BookingStaffMembershipStatus) { + val, err := m.GetBackingStore().Get("membershipStatus") + if err != nil { + panic(err) + } + if val != nil { + return val.(*BookingStaffMembershipStatus) + } + return nil +} // GetRole gets the role property value. The role property // returns a *BookingStaffRole when successful func (m *BookingStaffMember) GetRole()(*BookingStaffRole) { @@ -240,6 +262,13 @@ func (m *BookingStaffMember) Serialize(writer i878a80d2330e89d26896388a3f487eef2 return err } } + if m.GetMembershipStatus() != nil { + cast := (*m.GetMembershipStatus()).String() + err = writer.WriteStringValue("membershipStatus", &cast) + if err != nil { + return err + } + } if m.GetRole() != nil { cast := (*m.GetRole()).String() err = writer.WriteStringValue("role", &cast) @@ -301,6 +330,13 @@ func (m *BookingStaffMember) SetIsEmailNotificationEnabled(value *bool)() { panic(err) } } +// SetMembershipStatus sets the membershipStatus property value. The membershipStatus property +func (m *BookingStaffMember) SetMembershipStatus(value *BookingStaffMembershipStatus)() { + err := m.GetBackingStore().Set("membershipStatus", value) + if err != nil { + panic(err) + } +} // SetRole sets the role property value. The role property func (m *BookingStaffMember) SetRole(value *BookingStaffRole)() { err := m.GetBackingStore().Set("role", value) @@ -336,6 +372,7 @@ type BookingStaffMemberable interface { GetDisplayName()(*string) GetEmailAddress()(*string) GetIsEmailNotificationEnabled()(*bool) + GetMembershipStatus()(*BookingStaffMembershipStatus) GetRole()(*BookingStaffRole) GetTimeZone()(*string) GetUseBusinessHours()(*bool) @@ -344,6 +381,7 @@ type BookingStaffMemberable interface { SetDisplayName(value *string)() SetEmailAddress(value *string)() SetIsEmailNotificationEnabled(value *bool)() + SetMembershipStatus(value *BookingStaffMembershipStatus)() SetRole(value *BookingStaffRole)() SetTimeZone(value *string)() SetUseBusinessHours(value *bool)() diff --git a/models/booking_staff_membership_status.go b/models/booking_staff_membership_status.go new file mode 100644 index 0000000000..4e236bf457 --- /dev/null +++ b/models/booking_staff_membership_status.go @@ -0,0 +1,42 @@ +package models +import ( + "errors" +) +type BookingStaffMembershipStatus int + +const ( + ACTIVE_BOOKINGSTAFFMEMBERSHIPSTATUS BookingStaffMembershipStatus = iota + PENDINGACCEPTANCE_BOOKINGSTAFFMEMBERSHIPSTATUS + REJECTEDBYSTAFF_BOOKINGSTAFFMEMBERSHIPSTATUS + UNKNOWNFUTUREVALUE_BOOKINGSTAFFMEMBERSHIPSTATUS +) + +func (i BookingStaffMembershipStatus) String() string { + return []string{"active", "pendingAcceptance", "rejectedByStaff", "unknownFutureValue"}[i] +} +func ParseBookingStaffMembershipStatus(v string) (any, error) { + result := ACTIVE_BOOKINGSTAFFMEMBERSHIPSTATUS + switch v { + case "active": + result = ACTIVE_BOOKINGSTAFFMEMBERSHIPSTATUS + case "pendingAcceptance": + result = PENDINGACCEPTANCE_BOOKINGSTAFFMEMBERSHIPSTATUS + case "rejectedByStaff": + result = REJECTEDBYSTAFF_BOOKINGSTAFFMEMBERSHIPSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_BOOKINGSTAFFMEMBERSHIPSTATUS + default: + return 0, errors.New("Unknown BookingStaffMembershipStatus value: " + v) + } + return &result, nil +} +func SerializeBookingStaffMembershipStatus(values []BookingStaffMembershipStatus) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i BookingStaffMembershipStatus) isMultiValue() bool { + return false +} diff --git a/models/company_subscription.go b/models/company_subscription.go new file mode 100644 index 0000000000..a811c358e7 --- /dev/null +++ b/models/company_subscription.go @@ -0,0 +1,496 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CompanySubscription struct { + Entity +} +// NewCompanySubscription instantiates a new CompanySubscription and sets the default values. +func NewCompanySubscription()(*CompanySubscription) { + m := &CompanySubscription{ + Entity: *NewEntity(), + } + return m +} +// CreateCompanySubscriptionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCompanySubscriptionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCompanySubscription(), nil +} +// GetCommerceSubscriptionId gets the commerceSubscriptionId property value. The commerceSubscriptionId property +// returns a *string when successful +func (m *CompanySubscription) GetCommerceSubscriptionId()(*string) { + val, err := m.GetBackingStore().Get("commerceSubscriptionId") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetCreatedDateTime gets the createdDateTime property value. The createdDateTime property +// returns a *Time when successful +func (m *CompanySubscription) 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 *CompanySubscription) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["commerceSubscriptionId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommerceSubscriptionId(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["isTrial"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsTrial(val) + } + return nil + } + res["nextLifecycleDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetNextLifecycleDateTime(val) + } + return nil + } + res["ownerId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOwnerId(val) + } + return nil + } + res["ownerTenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOwnerTenantId(val) + } + return nil + } + res["ownerType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOwnerType(val) + } + return nil + } + res["serviceStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateServicePlanInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ServicePlanInfoable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ServicePlanInfoable) + } + } + m.SetServiceStatus(res) + } + return nil + } + res["skuId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSkuId(val) + } + return nil + } + res["skuPartNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSkuPartNumber(val) + } + 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["totalLicenses"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalLicenses(val) + } + return nil + } + return res +} +// GetIsTrial gets the isTrial property value. The isTrial property +// returns a *bool when successful +func (m *CompanySubscription) GetIsTrial()(*bool) { + val, err := m.GetBackingStore().Get("isTrial") + if err != nil { + panic(err) + } + if val != nil { + return val.(*bool) + } + return nil +} +// GetNextLifecycleDateTime gets the nextLifecycleDateTime property value. The nextLifecycleDateTime property +// returns a *Time when successful +func (m *CompanySubscription) GetNextLifecycleDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + val, err := m.GetBackingStore().Get("nextLifecycleDateTime") + if err != nil { + panic(err) + } + if val != nil { + return val.(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + } + return nil +} +// GetOwnerId gets the ownerId property value. The ownerId property +// returns a *string when successful +func (m *CompanySubscription) GetOwnerId()(*string) { + val, err := m.GetBackingStore().Get("ownerId") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetOwnerTenantId gets the ownerTenantId property value. The ownerTenantId property +// returns a *string when successful +func (m *CompanySubscription) GetOwnerTenantId()(*string) { + val, err := m.GetBackingStore().Get("ownerTenantId") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetOwnerType gets the ownerType property value. The ownerType property +// returns a *string when successful +func (m *CompanySubscription) GetOwnerType()(*string) { + val, err := m.GetBackingStore().Get("ownerType") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetServiceStatus gets the serviceStatus property value. The serviceStatus property +// returns a []ServicePlanInfoable when successful +func (m *CompanySubscription) GetServiceStatus()([]ServicePlanInfoable) { + val, err := m.GetBackingStore().Get("serviceStatus") + if err != nil { + panic(err) + } + if val != nil { + return val.([]ServicePlanInfoable) + } + return nil +} +// GetSkuId gets the skuId property value. The skuId property +// returns a *string when successful +func (m *CompanySubscription) GetSkuId()(*string) { + val, err := m.GetBackingStore().Get("skuId") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetSkuPartNumber gets the skuPartNumber property value. The skuPartNumber property +// returns a *string when successful +func (m *CompanySubscription) GetSkuPartNumber()(*string) { + val, err := m.GetBackingStore().Get("skuPartNumber") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetStatus gets the status property value. The status property +// returns a *string when successful +func (m *CompanySubscription) GetStatus()(*string) { + val, err := m.GetBackingStore().Get("status") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetTotalLicenses gets the totalLicenses property value. The totalLicenses property +// returns a *int32 when successful +func (m *CompanySubscription) GetTotalLicenses()(*int32) { + val, err := m.GetBackingStore().Get("totalLicenses") + if err != nil { + panic(err) + } + if val != nil { + return val.(*int32) + } + return nil +} +// Serialize serializes information the current object +func (m *CompanySubscription) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("commerceSubscriptionId", m.GetCommerceSubscriptionId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isTrial", m.GetIsTrial()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("nextLifecycleDateTime", m.GetNextLifecycleDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("ownerId", m.GetOwnerId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("ownerTenantId", m.GetOwnerTenantId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("ownerType", m.GetOwnerType()) + if err != nil { + return err + } + } + if m.GetServiceStatus() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetServiceStatus())) + for i, v := range m.GetServiceStatus() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err = writer.WriteCollectionOfObjectValues("serviceStatus", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("skuId", m.GetSkuId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("skuPartNumber", m.GetSkuPartNumber()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("status", m.GetStatus()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("totalLicenses", m.GetTotalLicenses()) + if err != nil { + return err + } + } + return nil +} +// SetCommerceSubscriptionId sets the commerceSubscriptionId property value. The commerceSubscriptionId property +func (m *CompanySubscription) SetCommerceSubscriptionId(value *string)() { + err := m.GetBackingStore().Set("commerceSubscriptionId", value) + if err != nil { + panic(err) + } +} +// SetCreatedDateTime sets the createdDateTime property value. The createdDateTime property +func (m *CompanySubscription) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + err := m.GetBackingStore().Set("createdDateTime", value) + if err != nil { + panic(err) + } +} +// SetIsTrial sets the isTrial property value. The isTrial property +func (m *CompanySubscription) SetIsTrial(value *bool)() { + err := m.GetBackingStore().Set("isTrial", value) + if err != nil { + panic(err) + } +} +// SetNextLifecycleDateTime sets the nextLifecycleDateTime property value. The nextLifecycleDateTime property +func (m *CompanySubscription) SetNextLifecycleDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + err := m.GetBackingStore().Set("nextLifecycleDateTime", value) + if err != nil { + panic(err) + } +} +// SetOwnerId sets the ownerId property value. The ownerId property +func (m *CompanySubscription) SetOwnerId(value *string)() { + err := m.GetBackingStore().Set("ownerId", value) + if err != nil { + panic(err) + } +} +// SetOwnerTenantId sets the ownerTenantId property value. The ownerTenantId property +func (m *CompanySubscription) SetOwnerTenantId(value *string)() { + err := m.GetBackingStore().Set("ownerTenantId", value) + if err != nil { + panic(err) + } +} +// SetOwnerType sets the ownerType property value. The ownerType property +func (m *CompanySubscription) SetOwnerType(value *string)() { + err := m.GetBackingStore().Set("ownerType", value) + if err != nil { + panic(err) + } +} +// SetServiceStatus sets the serviceStatus property value. The serviceStatus property +func (m *CompanySubscription) SetServiceStatus(value []ServicePlanInfoable)() { + err := m.GetBackingStore().Set("serviceStatus", value) + if err != nil { + panic(err) + } +} +// SetSkuId sets the skuId property value. The skuId property +func (m *CompanySubscription) SetSkuId(value *string)() { + err := m.GetBackingStore().Set("skuId", value) + if err != nil { + panic(err) + } +} +// SetSkuPartNumber sets the skuPartNumber property value. The skuPartNumber property +func (m *CompanySubscription) SetSkuPartNumber(value *string)() { + err := m.GetBackingStore().Set("skuPartNumber", value) + if err != nil { + panic(err) + } +} +// SetStatus sets the status property value. The status property +func (m *CompanySubscription) SetStatus(value *string)() { + err := m.GetBackingStore().Set("status", value) + if err != nil { + panic(err) + } +} +// SetTotalLicenses sets the totalLicenses property value. The totalLicenses property +func (m *CompanySubscription) SetTotalLicenses(value *int32)() { + err := m.GetBackingStore().Set("totalLicenses", value) + if err != nil { + panic(err) + } +} +type CompanySubscriptionable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCommerceSubscriptionId()(*string) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetIsTrial()(*bool) + GetNextLifecycleDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOwnerId()(*string) + GetOwnerTenantId()(*string) + GetOwnerType()(*string) + GetServiceStatus()([]ServicePlanInfoable) + GetSkuId()(*string) + GetSkuPartNumber()(*string) + GetStatus()(*string) + GetTotalLicenses()(*int32) + SetCommerceSubscriptionId(value *string)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetIsTrial(value *bool)() + SetNextLifecycleDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOwnerId(value *string)() + SetOwnerTenantId(value *string)() + SetOwnerType(value *string)() + SetServiceStatus(value []ServicePlanInfoable)() + SetSkuId(value *string)() + SetSkuPartNumber(value *string)() + SetStatus(value *string)() + SetTotalLicenses(value *int32)() +} diff --git a/models/company_subscription_collection_response.go b/models/company_subscription_collection_response.go new file mode 100644 index 0000000000..70123333eb --- /dev/null +++ b/models/company_subscription_collection_response.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CompanySubscriptionCollectionResponse struct { + BaseCollectionPaginationCountResponse +} +// NewCompanySubscriptionCollectionResponse instantiates a new CompanySubscriptionCollectionResponse and sets the default values. +func NewCompanySubscriptionCollectionResponse()(*CompanySubscriptionCollectionResponse) { + m := &CompanySubscriptionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCompanySubscriptionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCompanySubscriptionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCompanySubscriptionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CompanySubscriptionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCompanySubscriptionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CompanySubscriptionable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(CompanySubscriptionable) + } + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +// returns a []CompanySubscriptionable when successful +func (m *CompanySubscriptionCollectionResponse) GetValue()([]CompanySubscriptionable) { + val, err := m.GetBackingStore().Get("value") + if err != nil { + panic(err) + } + if val != nil { + return val.([]CompanySubscriptionable) + } + return nil +} +// Serialize serializes information the current object +func (m *CompanySubscriptionCollectionResponse) 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 *CompanySubscriptionCollectionResponse) SetValue(value []CompanySubscriptionable)() { + err := m.GetBackingStore().Set("value", value) + if err != nil { + panic(err) + } +} +type CompanySubscriptionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CompanySubscriptionable) + SetValue(value []CompanySubscriptionable)() +} diff --git a/models/cross_tenant_access_policy.go b/models/cross_tenant_access_policy.go index cedc2f0ca7..914caebc39 100644 --- a/models/cross_tenant_access_policy.go +++ b/models/cross_tenant_access_policy.go @@ -91,6 +91,16 @@ func (m *CrossTenantAccessPolicy) GetFieldDeserializers()(map[string]func(i878a8 } return nil } + res["templates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePolicyTemplateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTemplates(val.(PolicyTemplateable)) + } + return nil + } return res } // GetPartners gets the partners property value. Defines partner-specific configurations for external Microsoft Entra organizations. @@ -105,6 +115,18 @@ func (m *CrossTenantAccessPolicy) GetPartners()([]CrossTenantAccessPolicyConfigu } return nil } +// GetTemplates gets the templates property value. Represents the base policy in the directory for multitenant organization settings. +// returns a PolicyTemplateable when successful +func (m *CrossTenantAccessPolicy) GetTemplates()(PolicyTemplateable) { + val, err := m.GetBackingStore().Get("templates") + if err != nil { + panic(err) + } + if val != nil { + return val.(PolicyTemplateable) + } + return nil +} // Serialize serializes information the current object func (m *CrossTenantAccessPolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { err := m.PolicyBase.Serialize(writer) @@ -135,6 +157,12 @@ func (m *CrossTenantAccessPolicy) Serialize(writer i878a80d2330e89d26896388a3f48 return err } } + { + err = writer.WriteObjectValue("templates", m.GetTemplates()) + if err != nil { + return err + } + } return nil } // SetAllowedCloudEndpoints sets the allowedCloudEndpoints property value. Used to specify which Microsoft clouds an organization would like to collaborate with. By default, this value is empty. Supported values for this field are: microsoftonline.com, microsoftonline.us, and partner.microsoftonline.cn. @@ -158,13 +186,22 @@ func (m *CrossTenantAccessPolicy) SetPartners(value []CrossTenantAccessPolicyCon panic(err) } } +// SetTemplates sets the templates property value. Represents the base policy in the directory for multitenant organization settings. +func (m *CrossTenantAccessPolicy) SetTemplates(value PolicyTemplateable)() { + err := m.GetBackingStore().Set("templates", value) + if err != nil { + panic(err) + } +} type CrossTenantAccessPolicyable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable PolicyBaseable GetAllowedCloudEndpoints()([]string) GetDefaultEscaped()(CrossTenantAccessPolicyConfigurationDefaultable) GetPartners()([]CrossTenantAccessPolicyConfigurationPartnerable) + GetTemplates()(PolicyTemplateable) SetAllowedCloudEndpoints(value []string)() SetDefaultEscaped(value CrossTenantAccessPolicyConfigurationDefaultable)() SetPartners(value []CrossTenantAccessPolicyConfigurationPartnerable)() + SetTemplates(value PolicyTemplateable)() } diff --git a/models/cross_tenant_access_policy_configuration_partner.go b/models/cross_tenant_access_policy_configuration_partner.go index 150aa22c99..d5e7d4aa17 100644 --- a/models/cross_tenant_access_policy_configuration_partner.go +++ b/models/cross_tenant_access_policy_configuration_partner.go @@ -174,6 +174,16 @@ func (m *CrossTenantAccessPolicyConfigurationPartner) GetFieldDeserializers()(ma } return nil } + res["isInMultiTenantOrganization"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsInMultiTenantOrganization(val) + } + return nil + } res["isServiceProvider"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetBoolValue() if err != nil { @@ -230,6 +240,18 @@ func (m *CrossTenantAccessPolicyConfigurationPartner) GetInboundTrust()(CrossTen } return nil } +// GetIsInMultiTenantOrganization gets the isInMultiTenantOrganization property value. Identifies whether a tenant is a member of a multitenant organization. +// returns a *bool when successful +func (m *CrossTenantAccessPolicyConfigurationPartner) GetIsInMultiTenantOrganization()(*bool) { + val, err := m.GetBackingStore().Get("isInMultiTenantOrganization") + if err != nil { + panic(err) + } + if val != nil { + return val.(*bool) + } + return nil +} // GetIsServiceProvider gets the isServiceProvider property value. Identifies whether the partner-specific configuration is a Cloud Service Provider for your organization. // returns a *bool when successful func (m *CrossTenantAccessPolicyConfigurationPartner) GetIsServiceProvider()(*bool) { @@ -310,6 +332,12 @@ func (m *CrossTenantAccessPolicyConfigurationPartner) Serialize(writer i878a80d2 return err } } + { + err := writer.WriteBoolValue("isInMultiTenantOrganization", m.GetIsInMultiTenantOrganization()) + if err != nil { + return err + } + } { err := writer.WriteBoolValue("isServiceProvider", m.GetIsServiceProvider()) if err != nil { @@ -396,6 +424,13 @@ func (m *CrossTenantAccessPolicyConfigurationPartner) SetInboundTrust(value Cros panic(err) } } +// SetIsInMultiTenantOrganization sets the isInMultiTenantOrganization property value. Identifies whether a tenant is a member of a multitenant organization. +func (m *CrossTenantAccessPolicyConfigurationPartner) SetIsInMultiTenantOrganization(value *bool)() { + err := m.GetBackingStore().Set("isInMultiTenantOrganization", value) + if err != nil { + panic(err) + } +} // SetIsServiceProvider sets the isServiceProvider property value. Identifies whether the partner-specific configuration is a Cloud Service Provider for your organization. func (m *CrossTenantAccessPolicyConfigurationPartner) SetIsServiceProvider(value *bool)() { err := m.GetBackingStore().Set("isServiceProvider", value) @@ -429,6 +464,7 @@ type CrossTenantAccessPolicyConfigurationPartnerable interface { GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) GetIdentitySynchronization()(CrossTenantIdentitySyncPolicyPartnerable) GetInboundTrust()(CrossTenantAccessPolicyInboundTrustable) + GetIsInMultiTenantOrganization()(*bool) GetIsServiceProvider()(*bool) GetOdataType()(*string) GetTenantId()(*string) @@ -440,6 +476,7 @@ type CrossTenantAccessPolicyConfigurationPartnerable interface { SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() SetIdentitySynchronization(value CrossTenantIdentitySyncPolicyPartnerable)() SetInboundTrust(value CrossTenantAccessPolicyInboundTrustable)() + SetIsInMultiTenantOrganization(value *bool)() SetIsServiceProvider(value *bool)() SetOdataType(value *string)() SetTenantId(value *string)() diff --git a/models/custom_authentication_extension.go b/models/custom_authentication_extension.go new file mode 100644 index 0000000000..82cd573fe4 --- /dev/null +++ b/models/custom_authentication_extension.go @@ -0,0 +1,59 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CustomAuthenticationExtension struct { + CustomCalloutExtension +} +// NewCustomAuthenticationExtension instantiates a new CustomAuthenticationExtension and sets the default values. +func NewCustomAuthenticationExtension()(*CustomAuthenticationExtension) { + m := &CustomAuthenticationExtension{ + CustomCalloutExtension: *NewCustomCalloutExtension(), + } + odataTypeValue := "#microsoft.graph.customAuthenticationExtension" + m.SetOdataType(&odataTypeValue) + return m +} +// CreateCustomAuthenticationExtensionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCustomAuthenticationExtensionFromDiscriminatorValue(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.onTokenIssuanceStartCustomExtension": + return NewOnTokenIssuanceStartCustomExtension(), nil + } + } + } + } + return NewCustomAuthenticationExtension(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CustomAuthenticationExtension) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.CustomCalloutExtension.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *CustomAuthenticationExtension) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.CustomCalloutExtension.Serialize(writer) + if err != nil { + return err + } + return nil +} +type CustomAuthenticationExtensionable interface { + CustomCalloutExtensionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/models/custom_authentication_extension_collection_response.go b/models/custom_authentication_extension_collection_response.go new file mode 100644 index 0000000000..c448968aa5 --- /dev/null +++ b/models/custom_authentication_extension_collection_response.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type CustomAuthenticationExtensionCollectionResponse struct { + BaseCollectionPaginationCountResponse +} +// NewCustomAuthenticationExtensionCollectionResponse instantiates a new CustomAuthenticationExtensionCollectionResponse and sets the default values. +func NewCustomAuthenticationExtensionCollectionResponse()(*CustomAuthenticationExtensionCollectionResponse) { + m := &CustomAuthenticationExtensionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCustomAuthenticationExtensionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCustomAuthenticationExtensionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCustomAuthenticationExtensionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CustomAuthenticationExtensionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCustomAuthenticationExtensionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CustomAuthenticationExtensionable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(CustomAuthenticationExtensionable) + } + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +// returns a []CustomAuthenticationExtensionable when successful +func (m *CustomAuthenticationExtensionCollectionResponse) GetValue()([]CustomAuthenticationExtensionable) { + val, err := m.GetBackingStore().Get("value") + if err != nil { + panic(err) + } + if val != nil { + return val.([]CustomAuthenticationExtensionable) + } + return nil +} +// Serialize serializes information the current object +func (m *CustomAuthenticationExtensionCollectionResponse) 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 *CustomAuthenticationExtensionCollectionResponse) SetValue(value []CustomAuthenticationExtensionable)() { + err := m.GetBackingStore().Set("value", value) + if err != nil { + panic(err) + } +} +type CustomAuthenticationExtensionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CustomAuthenticationExtensionable) + SetValue(value []CustomAuthenticationExtensionable)() +} diff --git a/models/custom_callout_extension.go b/models/custom_callout_extension.go index 2027f0b24f..6870597198 100644 --- a/models/custom_callout_extension.go +++ b/models/custom_callout_extension.go @@ -33,6 +33,10 @@ func CreateCustomCalloutExtensionFromDiscriminatorValue(parseNode i878a80d2330e8 return NewAccessPackageAssignmentRequestWorkflowExtension(), nil case "#microsoft.graph.accessPackageAssignmentWorkflowExtension": return NewAccessPackageAssignmentWorkflowExtension(), nil + case "#microsoft.graph.customAuthenticationExtension": + return NewCustomAuthenticationExtension(), nil + case "#microsoft.graph.onTokenIssuanceStartCustomExtension": + return NewOnTokenIssuanceStartCustomExtension(), nil } } } diff --git a/models/custom_extension_authentication_configuration.go b/models/custom_extension_authentication_configuration.go index 13ed70768d..ef00f2be6b 100644 --- a/models/custom_extension_authentication_configuration.go +++ b/models/custom_extension_authentication_configuration.go @@ -34,6 +34,8 @@ func CreateCustomExtensionAuthenticationConfigurationFromDiscriminatorValue(pars switch *mappingValue { case "#microsoft.graph.azureAdPopTokenAuthentication": return NewAzureAdPopTokenAuthentication(), nil + case "#microsoft.graph.azureAdTokenAuthentication": + return NewAzureAdTokenAuthentication(), nil } } } diff --git a/models/custom_extension_client_configuration.go b/models/custom_extension_client_configuration.go index 74594dfbf3..d187bcaa3d 100644 --- a/models/custom_extension_client_configuration.go +++ b/models/custom_extension_client_configuration.go @@ -44,6 +44,16 @@ func (m *CustomExtensionClientConfiguration) GetBackingStore()(ie8677ce2c7e1b4c2 // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *CustomExtensionClientConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["maximumRetries"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMaximumRetries(val) + } + return nil + } res["@odata.type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -66,6 +76,18 @@ func (m *CustomExtensionClientConfiguration) GetFieldDeserializers()(map[string] } return res } +// GetMaximumRetries gets the maximumRetries property value. The max number of retries that Microsoft Entra ID makes to the external API. Values of 0 or 1 are supported. If null, the default for the service applies. +// returns a *int32 when successful +func (m *CustomExtensionClientConfiguration) GetMaximumRetries()(*int32) { + val, err := m.GetBackingStore().Get("maximumRetries") + 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 *CustomExtensionClientConfiguration) GetOdataType()(*string) { @@ -92,6 +114,12 @@ func (m *CustomExtensionClientConfiguration) GetTimeoutInMilliseconds()(*int32) } // Serialize serializes information the current object func (m *CustomExtensionClientConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("maximumRetries", m.GetMaximumRetries()) + if err != nil { + return err + } + } { err := writer.WriteStringValue("@odata.type", m.GetOdataType()) if err != nil { @@ -123,6 +151,13 @@ func (m *CustomExtensionClientConfiguration) SetAdditionalData(value map[string] func (m *CustomExtensionClientConfiguration) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { m.backingStore = value } +// SetMaximumRetries sets the maximumRetries property value. The max number of retries that Microsoft Entra ID makes to the external API. Values of 0 or 1 are supported. If null, the default for the service applies. +func (m *CustomExtensionClientConfiguration) SetMaximumRetries(value *int32)() { + err := m.GetBackingStore().Set("maximumRetries", value) + if err != nil { + panic(err) + } +} // SetOdataType sets the @odata.type property value. The OdataType property func (m *CustomExtensionClientConfiguration) SetOdataType(value *string)() { err := m.GetBackingStore().Set("odataType", value) @@ -142,9 +177,11 @@ type CustomExtensionClientConfigurationable interface { ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetMaximumRetries()(*int32) GetOdataType()(*string) GetTimeoutInMilliseconds()(*int32) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetMaximumRetries(value *int32)() SetOdataType(value *string)() SetTimeoutInMilliseconds(value *int32)() } diff --git a/models/custom_extension_endpoint_configuration.go b/models/custom_extension_endpoint_configuration.go index 587c2eeab1..da1ab43f0e 100644 --- a/models/custom_extension_endpoint_configuration.go +++ b/models/custom_extension_endpoint_configuration.go @@ -32,6 +32,8 @@ func CreateCustomExtensionEndpointConfigurationFromDiscriminatorValue(parseNode } if mappingValue != nil { switch *mappingValue { + case "#microsoft.graph.httpRequestEndpoint": + return NewHttpRequestEndpoint(), nil case "#microsoft.graph.logicAppTriggerEndpointConfiguration": return NewLogicAppTriggerEndpointConfiguration(), nil } diff --git a/models/custom_extension_overwrite_configuration.go b/models/custom_extension_overwrite_configuration.go new file mode 100644 index 0000000000..af782d6ec1 --- /dev/null +++ b/models/custom_extension_overwrite_configuration.go @@ -0,0 +1,150 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +type CustomExtensionOverwriteConfiguration struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewCustomExtensionOverwriteConfiguration instantiates a new CustomExtensionOverwriteConfiguration and sets the default values. +func NewCustomExtensionOverwriteConfiguration()(*CustomExtensionOverwriteConfiguration) { + m := &CustomExtensionOverwriteConfiguration{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCustomExtensionOverwriteConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCustomExtensionOverwriteConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCustomExtensionOverwriteConfiguration(), 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 *CustomExtensionOverwriteConfiguration) 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 *CustomExtensionOverwriteConfiguration) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetClientConfiguration gets the clientConfiguration property value. Configuration regarding properties of the custom extension which can be overwritten per event listener. If no values are provided, the properties on the custom extension are used. +// returns a CustomExtensionClientConfigurationable when successful +func (m *CustomExtensionOverwriteConfiguration) GetClientConfiguration()(CustomExtensionClientConfigurationable) { + val, err := m.GetBackingStore().Get("clientConfiguration") + if err != nil { + panic(err) + } + if val != nil { + return val.(CustomExtensionClientConfigurationable) + } + return nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CustomExtensionOverwriteConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["clientConfiguration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCustomExtensionClientConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetClientConfiguration(val.(CustomExtensionClientConfigurationable)) + } + 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 *CustomExtensionOverwriteConfiguration) 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 *CustomExtensionOverwriteConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("clientConfiguration", m.GetClientConfiguration()) + if err != nil { + return err + } + } + { + 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 *CustomExtensionOverwriteConfiguration) 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 *CustomExtensionOverwriteConfiguration) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetClientConfiguration sets the clientConfiguration property value. Configuration regarding properties of the custom extension which can be overwritten per event listener. If no values are provided, the properties on the custom extension are used. +func (m *CustomExtensionOverwriteConfiguration) SetClientConfiguration(value CustomExtensionClientConfigurationable)() { + err := m.GetBackingStore().Set("clientConfiguration", value) + if err != nil { + panic(err) + } +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *CustomExtensionOverwriteConfiguration) SetOdataType(value *string)() { + err := m.GetBackingStore().Set("odataType", value) + if err != nil { + panic(err) + } +} +type CustomExtensionOverwriteConfigurationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetClientConfiguration()(CustomExtensionClientConfigurationable) + GetOdataType()(*string) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetClientConfiguration(value CustomExtensionClientConfigurationable)() + SetOdataType(value *string)() +} diff --git a/models/directory.go b/models/directory.go index 8e864c9d7d..9249711c6f 100644 --- a/models/directory.go +++ b/models/directory.go @@ -207,6 +207,22 @@ func (m *Directory) GetFieldDeserializers()(map[string]func(i878a80d2330e89d2689 } return nil } + res["subscriptions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCompanySubscriptionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CompanySubscriptionable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(CompanySubscriptionable) + } + } + m.SetSubscriptions(res) + } + return nil + } return res } // GetOnPremisesSynchronization gets the onPremisesSynchronization property value. A container for on-premises directory synchronization functionalities that are available for the organization. @@ -221,6 +237,18 @@ func (m *Directory) GetOnPremisesSynchronization()([]OnPremisesDirectorySynchron } return nil } +// GetSubscriptions gets the subscriptions property value. The subscriptions property +// returns a []CompanySubscriptionable when successful +func (m *Directory) GetSubscriptions()([]CompanySubscriptionable) { + val, err := m.GetBackingStore().Get("subscriptions") + if err != nil { + panic(err) + } + if val != nil { + return val.([]CompanySubscriptionable) + } + return nil +} // Serialize serializes information the current object func (m *Directory) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { err := m.Entity.Serialize(writer) @@ -311,6 +339,18 @@ func (m *Directory) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c0 return err } } + if m.GetSubscriptions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSubscriptions())) + for i, v := range m.GetSubscriptions() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err = writer.WriteCollectionOfObjectValues("subscriptions", cast) + if err != nil { + return err + } + } return nil } // SetAdministrativeUnits sets the administrativeUnits property value. Conceptual container for user and group directory objects. @@ -362,6 +402,13 @@ func (m *Directory) SetOnPremisesSynchronization(value []OnPremisesDirectorySync panic(err) } } +// SetSubscriptions sets the subscriptions property value. The subscriptions property +func (m *Directory) SetSubscriptions(value []CompanySubscriptionable)() { + err := m.GetBackingStore().Set("subscriptions", value) + if err != nil { + panic(err) + } +} type Directoryable interface { Entityable i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable @@ -372,6 +419,7 @@ type Directoryable interface { GetDeviceLocalCredentials()([]DeviceLocalCredentialInfoable) GetFederationConfigurations()([]IdentityProviderBaseable) GetOnPremisesSynchronization()([]OnPremisesDirectorySynchronizationable) + GetSubscriptions()([]CompanySubscriptionable) SetAdministrativeUnits(value []AdministrativeUnitable)() SetAttributeSets(value []AttributeSetable)() SetCustomSecurityAttributeDefinitions(value []CustomSecurityAttributeDefinitionable)() @@ -379,4 +427,5 @@ type Directoryable interface { SetDeviceLocalCredentials(value []DeviceLocalCredentialInfoable)() SetFederationConfigurations(value []IdentityProviderBaseable)() SetOnPremisesSynchronization(value []OnPremisesDirectorySynchronizationable)() + SetSubscriptions(value []CompanySubscriptionable)() } diff --git a/models/directory_object.go b/models/directory_object.go index f36c2cdb3e..b9a5ee6367 100644 --- a/models/directory_object.go +++ b/models/directory_object.go @@ -68,6 +68,8 @@ func CreateDirectoryObjectFromDiscriminatorValue(parseNode i878a80d2330e89d26896 return NewHomeRealmDiscoveryPolicy(), nil case "#microsoft.graph.identitySecurityDefaultsEnforcementPolicy": return NewIdentitySecurityDefaultsEnforcementPolicy(), nil + case "#microsoft.graph.multiTenantOrganizationMember": + return NewMultiTenantOrganizationMember(), nil case "#microsoft.graph.organization": return NewOrganization(), nil case "#microsoft.graph.orgContact": diff --git a/models/domain.go b/models/domain.go index b665132402..3ee78cf2ae 100644 --- a/models/domain.go +++ b/models/domain.go @@ -19,7 +19,7 @@ func NewDomain()(*Domain) { func CreateDomainFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewDomain(), nil } -// GetAuthenticationType gets the authenticationType property value. Indicates the configured authentication type for the domain. The value is either Managed or Federated. Managed indicates a cloud managed domain where Microsoft Entra ID performs user authentication. Federated indicates authentication is federated with an identity provider such as the tenant's on-premises Active Directory via Active Directory Federation Services. Not nullable. +// GetAuthenticationType gets the authenticationType property value. Indicates the configured authentication type for the domain. The value is either Managed or Federated. Managed indicates a cloud managed domain where Microsoft Entra ID performs user authentication. Federated indicates authentication is federated with an identity provider such as the tenant's on-premises Active Directory via Active Directory Federation Services. Not nullable. To update this property in delegated scenarios, the calling app must be assigned the Directory.AccessAsUser.All delegated permission. // returns a *string when successful func (m *Domain) GetAuthenticationType()(*string) { val, err := m.GetBackingStore().Get("authenticationType") @@ -43,7 +43,7 @@ func (m *Domain) GetAvailabilityStatus()(*string) { } return nil } -// GetDomainNameReferences gets the domainNameReferences property value. The objects such as users and groups that reference the domain ID. Read-only, Nullable. Supports $expand and $filter by the OData type of objects returned. For example /domains/{domainId}/domainNameReferences/microsoft.graph.user and /domains/{domainId}/domainNameReferences/microsoft.graph.group. +// GetDomainNameReferences gets the domainNameReferences property value. The objects such as users and groups that reference the domain ID. Read-only, Nullable. Supports $expand and $filter by the OData type of objects returned. For example, /domains/{domainId}/domainNameReferences/microsoft.graph.user and /domains/{domainId}/domainNameReferences/microsoft.graph.group. // returns a []DirectoryObjectable when successful func (m *Domain) GetDomainNameReferences()([]DirectoryObjectable) { val, err := m.GetBackingStore().Get("domainNameReferences") @@ -273,7 +273,7 @@ func (m *Domain) GetFieldDeserializers()(map[string]func(i878a80d2330e89d2689638 } return res } -// GetIsAdminManaged gets the isAdminManaged property value. The value of the property is false if the DNS record management of the domain has been delegated to Microsoft 365. Otherwise, the value is true. Not nullable +// GetIsAdminManaged gets the isAdminManaged property value. The value of the property is false if the DNS record management of the domain is delegated to Microsoft 365. Otherwise, the value is true. Not nullable // returns a *bool when successful func (m *Domain) GetIsAdminManaged()(*bool) { val, err := m.GetBackingStore().Get("isAdminManaged") @@ -285,7 +285,7 @@ func (m *Domain) GetIsAdminManaged()(*bool) { } return nil } -// GetIsDefault gets the isDefault property value. true if this is the default domain that is used for user creation. There is only one default domain per company. Not nullable +// GetIsDefault gets the isDefault property value. true if this is the default domain that is used for user creation. There's only one default domain per company. Not nullable // returns a *bool when successful func (m *Domain) GetIsDefault()(*bool) { val, err := m.GetBackingStore().Get("isDefault") @@ -297,7 +297,7 @@ func (m *Domain) GetIsDefault()(*bool) { } return nil } -// GetIsInitial gets the isInitial property value. true if this is the initial domain created by Microsoft Online Services (contoso.com). There is only one initial domain per company. Not nullable +// GetIsInitial gets the isInitial property value. true if this is the initial domain created by Microsoft Online Services (contoso.com). There's only one initial domain per company. Not nullable // returns a *bool when successful func (m *Domain) GetIsInitial()(*bool) { val, err := m.GetBackingStore().Get("isInitial") @@ -357,7 +357,7 @@ func (m *Domain) GetModel()(*string) { } return nil } -// GetPasswordNotificationWindowInDays gets the passwordNotificationWindowInDays property value. Specifies the number of days before a user receives notification that their password will expire. If the property is not set, a default value of 14 days will be used. +// GetPasswordNotificationWindowInDays gets the passwordNotificationWindowInDays property value. Specifies the number of days before a user receives notification that their password will expire. If the property isn't set, a default value of 14 days is used. // returns a *int32 when successful func (m *Domain) GetPasswordNotificationWindowInDays()(*int32) { val, err := m.GetBackingStore().Get("passwordNotificationWindowInDays") @@ -369,7 +369,7 @@ func (m *Domain) GetPasswordNotificationWindowInDays()(*int32) { } return nil } -// GetPasswordValidityPeriodInDays gets the passwordValidityPeriodInDays property value. Specifies the length of time that a password is valid before it must be changed. If the property is not set, a default value of 90 days will be used. +// GetPasswordValidityPeriodInDays gets the passwordValidityPeriodInDays property value. Specifies the length of time that a password is valid before it must be changed. If the property isn't set, a default value of 90 days is used. // returns a *int32 when successful func (m *Domain) GetPasswordValidityPeriodInDays()(*int32) { val, err := m.GetBackingStore().Get("passwordValidityPeriodInDays") @@ -405,7 +405,7 @@ func (m *Domain) GetState()(DomainStateable) { } return nil } -// GetSupportedServices gets the supportedServices property value. The capabilities assigned to the domain. Can include 0, 1 or more of following values: Email, Sharepoint, EmailInternalRelayOnly, OfficeCommunicationsOnline, SharePointDefaultDomain, FullRedelegation, SharePointPublic, OrgIdAuthentication, Yammer, Intune. The values which you can add/remove using Graph API include: Email, OfficeCommunicationsOnline, Yammer. Not nullable. +// GetSupportedServices gets the supportedServices property value. The capabilities assigned to the domain. Can include 0, 1 or more of following values: Email, Sharepoint, EmailInternalRelayOnly, OfficeCommunicationsOnline, SharePointDefaultDomain, FullRedelegation, SharePointPublic, OrgIdAuthentication, Yammer, Intune. The values that you can add or remove using the API include: Email, OfficeCommunicationsOnline, Yammer. Not nullable. // returns a []string when successful func (m *Domain) GetSupportedServices()([]string) { val, err := m.GetBackingStore().Get("supportedServices") @@ -563,7 +563,7 @@ func (m *Domain) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c } return nil } -// SetAuthenticationType sets the authenticationType property value. Indicates the configured authentication type for the domain. The value is either Managed or Federated. Managed indicates a cloud managed domain where Microsoft Entra ID performs user authentication. Federated indicates authentication is federated with an identity provider such as the tenant's on-premises Active Directory via Active Directory Federation Services. Not nullable. +// SetAuthenticationType sets the authenticationType property value. Indicates the configured authentication type for the domain. The value is either Managed or Federated. Managed indicates a cloud managed domain where Microsoft Entra ID performs user authentication. Federated indicates authentication is federated with an identity provider such as the tenant's on-premises Active Directory via Active Directory Federation Services. Not nullable. To update this property in delegated scenarios, the calling app must be assigned the Directory.AccessAsUser.All delegated permission. func (m *Domain) SetAuthenticationType(value *string)() { err := m.GetBackingStore().Set("authenticationType", value) if err != nil { @@ -577,7 +577,7 @@ func (m *Domain) SetAvailabilityStatus(value *string)() { panic(err) } } -// SetDomainNameReferences sets the domainNameReferences property value. The objects such as users and groups that reference the domain ID. Read-only, Nullable. Supports $expand and $filter by the OData type of objects returned. For example /domains/{domainId}/domainNameReferences/microsoft.graph.user and /domains/{domainId}/domainNameReferences/microsoft.graph.group. +// SetDomainNameReferences sets the domainNameReferences property value. The objects such as users and groups that reference the domain ID. Read-only, Nullable. Supports $expand and $filter by the OData type of objects returned. For example, /domains/{domainId}/domainNameReferences/microsoft.graph.user and /domains/{domainId}/domainNameReferences/microsoft.graph.group. func (m *Domain) SetDomainNameReferences(value []DirectoryObjectable)() { err := m.GetBackingStore().Set("domainNameReferences", value) if err != nil { @@ -591,21 +591,21 @@ func (m *Domain) SetFederationConfiguration(value []InternalDomainFederationable panic(err) } } -// SetIsAdminManaged sets the isAdminManaged property value. The value of the property is false if the DNS record management of the domain has been delegated to Microsoft 365. Otherwise, the value is true. Not nullable +// SetIsAdminManaged sets the isAdminManaged property value. The value of the property is false if the DNS record management of the domain is delegated to Microsoft 365. Otherwise, the value is true. Not nullable func (m *Domain) SetIsAdminManaged(value *bool)() { err := m.GetBackingStore().Set("isAdminManaged", value) if err != nil { panic(err) } } -// SetIsDefault sets the isDefault property value. true if this is the default domain that is used for user creation. There is only one default domain per company. Not nullable +// SetIsDefault sets the isDefault property value. true if this is the default domain that is used for user creation. There's only one default domain per company. Not nullable func (m *Domain) SetIsDefault(value *bool)() { err := m.GetBackingStore().Set("isDefault", value) if err != nil { panic(err) } } -// SetIsInitial sets the isInitial property value. true if this is the initial domain created by Microsoft Online Services (contoso.com). There is only one initial domain per company. Not nullable +// SetIsInitial sets the isInitial property value. true if this is the initial domain created by Microsoft Online Services (contoso.com). There's only one initial domain per company. Not nullable func (m *Domain) SetIsInitial(value *bool)() { err := m.GetBackingStore().Set("isInitial", value) if err != nil { @@ -640,14 +640,14 @@ func (m *Domain) SetModel(value *string)() { panic(err) } } -// SetPasswordNotificationWindowInDays sets the passwordNotificationWindowInDays property value. Specifies the number of days before a user receives notification that their password will expire. If the property is not set, a default value of 14 days will be used. +// SetPasswordNotificationWindowInDays sets the passwordNotificationWindowInDays property value. Specifies the number of days before a user receives notification that their password will expire. If the property isn't set, a default value of 14 days is used. func (m *Domain) SetPasswordNotificationWindowInDays(value *int32)() { err := m.GetBackingStore().Set("passwordNotificationWindowInDays", value) if err != nil { panic(err) } } -// SetPasswordValidityPeriodInDays sets the passwordValidityPeriodInDays property value. Specifies the length of time that a password is valid before it must be changed. If the property is not set, a default value of 90 days will be used. +// SetPasswordValidityPeriodInDays sets the passwordValidityPeriodInDays property value. Specifies the length of time that a password is valid before it must be changed. If the property isn't set, a default value of 90 days is used. func (m *Domain) SetPasswordValidityPeriodInDays(value *int32)() { err := m.GetBackingStore().Set("passwordValidityPeriodInDays", value) if err != nil { @@ -668,7 +668,7 @@ func (m *Domain) SetState(value DomainStateable)() { panic(err) } } -// SetSupportedServices sets the supportedServices property value. The capabilities assigned to the domain. Can include 0, 1 or more of following values: Email, Sharepoint, EmailInternalRelayOnly, OfficeCommunicationsOnline, SharePointDefaultDomain, FullRedelegation, SharePointPublic, OrgIdAuthentication, Yammer, Intune. The values which you can add/remove using Graph API include: Email, OfficeCommunicationsOnline, Yammer. Not nullable. +// SetSupportedServices sets the supportedServices property value. The capabilities assigned to the domain. Can include 0, 1 or more of following values: Email, Sharepoint, EmailInternalRelayOnly, OfficeCommunicationsOnline, SharePointDefaultDomain, FullRedelegation, SharePointPublic, OrgIdAuthentication, Yammer, Intune. The values that you can add or remove using the API include: Email, OfficeCommunicationsOnline, Yammer. Not nullable. func (m *Domain) SetSupportedServices(value []string)() { err := m.GetBackingStore().Set("supportedServices", value) if err != nil { diff --git a/models/domain_dns_record.go b/models/domain_dns_record.go index bf8babe4a1..0c7f29882e 100644 --- a/models/domain_dns_record.go +++ b/models/domain_dns_record.go @@ -101,7 +101,7 @@ func (m *DomainDnsRecord) GetFieldDeserializers()(map[string]func(i878a80d2330e8 } return res } -// GetIsOptional gets the isOptional property value. If false, this record must be configured by the customer at the DNS host for Microsoft Online Services to operate correctly with the domain. +// GetIsOptional gets the isOptional property value. If false, the customer must configure this record at the DNS host for Microsoft Online Services to operate correctly with the domain. // returns a *bool when successful func (m *DomainDnsRecord) GetIsOptional()(*bool) { val, err := m.GetBackingStore().Get("isOptional") @@ -199,7 +199,7 @@ func (m *DomainDnsRecord) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0 } return nil } -// SetIsOptional sets the isOptional property value. If false, this record must be configured by the customer at the DNS host for Microsoft Online Services to operate correctly with the domain. +// SetIsOptional sets the isOptional property value. If false, the customer must configure this record at the DNS host for Microsoft Online Services to operate correctly with the domain. func (m *DomainDnsRecord) SetIsOptional(value *bool)() { err := m.GetBackingStore().Set("isOptional", value) if err != nil { diff --git a/models/domain_state.go b/models/domain_state.go index f0080fd122..78b3ed944a 100644 --- a/models/domain_state.go +++ b/models/domain_state.go @@ -111,7 +111,7 @@ func (m *DomainState) GetOdataType()(*string) { } return nil } -// GetOperation gets the operation property value. Type of asynchronous operation. The values can be ForceDelete or Verification +// GetOperation gets the operation property value. Type of asynchronous operation. The values can be ForceDelete or Verification. // returns a *string when successful func (m *DomainState) GetOperation()(*string) { val, err := m.GetBackingStore().Get("operation") @@ -123,7 +123,7 @@ func (m *DomainState) GetOperation()(*string) { } return nil } -// GetStatus gets the status property value. Current status of the operation. Scheduled - Operation has been scheduled but has not started. InProgress - Task has started and is in progress. Failed - Operation has failed. +// GetStatus gets the status property value. Current status of the operation. Scheduled - Operation is scheduled but hasn't started. InProgress - Task is in progress. Failed - The operation failed. // returns a *string when successful func (m *DomainState) GetStatus()(*string) { val, err := m.GetBackingStore().Get("status") @@ -194,14 +194,14 @@ func (m *DomainState) SetOdataType(value *string)() { panic(err) } } -// SetOperation sets the operation property value. Type of asynchronous operation. The values can be ForceDelete or Verification +// SetOperation sets the operation property value. Type of asynchronous operation. The values can be ForceDelete or Verification. func (m *DomainState) SetOperation(value *string)() { err := m.GetBackingStore().Set("operation", value) if err != nil { panic(err) } } -// SetStatus sets the status property value. Current status of the operation. Scheduled - Operation has been scheduled but has not started. InProgress - Task has started and is in progress. Failed - Operation has failed. +// SetStatus sets the status property value. Current status of the operation. Scheduled - Operation is scheduled but hasn't started. InProgress - Task is in progress. Failed - The operation failed. func (m *DomainState) SetStatus(value *string)() { err := m.GetBackingStore().Set("status", value) if err != nil { diff --git a/models/entity.go b/models/entity.go index 5b02d26900..b66c8c6ab7 100644 --- a/models/entity.go +++ b/models/entity.go @@ -192,6 +192,8 @@ func CreateEntityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487 return NewAuthenticationCombinationConfiguration(), nil case "#microsoft.graph.authenticationContextClassReference": return NewAuthenticationContextClassReference(), nil + case "#microsoft.graph.authenticationEventListener": + return NewAuthenticationEventListener(), nil case "#microsoft.graph.authenticationFlowsPolicy": return NewAuthenticationFlowsPolicy(), nil case "#microsoft.graph.authenticationMethod": @@ -320,6 +322,8 @@ func CreateEntityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487 return NewColumnLink(), nil case "#microsoft.graph.commsOperation": return NewCommsOperation(), nil + case "#microsoft.graph.companySubscription": + return NewCompanySubscription(), nil case "#microsoft.graph.complianceManagementPartner": return NewComplianceManagementPartner(), nil case "#microsoft.graph.conditionalAccessPolicy": @@ -352,6 +356,8 @@ func CreateEntityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487 return NewCrossTenantAccessPolicy(), nil case "#microsoft.graph.crossTenantAccessPolicyConfigurationDefault": return NewCrossTenantAccessPolicyConfigurationDefault(), nil + case "#microsoft.graph.customAuthenticationExtension": + return NewCustomAuthenticationExtension(), nil case "#microsoft.graph.customCalloutExtension": return NewCustomCalloutExtension(), nil case "#microsoft.graph.customExtensionStageSetting": @@ -848,6 +854,16 @@ func CreateEntityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487 return NewMobileLobApp(), nil case "#microsoft.graph.mobileThreatDefenseConnector": return NewMobileThreatDefenseConnector(), nil + case "#microsoft.graph.multiTenantOrganization": + return NewMultiTenantOrganization(), nil + case "#microsoft.graph.multiTenantOrganizationIdentitySyncPolicyTemplate": + return NewMultiTenantOrganizationIdentitySyncPolicyTemplate(), nil + case "#microsoft.graph.multiTenantOrganizationJoinRequestRecord": + return NewMultiTenantOrganizationJoinRequestRecord(), nil + case "#microsoft.graph.multiTenantOrganizationMember": + return NewMultiTenantOrganizationMember(), nil + case "#microsoft.graph.multiTenantOrganizationPartnerConfigurationTemplate": + return NewMultiTenantOrganizationPartnerConfigurationTemplate(), nil case "#microsoft.graph.multiValueLegacyExtendedProperty": return NewMultiValueLegacyExtendedProperty(), nil case "#microsoft.graph.muteParticipantOperation": @@ -888,6 +904,10 @@ func CreateEntityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487 return NewOnPremisesConditionalAccessSettings(), nil case "#microsoft.graph.onPremisesDirectorySynchronization": return NewOnPremisesDirectorySynchronization(), nil + case "#microsoft.graph.onTokenIssuanceStartCustomExtension": + return NewOnTokenIssuanceStartCustomExtension(), nil + case "#microsoft.graph.onTokenIssuanceStartListener": + return NewOnTokenIssuanceStartListener(), nil case "#microsoft.graph.openShift": return NewOpenShift(), nil case "#microsoft.graph.openShiftChangeRequest": @@ -968,6 +988,8 @@ func CreateEntityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487 return NewPolicyBase(), nil case "#microsoft.graph.policyRoot": return NewPolicyRoot(), nil + case "#microsoft.graph.policyTemplate": + return NewPolicyTemplate(), nil case "#microsoft.graph.post": return NewPost(), nil case "#microsoft.graph.presence": diff --git a/models/http_request_endpoint.go b/models/http_request_endpoint.go new file mode 100644 index 0000000000..74431dde16 --- /dev/null +++ b/models/http_request_endpoint.go @@ -0,0 +1,78 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type HttpRequestEndpoint struct { + CustomExtensionEndpointConfiguration +} +// NewHttpRequestEndpoint instantiates a new HttpRequestEndpoint and sets the default values. +func NewHttpRequestEndpoint()(*HttpRequestEndpoint) { + m := &HttpRequestEndpoint{ + CustomExtensionEndpointConfiguration: *NewCustomExtensionEndpointConfiguration(), + } + odataTypeValue := "#microsoft.graph.httpRequestEndpoint" + m.SetOdataType(&odataTypeValue) + return m +} +// CreateHttpRequestEndpointFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateHttpRequestEndpointFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewHttpRequestEndpoint(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *HttpRequestEndpoint) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.CustomExtensionEndpointConfiguration.GetFieldDeserializers() + res["targetUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTargetUrl(val) + } + return nil + } + return res +} +// GetTargetUrl gets the targetUrl property value. The HTTP endpoint that a custom extension calls. +// returns a *string when successful +func (m *HttpRequestEndpoint) GetTargetUrl()(*string) { + val, err := m.GetBackingStore().Get("targetUrl") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// Serialize serializes information the current object +func (m *HttpRequestEndpoint) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.CustomExtensionEndpointConfiguration.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("targetUrl", m.GetTargetUrl()) + if err != nil { + return err + } + } + return nil +} +// SetTargetUrl sets the targetUrl property value. The HTTP endpoint that a custom extension calls. +func (m *HttpRequestEndpoint) SetTargetUrl(value *string)() { + err := m.GetBackingStore().Set("targetUrl", value) + if err != nil { + panic(err) + } +} +type HttpRequestEndpointable interface { + CustomExtensionEndpointConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTargetUrl()(*string) + SetTargetUrl(value *string)() +} diff --git a/models/identity_container.go b/models/identity_container.go index 98c73aa849..5d968b60d4 100644 --- a/models/identity_container.go +++ b/models/identity_container.go @@ -31,6 +31,18 @@ func (m *IdentityContainer) GetApiConnectors()([]IdentityApiConnectorable) { } return nil } +// GetAuthenticationEventListeners gets the authenticationEventListeners property value. Represents listeners for custom authentication extension events in Azure AD for workforce and customers. +// returns a []AuthenticationEventListenerable when successful +func (m *IdentityContainer) GetAuthenticationEventListeners()([]AuthenticationEventListenerable) { + val, err := m.GetBackingStore().Get("authenticationEventListeners") + if err != nil { + panic(err) + } + if val != nil { + return val.([]AuthenticationEventListenerable) + } + return nil +} // GetB2xUserFlows gets the b2xUserFlows property value. Represents entry point for B2X/self-service sign-up identity userflows. // returns a []B2xIdentityUserFlowable when successful func (m *IdentityContainer) GetB2xUserFlows()([]B2xIdentityUserFlowable) { @@ -55,6 +67,18 @@ func (m *IdentityContainer) GetConditionalAccess()(ConditionalAccessRootable) { } return nil } +// GetCustomAuthenticationExtensions gets the customAuthenticationExtensions property value. Represents custom extensions to authentication flows in Azure AD for workforce and customers. +// returns a []CustomAuthenticationExtensionable when successful +func (m *IdentityContainer) GetCustomAuthenticationExtensions()([]CustomAuthenticationExtensionable) { + val, err := m.GetBackingStore().Get("customAuthenticationExtensions") + if err != nil { + panic(err) + } + if val != nil { + return val.([]CustomAuthenticationExtensionable) + } + return nil +} // GetFieldDeserializers the deserialization information for the current model // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *IdentityContainer) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { @@ -75,6 +99,22 @@ func (m *IdentityContainer) GetFieldDeserializers()(map[string]func(i878a80d2330 } return nil } + res["authenticationEventListeners"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAuthenticationEventListenerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AuthenticationEventListenerable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(AuthenticationEventListenerable) + } + } + m.SetAuthenticationEventListeners(res) + } + return nil + } res["b2xUserFlows"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetCollectionOfObjectValues(CreateB2xIdentityUserFlowFromDiscriminatorValue) if err != nil { @@ -101,6 +141,22 @@ func (m *IdentityContainer) GetFieldDeserializers()(map[string]func(i878a80d2330 } return nil } + res["customAuthenticationExtensions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCustomAuthenticationExtensionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CustomAuthenticationExtensionable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(CustomAuthenticationExtensionable) + } + } + m.SetCustomAuthenticationExtensions(res) + } + return nil + } res["identityProviders"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetCollectionOfObjectValues(CreateIdentityProviderBaseFromDiscriminatorValue) if err != nil { @@ -177,6 +233,18 @@ func (m *IdentityContainer) Serialize(writer i878a80d2330e89d26896388a3f487eef27 return err } } + if m.GetAuthenticationEventListeners() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAuthenticationEventListeners())) + for i, v := range m.GetAuthenticationEventListeners() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err = writer.WriteCollectionOfObjectValues("authenticationEventListeners", cast) + if err != nil { + return err + } + } if m.GetB2xUserFlows() != nil { cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetB2xUserFlows())) for i, v := range m.GetB2xUserFlows() { @@ -195,6 +263,18 @@ func (m *IdentityContainer) Serialize(writer i878a80d2330e89d26896388a3f487eef27 return err } } + if m.GetCustomAuthenticationExtensions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCustomAuthenticationExtensions())) + for i, v := range m.GetCustomAuthenticationExtensions() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err = writer.WriteCollectionOfObjectValues("customAuthenticationExtensions", cast) + if err != nil { + return err + } + } if m.GetIdentityProviders() != nil { cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIdentityProviders())) for i, v := range m.GetIdentityProviders() { @@ -228,6 +308,13 @@ func (m *IdentityContainer) SetApiConnectors(value []IdentityApiConnectorable)() panic(err) } } +// SetAuthenticationEventListeners sets the authenticationEventListeners property value. Represents listeners for custom authentication extension events in Azure AD for workforce and customers. +func (m *IdentityContainer) SetAuthenticationEventListeners(value []AuthenticationEventListenerable)() { + err := m.GetBackingStore().Set("authenticationEventListeners", value) + if err != nil { + panic(err) + } +} // SetB2xUserFlows sets the b2xUserFlows property value. Represents entry point for B2X/self-service sign-up identity userflows. func (m *IdentityContainer) SetB2xUserFlows(value []B2xIdentityUserFlowable)() { err := m.GetBackingStore().Set("b2xUserFlows", value) @@ -242,6 +329,13 @@ func (m *IdentityContainer) SetConditionalAccess(value ConditionalAccessRootable panic(err) } } +// SetCustomAuthenticationExtensions sets the customAuthenticationExtensions property value. Represents custom extensions to authentication flows in Azure AD for workforce and customers. +func (m *IdentityContainer) SetCustomAuthenticationExtensions(value []CustomAuthenticationExtensionable)() { + err := m.GetBackingStore().Set("customAuthenticationExtensions", value) + if err != nil { + panic(err) + } +} // SetIdentityProviders sets the identityProviders property value. The identityProviders property func (m *IdentityContainer) SetIdentityProviders(value []IdentityProviderBaseable)() { err := m.GetBackingStore().Set("identityProviders", value) @@ -260,13 +354,17 @@ type IdentityContainerable interface { Entityable i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetApiConnectors()([]IdentityApiConnectorable) + GetAuthenticationEventListeners()([]AuthenticationEventListenerable) GetB2xUserFlows()([]B2xIdentityUserFlowable) GetConditionalAccess()(ConditionalAccessRootable) + GetCustomAuthenticationExtensions()([]CustomAuthenticationExtensionable) GetIdentityProviders()([]IdentityProviderBaseable) GetUserFlowAttributes()([]IdentityUserFlowAttributeable) SetApiConnectors(value []IdentityApiConnectorable)() + SetAuthenticationEventListeners(value []AuthenticationEventListenerable)() SetB2xUserFlows(value []B2xIdentityUserFlowable)() SetConditionalAccess(value ConditionalAccessRootable)() + SetCustomAuthenticationExtensions(value []CustomAuthenticationExtensionable)() SetIdentityProviders(value []IdentityProviderBaseable)() SetUserFlowAttributes(value []IdentityUserFlowAttributeable)() } diff --git a/models/learning_content.go b/models/learning_content.go index 9f9da3ecbc..a8bddb9737 100644 --- a/models/learning_content.go +++ b/models/learning_content.go @@ -390,7 +390,7 @@ func (m *LearningContent) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3 } return nil } -// GetLevel gets the level property value. The level property +// GetLevel gets the level property value. The difficulty level of the learning content. Possible values are: Beginner, Intermediate, Advanced, unknownFutureValue. Optional. // returns a *Level when successful func (m *LearningContent) GetLevel()(*Level) { val, err := m.GetBackingStore().Get("level") @@ -676,7 +676,7 @@ func (m *LearningContent) SetLastModifiedDateTime(value *i336074805fc853987abe6f panic(err) } } -// SetLevel sets the level property value. The level property +// SetLevel sets the level property value. The difficulty level of the learning content. Possible values are: Beginner, Intermediate, Advanced, unknownFutureValue. Optional. func (m *LearningContent) SetLevel(value *Level)() { err := m.GetBackingStore().Set("level", value) if err != nil { diff --git a/models/multi_tenant_organization.go b/models/multi_tenant_organization.go new file mode 100644 index 0000000000..d5b3befadd --- /dev/null +++ b/models/multi_tenant_organization.go @@ -0,0 +1,275 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type MultiTenantOrganization struct { + Entity +} +// NewMultiTenantOrganization instantiates a new MultiTenantOrganization and sets the default values. +func NewMultiTenantOrganization()(*MultiTenantOrganization) { + m := &MultiTenantOrganization{ + Entity: *NewEntity(), + } + return m +} +// CreateMultiTenantOrganizationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateMultiTenantOrganizationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMultiTenantOrganization(), nil +} +// GetCreatedDateTime gets the createdDateTime property value. Date when multitenant organization was created. Read-only. +// returns a *Time when successful +func (m *MultiTenantOrganization) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + val, err := m.GetBackingStore().Get("createdDateTime") + if err != nil { + panic(err) + } + if val != nil { + return val.(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + } + return nil +} +// GetDescription gets the description property value. Description of the multitenant organization. +// returns a *string when successful +func (m *MultiTenantOrganization) 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. Display name of the multitenant organization. +// returns a *string when successful +func (m *MultiTenantOrganization) 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 *MultiTenantOrganization) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + 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["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["joinRequest"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMultiTenantOrganizationJoinRequestRecordFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetJoinRequest(val.(MultiTenantOrganizationJoinRequestRecordable)) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMultiTenantOrganizationState) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*MultiTenantOrganizationState)) + } + return nil + } + res["tenants"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMultiTenantOrganizationMemberFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MultiTenantOrganizationMemberable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(MultiTenantOrganizationMemberable) + } + } + m.SetTenants(res) + } + return nil + } + return res +} +// GetJoinRequest gets the joinRequest property value. Defines the status of a tenant joining a multitenant organization. +// returns a MultiTenantOrganizationJoinRequestRecordable when successful +func (m *MultiTenantOrganization) GetJoinRequest()(MultiTenantOrganizationJoinRequestRecordable) { + val, err := m.GetBackingStore().Get("joinRequest") + if err != nil { + panic(err) + } + if val != nil { + return val.(MultiTenantOrganizationJoinRequestRecordable) + } + return nil +} +// GetState gets the state property value. State of the multitenant organization. The possible values are: active, inactive, unknownFutureValue. active indicates the multitenant organization is created. inactive indicates the multitenant organization isn't created. Read-only. +// returns a *MultiTenantOrganizationState when successful +func (m *MultiTenantOrganization) GetState()(*MultiTenantOrganizationState) { + val, err := m.GetBackingStore().Get("state") + if err != nil { + panic(err) + } + if val != nil { + return val.(*MultiTenantOrganizationState) + } + return nil +} +// GetTenants gets the tenants property value. Defines tenants added to a multitenant organization. +// returns a []MultiTenantOrganizationMemberable when successful +func (m *MultiTenantOrganization) GetTenants()([]MultiTenantOrganizationMemberable) { + val, err := m.GetBackingStore().Get("tenants") + if err != nil { + panic(err) + } + if val != nil { + return val.([]MultiTenantOrganizationMemberable) + } + return nil +} +// Serialize serializes information the current object +func (m *MultiTenantOrganization) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + 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.WriteObjectValue("joinRequest", m.GetJoinRequest()) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err = writer.WriteStringValue("state", &cast) + if err != nil { + return err + } + } + if m.GetTenants() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTenants())) + for i, v := range m.GetTenants() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err = writer.WriteCollectionOfObjectValues("tenants", cast) + if err != nil { + return err + } + } + return nil +} +// SetCreatedDateTime sets the createdDateTime property value. Date when multitenant organization was created. Read-only. +func (m *MultiTenantOrganization) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + err := m.GetBackingStore().Set("createdDateTime", value) + if err != nil { + panic(err) + } +} +// SetDescription sets the description property value. Description of the multitenant organization. +func (m *MultiTenantOrganization) SetDescription(value *string)() { + err := m.GetBackingStore().Set("description", value) + if err != nil { + panic(err) + } +} +// SetDisplayName sets the displayName property value. Display name of the multitenant organization. +func (m *MultiTenantOrganization) SetDisplayName(value *string)() { + err := m.GetBackingStore().Set("displayName", value) + if err != nil { + panic(err) + } +} +// SetJoinRequest sets the joinRequest property value. Defines the status of a tenant joining a multitenant organization. +func (m *MultiTenantOrganization) SetJoinRequest(value MultiTenantOrganizationJoinRequestRecordable)() { + err := m.GetBackingStore().Set("joinRequest", value) + if err != nil { + panic(err) + } +} +// SetState sets the state property value. State of the multitenant organization. The possible values are: active, inactive, unknownFutureValue. active indicates the multitenant organization is created. inactive indicates the multitenant organization isn't created. Read-only. +func (m *MultiTenantOrganization) SetState(value *MultiTenantOrganizationState)() { + err := m.GetBackingStore().Set("state", value) + if err != nil { + panic(err) + } +} +// SetTenants sets the tenants property value. Defines tenants added to a multitenant organization. +func (m *MultiTenantOrganization) SetTenants(value []MultiTenantOrganizationMemberable)() { + err := m.GetBackingStore().Set("tenants", value) + if err != nil { + panic(err) + } +} +type MultiTenantOrganizationable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetDisplayName()(*string) + GetJoinRequest()(MultiTenantOrganizationJoinRequestRecordable) + GetState()(*MultiTenantOrganizationState) + GetTenants()([]MultiTenantOrganizationMemberable) + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetJoinRequest(value MultiTenantOrganizationJoinRequestRecordable)() + SetState(value *MultiTenantOrganizationState)() + SetTenants(value []MultiTenantOrganizationMemberable)() +} diff --git a/models/multi_tenant_organization_identity_sync_policy_template.go b/models/multi_tenant_organization_identity_sync_policy_template.go new file mode 100644 index 0000000000..2193da06d6 --- /dev/null +++ b/models/multi_tenant_organization_identity_sync_policy_template.go @@ -0,0 +1,114 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type MultiTenantOrganizationIdentitySyncPolicyTemplate struct { + Entity +} +// NewMultiTenantOrganizationIdentitySyncPolicyTemplate instantiates a new MultiTenantOrganizationIdentitySyncPolicyTemplate and sets the default values. +func NewMultiTenantOrganizationIdentitySyncPolicyTemplate()(*MultiTenantOrganizationIdentitySyncPolicyTemplate) { + m := &MultiTenantOrganizationIdentitySyncPolicyTemplate{ + Entity: *NewEntity(), + } + return m +} +// CreateMultiTenantOrganizationIdentitySyncPolicyTemplateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateMultiTenantOrganizationIdentitySyncPolicyTemplateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMultiTenantOrganizationIdentitySyncPolicyTemplate(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *MultiTenantOrganizationIdentitySyncPolicyTemplate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["templateApplicationLevel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseTemplateApplicationLevel) + if err != nil { + return err + } + if val != nil { + m.SetTemplateApplicationLevel(val.(*TemplateApplicationLevel)) + } + return nil + } + res["userSyncInbound"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCrossTenantUserSyncInboundFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUserSyncInbound(val.(CrossTenantUserSyncInboundable)) + } + return nil + } + return res +} +// GetTemplateApplicationLevel gets the templateApplicationLevel property value. The templateApplicationLevel property +// returns a *TemplateApplicationLevel when successful +func (m *MultiTenantOrganizationIdentitySyncPolicyTemplate) GetTemplateApplicationLevel()(*TemplateApplicationLevel) { + val, err := m.GetBackingStore().Get("templateApplicationLevel") + if err != nil { + panic(err) + } + if val != nil { + return val.(*TemplateApplicationLevel) + } + return nil +} +// GetUserSyncInbound gets the userSyncInbound property value. Defines whether users can be synchronized from the partner tenant. +// returns a CrossTenantUserSyncInboundable when successful +func (m *MultiTenantOrganizationIdentitySyncPolicyTemplate) GetUserSyncInbound()(CrossTenantUserSyncInboundable) { + val, err := m.GetBackingStore().Get("userSyncInbound") + if err != nil { + panic(err) + } + if val != nil { + return val.(CrossTenantUserSyncInboundable) + } + return nil +} +// Serialize serializes information the current object +func (m *MultiTenantOrganizationIdentitySyncPolicyTemplate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetTemplateApplicationLevel() != nil { + cast := (*m.GetTemplateApplicationLevel()).String() + err = writer.WriteStringValue("templateApplicationLevel", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("userSyncInbound", m.GetUserSyncInbound()) + if err != nil { + return err + } + } + return nil +} +// SetTemplateApplicationLevel sets the templateApplicationLevel property value. The templateApplicationLevel property +func (m *MultiTenantOrganizationIdentitySyncPolicyTemplate) SetTemplateApplicationLevel(value *TemplateApplicationLevel)() { + err := m.GetBackingStore().Set("templateApplicationLevel", value) + if err != nil { + panic(err) + } +} +// SetUserSyncInbound sets the userSyncInbound property value. Defines whether users can be synchronized from the partner tenant. +func (m *MultiTenantOrganizationIdentitySyncPolicyTemplate) SetUserSyncInbound(value CrossTenantUserSyncInboundable)() { + err := m.GetBackingStore().Set("userSyncInbound", value) + if err != nil { + panic(err) + } +} +type MultiTenantOrganizationIdentitySyncPolicyTemplateable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTemplateApplicationLevel()(*TemplateApplicationLevel) + GetUserSyncInbound()(CrossTenantUserSyncInboundable) + SetTemplateApplicationLevel(value *TemplateApplicationLevel)() + SetUserSyncInbound(value CrossTenantUserSyncInboundable)() +} diff --git a/models/multi_tenant_organization_join_request_record.go b/models/multi_tenant_organization_join_request_record.go new file mode 100644 index 0000000000..88f39021ed --- /dev/null +++ b/models/multi_tenant_organization_join_request_record.go @@ -0,0 +1,189 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type MultiTenantOrganizationJoinRequestRecord struct { + Entity +} +// NewMultiTenantOrganizationJoinRequestRecord instantiates a new MultiTenantOrganizationJoinRequestRecord and sets the default values. +func NewMultiTenantOrganizationJoinRequestRecord()(*MultiTenantOrganizationJoinRequestRecord) { + m := &MultiTenantOrganizationJoinRequestRecord{ + Entity: *NewEntity(), + } + return m +} +// CreateMultiTenantOrganizationJoinRequestRecordFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateMultiTenantOrganizationJoinRequestRecordFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMultiTenantOrganizationJoinRequestRecord(), nil +} +// GetAddedByTenantId gets the addedByTenantId property value. Tenant ID of the Microsoft Entra tenant that added a tenant to the multitenant organization. To reset a failed join request, set addedByTenantId to 00000000-0000-0000-0000-000000000000. Required. +// returns a *string when successful +func (m *MultiTenantOrganizationJoinRequestRecord) GetAddedByTenantId()(*string) { + val, err := m.GetBackingStore().Get("addedByTenantId") + 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 *MultiTenantOrganizationJoinRequestRecord) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["addedByTenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAddedByTenantId(val) + } + return nil + } + res["memberState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMultiTenantOrganizationMemberState) + if err != nil { + return err + } + if val != nil { + m.SetMemberState(val.(*MultiTenantOrganizationMemberState)) + } + return nil + } + res["role"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMultiTenantOrganizationMemberRole) + if err != nil { + return err + } + if val != nil { + m.SetRole(val.(*MultiTenantOrganizationMemberRole)) + } + return nil + } + res["transitionDetails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMultiTenantOrganizationJoinRequestTransitionDetailsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTransitionDetails(val.(MultiTenantOrganizationJoinRequestTransitionDetailsable)) + } + return nil + } + return res +} +// GetMemberState gets the memberState property value. State of the tenant in the multitenant organization. The possible values are: pending, active, removed, unknownFutureValue. Tenants in the pending state must join the multitenant organization to participate in the multitenant organization. Tenants in the active state can participate in the multitenant organization. Tenants in the removed state are in the process of being removed from the multitenant organization. Read-only. +// returns a *MultiTenantOrganizationMemberState when successful +func (m *MultiTenantOrganizationJoinRequestRecord) GetMemberState()(*MultiTenantOrganizationMemberState) { + val, err := m.GetBackingStore().Get("memberState") + if err != nil { + panic(err) + } + if val != nil { + return val.(*MultiTenantOrganizationMemberState) + } + return nil +} +// GetRole gets the role property value. Role of the tenant in the multitenant organization. The possible values are: owner, member (default), unknownFutureValue. Tenants with the owner role can manage the multitenant organization. There can be multiple tenants with the owner role in a multitenant organization. Tenants with the member role can participate in a multitenant organization. +// returns a *MultiTenantOrganizationMemberRole when successful +func (m *MultiTenantOrganizationJoinRequestRecord) GetRole()(*MultiTenantOrganizationMemberRole) { + val, err := m.GetBackingStore().Get("role") + if err != nil { + panic(err) + } + if val != nil { + return val.(*MultiTenantOrganizationMemberRole) + } + return nil +} +// GetTransitionDetails gets the transitionDetails property value. Details of the processing status for a tenant joining a multitenant organization. Read-only. +// returns a MultiTenantOrganizationJoinRequestTransitionDetailsable when successful +func (m *MultiTenantOrganizationJoinRequestRecord) GetTransitionDetails()(MultiTenantOrganizationJoinRequestTransitionDetailsable) { + val, err := m.GetBackingStore().Get("transitionDetails") + if err != nil { + panic(err) + } + if val != nil { + return val.(MultiTenantOrganizationJoinRequestTransitionDetailsable) + } + return nil +} +// Serialize serializes information the current object +func (m *MultiTenantOrganizationJoinRequestRecord) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("addedByTenantId", m.GetAddedByTenantId()) + if err != nil { + return err + } + } + if m.GetMemberState() != nil { + cast := (*m.GetMemberState()).String() + err = writer.WriteStringValue("memberState", &cast) + if err != nil { + return err + } + } + if m.GetRole() != nil { + cast := (*m.GetRole()).String() + err = writer.WriteStringValue("role", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("transitionDetails", m.GetTransitionDetails()) + if err != nil { + return err + } + } + return nil +} +// SetAddedByTenantId sets the addedByTenantId property value. Tenant ID of the Microsoft Entra tenant that added a tenant to the multitenant organization. To reset a failed join request, set addedByTenantId to 00000000-0000-0000-0000-000000000000. Required. +func (m *MultiTenantOrganizationJoinRequestRecord) SetAddedByTenantId(value *string)() { + err := m.GetBackingStore().Set("addedByTenantId", value) + if err != nil { + panic(err) + } +} +// SetMemberState sets the memberState property value. State of the tenant in the multitenant organization. The possible values are: pending, active, removed, unknownFutureValue. Tenants in the pending state must join the multitenant organization to participate in the multitenant organization. Tenants in the active state can participate in the multitenant organization. Tenants in the removed state are in the process of being removed from the multitenant organization. Read-only. +func (m *MultiTenantOrganizationJoinRequestRecord) SetMemberState(value *MultiTenantOrganizationMemberState)() { + err := m.GetBackingStore().Set("memberState", value) + if err != nil { + panic(err) + } +} +// SetRole sets the role property value. Role of the tenant in the multitenant organization. The possible values are: owner, member (default), unknownFutureValue. Tenants with the owner role can manage the multitenant organization. There can be multiple tenants with the owner role in a multitenant organization. Tenants with the member role can participate in a multitenant organization. +func (m *MultiTenantOrganizationJoinRequestRecord) SetRole(value *MultiTenantOrganizationMemberRole)() { + err := m.GetBackingStore().Set("role", value) + if err != nil { + panic(err) + } +} +// SetTransitionDetails sets the transitionDetails property value. Details of the processing status for a tenant joining a multitenant organization. Read-only. +func (m *MultiTenantOrganizationJoinRequestRecord) SetTransitionDetails(value MultiTenantOrganizationJoinRequestTransitionDetailsable)() { + err := m.GetBackingStore().Set("transitionDetails", value) + if err != nil { + panic(err) + } +} +type MultiTenantOrganizationJoinRequestRecordable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAddedByTenantId()(*string) + GetMemberState()(*MultiTenantOrganizationMemberState) + GetRole()(*MultiTenantOrganizationMemberRole) + GetTransitionDetails()(MultiTenantOrganizationJoinRequestTransitionDetailsable) + SetAddedByTenantId(value *string)() + SetMemberState(value *MultiTenantOrganizationMemberState)() + SetRole(value *MultiTenantOrganizationMemberRole)() + SetTransitionDetails(value MultiTenantOrganizationJoinRequestTransitionDetailsable)() +} diff --git a/models/multi_tenant_organization_join_request_transition_details.go b/models/multi_tenant_organization_join_request_transition_details.go new file mode 100644 index 0000000000..81f7aa8721 --- /dev/null +++ b/models/multi_tenant_organization_join_request_transition_details.go @@ -0,0 +1,226 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +type MultiTenantOrganizationJoinRequestTransitionDetails struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewMultiTenantOrganizationJoinRequestTransitionDetails instantiates a new MultiTenantOrganizationJoinRequestTransitionDetails and sets the default values. +func NewMultiTenantOrganizationJoinRequestTransitionDetails()(*MultiTenantOrganizationJoinRequestTransitionDetails) { + m := &MultiTenantOrganizationJoinRequestTransitionDetails{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateMultiTenantOrganizationJoinRequestTransitionDetailsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateMultiTenantOrganizationJoinRequestTransitionDetailsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMultiTenantOrganizationJoinRequestTransitionDetails(), 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 *MultiTenantOrganizationJoinRequestTransitionDetails) 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 *MultiTenantOrganizationJoinRequestTransitionDetails) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetDesiredMemberState gets the desiredMemberState property value. State of the tenant in the multitenant organization currently being processed. The possible values are: pending, active, removed, unknownFutureValue. Read-only. +// returns a *MultiTenantOrganizationMemberState when successful +func (m *MultiTenantOrganizationJoinRequestTransitionDetails) GetDesiredMemberState()(*MultiTenantOrganizationMemberState) { + val, err := m.GetBackingStore().Get("desiredMemberState") + if err != nil { + panic(err) + } + if val != nil { + return val.(*MultiTenantOrganizationMemberState) + } + return nil +} +// GetDetails gets the details property value. Details that explain the processing status if any. Read-only. +// returns a *string when successful +func (m *MultiTenantOrganizationJoinRequestTransitionDetails) GetDetails()(*string) { + val, err := m.GetBackingStore().Get("details") + 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 *MultiTenantOrganizationJoinRequestTransitionDetails) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["desiredMemberState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMultiTenantOrganizationMemberState) + if err != nil { + return err + } + if val != nil { + m.SetDesiredMemberState(val.(*MultiTenantOrganizationMemberState)) + } + return nil + } + res["details"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDetails(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["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMultiTenantOrganizationMemberProcessingStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*MultiTenantOrganizationMemberProcessingStatus)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +// returns a *string when successful +func (m *MultiTenantOrganizationJoinRequestTransitionDetails) GetOdataType()(*string) { + val, err := m.GetBackingStore().Get("odataType") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetStatus gets the status property value. Processing state of the asynchronous job. The possible values are: notStarted, running, succeeded, failed, unknownFutureValue. Read-only. +// returns a *MultiTenantOrganizationMemberProcessingStatus when successful +func (m *MultiTenantOrganizationJoinRequestTransitionDetails) GetStatus()(*MultiTenantOrganizationMemberProcessingStatus) { + val, err := m.GetBackingStore().Get("status") + if err != nil { + panic(err) + } + if val != nil { + return val.(*MultiTenantOrganizationMemberProcessingStatus) + } + return nil +} +// Serialize serializes information the current object +func (m *MultiTenantOrganizationJoinRequestTransitionDetails) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetDesiredMemberState() != nil { + cast := (*m.GetDesiredMemberState()).String() + err := writer.WriteStringValue("desiredMemberState", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("details", m.GetDetails()) + if err != nil { + return err + } + } + { + 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 *MultiTenantOrganizationJoinRequestTransitionDetails) 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 *MultiTenantOrganizationJoinRequestTransitionDetails) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetDesiredMemberState sets the desiredMemberState property value. State of the tenant in the multitenant organization currently being processed. The possible values are: pending, active, removed, unknownFutureValue. Read-only. +func (m *MultiTenantOrganizationJoinRequestTransitionDetails) SetDesiredMemberState(value *MultiTenantOrganizationMemberState)() { + err := m.GetBackingStore().Set("desiredMemberState", value) + if err != nil { + panic(err) + } +} +// SetDetails sets the details property value. Details that explain the processing status if any. Read-only. +func (m *MultiTenantOrganizationJoinRequestTransitionDetails) SetDetails(value *string)() { + err := m.GetBackingStore().Set("details", value) + if err != nil { + panic(err) + } +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MultiTenantOrganizationJoinRequestTransitionDetails) SetOdataType(value *string)() { + err := m.GetBackingStore().Set("odataType", value) + if err != nil { + panic(err) + } +} +// SetStatus sets the status property value. Processing state of the asynchronous job. The possible values are: notStarted, running, succeeded, failed, unknownFutureValue. Read-only. +func (m *MultiTenantOrganizationJoinRequestTransitionDetails) SetStatus(value *MultiTenantOrganizationMemberProcessingStatus)() { + err := m.GetBackingStore().Set("status", value) + if err != nil { + panic(err) + } +} +type MultiTenantOrganizationJoinRequestTransitionDetailsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetDesiredMemberState()(*MultiTenantOrganizationMemberState) + GetDetails()(*string) + GetOdataType()(*string) + GetStatus()(*MultiTenantOrganizationMemberProcessingStatus) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetDesiredMemberState(value *MultiTenantOrganizationMemberState)() + SetDetails(value *string)() + SetOdataType(value *string)() + SetStatus(value *MultiTenantOrganizationMemberProcessingStatus)() +} diff --git a/models/multi_tenant_organization_member.go b/models/multi_tenant_organization_member.go new file mode 100644 index 0000000000..6ccc95db89 --- /dev/null +++ b/models/multi_tenant_organization_member.go @@ -0,0 +1,341 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type MultiTenantOrganizationMember struct { + DirectoryObject +} +// NewMultiTenantOrganizationMember instantiates a new MultiTenantOrganizationMember and sets the default values. +func NewMultiTenantOrganizationMember()(*MultiTenantOrganizationMember) { + m := &MultiTenantOrganizationMember{ + DirectoryObject: *NewDirectoryObject(), + } + odataTypeValue := "#microsoft.graph.multiTenantOrganizationMember" + m.SetOdataType(&odataTypeValue) + return m +} +// CreateMultiTenantOrganizationMemberFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateMultiTenantOrganizationMemberFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMultiTenantOrganizationMember(), nil +} +// GetAddedByTenantId gets the addedByTenantId property value. Tenant ID of the tenant that added the tenant to the multitenant organization. Read-only. +// returns a *UUID when successful +func (m *MultiTenantOrganizationMember) GetAddedByTenantId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + val, err := m.GetBackingStore().Get("addedByTenantId") + if err != nil { + panic(err) + } + if val != nil { + return val.(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + } + return nil +} +// GetAddedDateTime gets the addedDateTime property value. Date and time when the tenant was added to the multitenant organization. Read-only. +// returns a *Time when successful +func (m *MultiTenantOrganizationMember) GetAddedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + val, err := m.GetBackingStore().Get("addedDateTime") + if err != nil { + panic(err) + } + if val != nil { + return val.(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + } + return nil +} +// GetDisplayName gets the displayName property value. Display name of the tenant added to the multitenant organization. +// returns a *string when successful +func (m *MultiTenantOrganizationMember) 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 *MultiTenantOrganizationMember) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DirectoryObject.GetFieldDeserializers() + res["addedByTenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetAddedByTenantId(val) + } + return nil + } + res["addedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetAddedDateTime(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["joinedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetJoinedDateTime(val) + } + return nil + } + res["role"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMultiTenantOrganizationMemberRole) + if err != nil { + return err + } + if val != nil { + m.SetRole(val.(*MultiTenantOrganizationMemberRole)) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMultiTenantOrganizationMemberState) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*MultiTenantOrganizationMemberState)) + } + return nil + } + res["tenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTenantId(val) + } + return nil + } + res["transitionDetails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMultiTenantOrganizationMemberTransitionDetailsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTransitionDetails(val.(MultiTenantOrganizationMemberTransitionDetailsable)) + } + return nil + } + return res +} +// GetJoinedDateTime gets the joinedDateTime property value. Date and time when the tenant joined the multitenant organization. Read-only. +// returns a *Time when successful +func (m *MultiTenantOrganizationMember) GetJoinedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + val, err := m.GetBackingStore().Get("joinedDateTime") + if err != nil { + panic(err) + } + if val != nil { + return val.(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + } + return nil +} +// GetRole gets the role property value. Role of the tenant in the multitenant organization. The possible values are: owner, member (default), unknownFutureValue. Tenants with the owner role can manage the multitenant organization but tenants with the member role can only participate in a multitenant organization. There can be multiple tenants with the owner role in a multitenant organization. +// returns a *MultiTenantOrganizationMemberRole when successful +func (m *MultiTenantOrganizationMember) GetRole()(*MultiTenantOrganizationMemberRole) { + val, err := m.GetBackingStore().Get("role") + if err != nil { + panic(err) + } + if val != nil { + return val.(*MultiTenantOrganizationMemberRole) + } + return nil +} +// GetState gets the state property value. State of the tenant in the multitenant organization. The possible values are: pending, active, removed, unknownFutureValue. Tenants in the pending state must join the multitenant organization to participate in the multitenant organization. Tenants in the active state can participate in the multitenant organization. Tenants in the removed state are in the process of being removed from the multitenant organization. Read-only. +// returns a *MultiTenantOrganizationMemberState when successful +func (m *MultiTenantOrganizationMember) GetState()(*MultiTenantOrganizationMemberState) { + val, err := m.GetBackingStore().Get("state") + if err != nil { + panic(err) + } + if val != nil { + return val.(*MultiTenantOrganizationMemberState) + } + return nil +} +// GetTenantId gets the tenantId property value. Tenant ID of the Microsoft Entra tenant added to the multitenant organization. Set at the time tenant is added.Supports $filter. Key. +// returns a *string when successful +func (m *MultiTenantOrganizationMember) GetTenantId()(*string) { + val, err := m.GetBackingStore().Get("tenantId") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetTransitionDetails gets the transitionDetails property value. Details of the processing status for a tenant in a multitenant organization. Read-only. Nullable. +// returns a MultiTenantOrganizationMemberTransitionDetailsable when successful +func (m *MultiTenantOrganizationMember) GetTransitionDetails()(MultiTenantOrganizationMemberTransitionDetailsable) { + val, err := m.GetBackingStore().Get("transitionDetails") + if err != nil { + panic(err) + } + if val != nil { + return val.(MultiTenantOrganizationMemberTransitionDetailsable) + } + return nil +} +// Serialize serializes information the current object +func (m *MultiTenantOrganizationMember) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DirectoryObject.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteUUIDValue("addedByTenantId", m.GetAddedByTenantId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("addedDateTime", m.GetAddedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("joinedDateTime", m.GetJoinedDateTime()) + if err != nil { + return err + } + } + if m.GetRole() != nil { + cast := (*m.GetRole()).String() + err = writer.WriteStringValue("role", &cast) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err = writer.WriteStringValue("state", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("tenantId", m.GetTenantId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("transitionDetails", m.GetTransitionDetails()) + if err != nil { + return err + } + } + return nil +} +// SetAddedByTenantId sets the addedByTenantId property value. Tenant ID of the tenant that added the tenant to the multitenant organization. Read-only. +func (m *MultiTenantOrganizationMember) SetAddedByTenantId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + err := m.GetBackingStore().Set("addedByTenantId", value) + if err != nil { + panic(err) + } +} +// SetAddedDateTime sets the addedDateTime property value. Date and time when the tenant was added to the multitenant organization. Read-only. +func (m *MultiTenantOrganizationMember) SetAddedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + err := m.GetBackingStore().Set("addedDateTime", value) + if err != nil { + panic(err) + } +} +// SetDisplayName sets the displayName property value. Display name of the tenant added to the multitenant organization. +func (m *MultiTenantOrganizationMember) SetDisplayName(value *string)() { + err := m.GetBackingStore().Set("displayName", value) + if err != nil { + panic(err) + } +} +// SetJoinedDateTime sets the joinedDateTime property value. Date and time when the tenant joined the multitenant organization. Read-only. +func (m *MultiTenantOrganizationMember) SetJoinedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + err := m.GetBackingStore().Set("joinedDateTime", value) + if err != nil { + panic(err) + } +} +// SetRole sets the role property value. Role of the tenant in the multitenant organization. The possible values are: owner, member (default), unknownFutureValue. Tenants with the owner role can manage the multitenant organization but tenants with the member role can only participate in a multitenant organization. There can be multiple tenants with the owner role in a multitenant organization. +func (m *MultiTenantOrganizationMember) SetRole(value *MultiTenantOrganizationMemberRole)() { + err := m.GetBackingStore().Set("role", value) + if err != nil { + panic(err) + } +} +// SetState sets the state property value. State of the tenant in the multitenant organization. The possible values are: pending, active, removed, unknownFutureValue. Tenants in the pending state must join the multitenant organization to participate in the multitenant organization. Tenants in the active state can participate in the multitenant organization. Tenants in the removed state are in the process of being removed from the multitenant organization. Read-only. +func (m *MultiTenantOrganizationMember) SetState(value *MultiTenantOrganizationMemberState)() { + err := m.GetBackingStore().Set("state", value) + if err != nil { + panic(err) + } +} +// SetTenantId sets the tenantId property value. Tenant ID of the Microsoft Entra tenant added to the multitenant organization. Set at the time tenant is added.Supports $filter. Key. +func (m *MultiTenantOrganizationMember) SetTenantId(value *string)() { + err := m.GetBackingStore().Set("tenantId", value) + if err != nil { + panic(err) + } +} +// SetTransitionDetails sets the transitionDetails property value. Details of the processing status for a tenant in a multitenant organization. Read-only. Nullable. +func (m *MultiTenantOrganizationMember) SetTransitionDetails(value MultiTenantOrganizationMemberTransitionDetailsable)() { + err := m.GetBackingStore().Set("transitionDetails", value) + if err != nil { + panic(err) + } +} +type MultiTenantOrganizationMemberable interface { + DirectoryObjectable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAddedByTenantId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetAddedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDisplayName()(*string) + GetJoinedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetRole()(*MultiTenantOrganizationMemberRole) + GetState()(*MultiTenantOrganizationMemberState) + GetTenantId()(*string) + GetTransitionDetails()(MultiTenantOrganizationMemberTransitionDetailsable) + SetAddedByTenantId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetAddedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDisplayName(value *string)() + SetJoinedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetRole(value *MultiTenantOrganizationMemberRole)() + SetState(value *MultiTenantOrganizationMemberState)() + SetTenantId(value *string)() + SetTransitionDetails(value MultiTenantOrganizationMemberTransitionDetailsable)() +} diff --git a/models/multi_tenant_organization_member_collection_response.go b/models/multi_tenant_organization_member_collection_response.go new file mode 100644 index 0000000000..6c4d33af61 --- /dev/null +++ b/models/multi_tenant_organization_member_collection_response.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type MultiTenantOrganizationMemberCollectionResponse struct { + BaseCollectionPaginationCountResponse +} +// NewMultiTenantOrganizationMemberCollectionResponse instantiates a new MultiTenantOrganizationMemberCollectionResponse and sets the default values. +func NewMultiTenantOrganizationMemberCollectionResponse()(*MultiTenantOrganizationMemberCollectionResponse) { + m := &MultiTenantOrganizationMemberCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMultiTenantOrganizationMemberCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateMultiTenantOrganizationMemberCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMultiTenantOrganizationMemberCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *MultiTenantOrganizationMemberCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMultiTenantOrganizationMemberFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MultiTenantOrganizationMemberable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(MultiTenantOrganizationMemberable) + } + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +// returns a []MultiTenantOrganizationMemberable when successful +func (m *MultiTenantOrganizationMemberCollectionResponse) GetValue()([]MultiTenantOrganizationMemberable) { + val, err := m.GetBackingStore().Get("value") + if err != nil { + panic(err) + } + if val != nil { + return val.([]MultiTenantOrganizationMemberable) + } + return nil +} +// Serialize serializes information the current object +func (m *MultiTenantOrganizationMemberCollectionResponse) 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 *MultiTenantOrganizationMemberCollectionResponse) SetValue(value []MultiTenantOrganizationMemberable)() { + err := m.GetBackingStore().Set("value", value) + if err != nil { + panic(err) + } +} +type MultiTenantOrganizationMemberCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MultiTenantOrganizationMemberable) + SetValue(value []MultiTenantOrganizationMemberable)() +} diff --git a/models/multi_tenant_organization_member_processing_status.go b/models/multi_tenant_organization_member_processing_status.go new file mode 100644 index 0000000000..fa8a491968 --- /dev/null +++ b/models/multi_tenant_organization_member_processing_status.go @@ -0,0 +1,45 @@ +package models +import ( + "errors" +) +type MultiTenantOrganizationMemberProcessingStatus int + +const ( + NOTSTARTED_MULTITENANTORGANIZATIONMEMBERPROCESSINGSTATUS MultiTenantOrganizationMemberProcessingStatus = iota + RUNNING_MULTITENANTORGANIZATIONMEMBERPROCESSINGSTATUS + SUCCEEDED_MULTITENANTORGANIZATIONMEMBERPROCESSINGSTATUS + FAILED_MULTITENANTORGANIZATIONMEMBERPROCESSINGSTATUS + UNKNOWNFUTUREVALUE_MULTITENANTORGANIZATIONMEMBERPROCESSINGSTATUS +) + +func (i MultiTenantOrganizationMemberProcessingStatus) String() string { + return []string{"notStarted", "running", "succeeded", "failed", "unknownFutureValue"}[i] +} +func ParseMultiTenantOrganizationMemberProcessingStatus(v string) (any, error) { + result := NOTSTARTED_MULTITENANTORGANIZATIONMEMBERPROCESSINGSTATUS + switch v { + case "notStarted": + result = NOTSTARTED_MULTITENANTORGANIZATIONMEMBERPROCESSINGSTATUS + case "running": + result = RUNNING_MULTITENANTORGANIZATIONMEMBERPROCESSINGSTATUS + case "succeeded": + result = SUCCEEDED_MULTITENANTORGANIZATIONMEMBERPROCESSINGSTATUS + case "failed": + result = FAILED_MULTITENANTORGANIZATIONMEMBERPROCESSINGSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_MULTITENANTORGANIZATIONMEMBERPROCESSINGSTATUS + default: + return 0, errors.New("Unknown MultiTenantOrganizationMemberProcessingStatus value: " + v) + } + return &result, nil +} +func SerializeMultiTenantOrganizationMemberProcessingStatus(values []MultiTenantOrganizationMemberProcessingStatus) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i MultiTenantOrganizationMemberProcessingStatus) isMultiValue() bool { + return false +} diff --git a/models/multi_tenant_organization_member_role.go b/models/multi_tenant_organization_member_role.go new file mode 100644 index 0000000000..02c8a98bdc --- /dev/null +++ b/models/multi_tenant_organization_member_role.go @@ -0,0 +1,39 @@ +package models +import ( + "errors" +) +type MultiTenantOrganizationMemberRole int + +const ( + OWNER_MULTITENANTORGANIZATIONMEMBERROLE MultiTenantOrganizationMemberRole = iota + MEMBER_MULTITENANTORGANIZATIONMEMBERROLE + UNKNOWNFUTUREVALUE_MULTITENANTORGANIZATIONMEMBERROLE +) + +func (i MultiTenantOrganizationMemberRole) String() string { + return []string{"owner", "member", "unknownFutureValue"}[i] +} +func ParseMultiTenantOrganizationMemberRole(v string) (any, error) { + result := OWNER_MULTITENANTORGANIZATIONMEMBERROLE + switch v { + case "owner": + result = OWNER_MULTITENANTORGANIZATIONMEMBERROLE + case "member": + result = MEMBER_MULTITENANTORGANIZATIONMEMBERROLE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_MULTITENANTORGANIZATIONMEMBERROLE + default: + return 0, errors.New("Unknown MultiTenantOrganizationMemberRole value: " + v) + } + return &result, nil +} +func SerializeMultiTenantOrganizationMemberRole(values []MultiTenantOrganizationMemberRole) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i MultiTenantOrganizationMemberRole) isMultiValue() bool { + return false +} diff --git a/models/multi_tenant_organization_member_state.go b/models/multi_tenant_organization_member_state.go new file mode 100644 index 0000000000..5c6a2665ac --- /dev/null +++ b/models/multi_tenant_organization_member_state.go @@ -0,0 +1,42 @@ +package models +import ( + "errors" +) +type MultiTenantOrganizationMemberState int + +const ( + PENDING_MULTITENANTORGANIZATIONMEMBERSTATE MultiTenantOrganizationMemberState = iota + ACTIVE_MULTITENANTORGANIZATIONMEMBERSTATE + REMOVED_MULTITENANTORGANIZATIONMEMBERSTATE + UNKNOWNFUTUREVALUE_MULTITENANTORGANIZATIONMEMBERSTATE +) + +func (i MultiTenantOrganizationMemberState) String() string { + return []string{"pending", "active", "removed", "unknownFutureValue"}[i] +} +func ParseMultiTenantOrganizationMemberState(v string) (any, error) { + result := PENDING_MULTITENANTORGANIZATIONMEMBERSTATE + switch v { + case "pending": + result = PENDING_MULTITENANTORGANIZATIONMEMBERSTATE + case "active": + result = ACTIVE_MULTITENANTORGANIZATIONMEMBERSTATE + case "removed": + result = REMOVED_MULTITENANTORGANIZATIONMEMBERSTATE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_MULTITENANTORGANIZATIONMEMBERSTATE + default: + return 0, errors.New("Unknown MultiTenantOrganizationMemberState value: " + v) + } + return &result, nil +} +func SerializeMultiTenantOrganizationMemberState(values []MultiTenantOrganizationMemberState) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i MultiTenantOrganizationMemberState) isMultiValue() bool { + return false +} diff --git a/models/multi_tenant_organization_member_transition_details.go b/models/multi_tenant_organization_member_transition_details.go new file mode 100644 index 0000000000..c674af9b23 --- /dev/null +++ b/models/multi_tenant_organization_member_transition_details.go @@ -0,0 +1,264 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +type MultiTenantOrganizationMemberTransitionDetails struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewMultiTenantOrganizationMemberTransitionDetails instantiates a new MultiTenantOrganizationMemberTransitionDetails and sets the default values. +func NewMultiTenantOrganizationMemberTransitionDetails()(*MultiTenantOrganizationMemberTransitionDetails) { + m := &MultiTenantOrganizationMemberTransitionDetails{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateMultiTenantOrganizationMemberTransitionDetailsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateMultiTenantOrganizationMemberTransitionDetailsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMultiTenantOrganizationMemberTransitionDetails(), 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 *MultiTenantOrganizationMemberTransitionDetails) 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 *MultiTenantOrganizationMemberTransitionDetails) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetDesiredRole gets the desiredRole property value. Role of the tenant in the multitenant organization. The possible values are: owner, member, unknownFutureValue. +// returns a *MultiTenantOrganizationMemberRole when successful +func (m *MultiTenantOrganizationMemberTransitionDetails) GetDesiredRole()(*MultiTenantOrganizationMemberRole) { + val, err := m.GetBackingStore().Get("desiredRole") + if err != nil { + panic(err) + } + if val != nil { + return val.(*MultiTenantOrganizationMemberRole) + } + return nil +} +// GetDesiredState gets the desiredState property value. State of the tenant in the multitenant organization currently being processed. The possible values are: pending, active, removed, unknownFutureValue. Read-only. +// returns a *MultiTenantOrganizationMemberState when successful +func (m *MultiTenantOrganizationMemberTransitionDetails) GetDesiredState()(*MultiTenantOrganizationMemberState) { + val, err := m.GetBackingStore().Get("desiredState") + if err != nil { + panic(err) + } + if val != nil { + return val.(*MultiTenantOrganizationMemberState) + } + return nil +} +// GetDetails gets the details property value. Details that explain the processing status if any. Read-only. +// returns a *string when successful +func (m *MultiTenantOrganizationMemberTransitionDetails) GetDetails()(*string) { + val, err := m.GetBackingStore().Get("details") + 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 *MultiTenantOrganizationMemberTransitionDetails) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["desiredRole"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMultiTenantOrganizationMemberRole) + if err != nil { + return err + } + if val != nil { + m.SetDesiredRole(val.(*MultiTenantOrganizationMemberRole)) + } + return nil + } + res["desiredState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMultiTenantOrganizationMemberState) + if err != nil { + return err + } + if val != nil { + m.SetDesiredState(val.(*MultiTenantOrganizationMemberState)) + } + return nil + } + res["details"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDetails(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["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMultiTenantOrganizationMemberProcessingStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*MultiTenantOrganizationMemberProcessingStatus)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +// returns a *string when successful +func (m *MultiTenantOrganizationMemberTransitionDetails) GetOdataType()(*string) { + val, err := m.GetBackingStore().Get("odataType") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetStatus gets the status property value. Processing state of the asynchronous job. The possible values are: notStarted, running, succeeded, failed, unknownFutureValue. Read-only. +// returns a *MultiTenantOrganizationMemberProcessingStatus when successful +func (m *MultiTenantOrganizationMemberTransitionDetails) GetStatus()(*MultiTenantOrganizationMemberProcessingStatus) { + val, err := m.GetBackingStore().Get("status") + if err != nil { + panic(err) + } + if val != nil { + return val.(*MultiTenantOrganizationMemberProcessingStatus) + } + return nil +} +// Serialize serializes information the current object +func (m *MultiTenantOrganizationMemberTransitionDetails) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetDesiredRole() != nil { + cast := (*m.GetDesiredRole()).String() + err := writer.WriteStringValue("desiredRole", &cast) + if err != nil { + return err + } + } + if m.GetDesiredState() != nil { + cast := (*m.GetDesiredState()).String() + err := writer.WriteStringValue("desiredState", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("details", m.GetDetails()) + if err != nil { + return err + } + } + { + 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 *MultiTenantOrganizationMemberTransitionDetails) 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 *MultiTenantOrganizationMemberTransitionDetails) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetDesiredRole sets the desiredRole property value. Role of the tenant in the multitenant organization. The possible values are: owner, member, unknownFutureValue. +func (m *MultiTenantOrganizationMemberTransitionDetails) SetDesiredRole(value *MultiTenantOrganizationMemberRole)() { + err := m.GetBackingStore().Set("desiredRole", value) + if err != nil { + panic(err) + } +} +// SetDesiredState sets the desiredState property value. State of the tenant in the multitenant organization currently being processed. The possible values are: pending, active, removed, unknownFutureValue. Read-only. +func (m *MultiTenantOrganizationMemberTransitionDetails) SetDesiredState(value *MultiTenantOrganizationMemberState)() { + err := m.GetBackingStore().Set("desiredState", value) + if err != nil { + panic(err) + } +} +// SetDetails sets the details property value. Details that explain the processing status if any. Read-only. +func (m *MultiTenantOrganizationMemberTransitionDetails) SetDetails(value *string)() { + err := m.GetBackingStore().Set("details", value) + if err != nil { + panic(err) + } +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MultiTenantOrganizationMemberTransitionDetails) SetOdataType(value *string)() { + err := m.GetBackingStore().Set("odataType", value) + if err != nil { + panic(err) + } +} +// SetStatus sets the status property value. Processing state of the asynchronous job. The possible values are: notStarted, running, succeeded, failed, unknownFutureValue. Read-only. +func (m *MultiTenantOrganizationMemberTransitionDetails) SetStatus(value *MultiTenantOrganizationMemberProcessingStatus)() { + err := m.GetBackingStore().Set("status", value) + if err != nil { + panic(err) + } +} +type MultiTenantOrganizationMemberTransitionDetailsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetDesiredRole()(*MultiTenantOrganizationMemberRole) + GetDesiredState()(*MultiTenantOrganizationMemberState) + GetDetails()(*string) + GetOdataType()(*string) + GetStatus()(*MultiTenantOrganizationMemberProcessingStatus) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetDesiredRole(value *MultiTenantOrganizationMemberRole)() + SetDesiredState(value *MultiTenantOrganizationMemberState)() + SetDetails(value *string)() + SetOdataType(value *string)() + SetStatus(value *MultiTenantOrganizationMemberProcessingStatus)() +} diff --git a/models/multi_tenant_organization_partner_configuration_template.go b/models/multi_tenant_organization_partner_configuration_template.go new file mode 100644 index 0000000000..bc7e77ca85 --- /dev/null +++ b/models/multi_tenant_organization_partner_configuration_template.go @@ -0,0 +1,299 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type MultiTenantOrganizationPartnerConfigurationTemplate struct { + Entity +} +// NewMultiTenantOrganizationPartnerConfigurationTemplate instantiates a new MultiTenantOrganizationPartnerConfigurationTemplate and sets the default values. +func NewMultiTenantOrganizationPartnerConfigurationTemplate()(*MultiTenantOrganizationPartnerConfigurationTemplate) { + m := &MultiTenantOrganizationPartnerConfigurationTemplate{ + Entity: *NewEntity(), + } + return m +} +// CreateMultiTenantOrganizationPartnerConfigurationTemplateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateMultiTenantOrganizationPartnerConfigurationTemplateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMultiTenantOrganizationPartnerConfigurationTemplate(), nil +} +// GetAutomaticUserConsentSettings gets the automaticUserConsentSettings property value. Determines the partner-specific configuration for automatic user consent settings. Unless configured, the inboundAllowed and outboundAllowed properties are null and inherit from the default settings, which is always false. +// returns a InboundOutboundPolicyConfigurationable when successful +func (m *MultiTenantOrganizationPartnerConfigurationTemplate) GetAutomaticUserConsentSettings()(InboundOutboundPolicyConfigurationable) { + val, err := m.GetBackingStore().Get("automaticUserConsentSettings") + if err != nil { + panic(err) + } + if val != nil { + return val.(InboundOutboundPolicyConfigurationable) + } + return nil +} +// GetB2bCollaborationInbound gets the b2bCollaborationInbound property value. Defines your partner-specific configuration for users from other organizations accessing your resources via Microsoft Entra B2B collaboration. +// returns a CrossTenantAccessPolicyB2BSettingable when successful +func (m *MultiTenantOrganizationPartnerConfigurationTemplate) GetB2bCollaborationInbound()(CrossTenantAccessPolicyB2BSettingable) { + val, err := m.GetBackingStore().Get("b2bCollaborationInbound") + if err != nil { + panic(err) + } + if val != nil { + return val.(CrossTenantAccessPolicyB2BSettingable) + } + return nil +} +// GetB2bCollaborationOutbound gets the b2bCollaborationOutbound property value. Defines your partner-specific configuration for users in your organization going outbound to access resources in another organization via Microsoft Entra B2B collaboration. +// returns a CrossTenantAccessPolicyB2BSettingable when successful +func (m *MultiTenantOrganizationPartnerConfigurationTemplate) GetB2bCollaborationOutbound()(CrossTenantAccessPolicyB2BSettingable) { + val, err := m.GetBackingStore().Get("b2bCollaborationOutbound") + if err != nil { + panic(err) + } + if val != nil { + return val.(CrossTenantAccessPolicyB2BSettingable) + } + return nil +} +// GetB2bDirectConnectInbound gets the b2bDirectConnectInbound property value. Defines your partner-specific configuration for users from other organizations accessing your resources via Azure B2B direct connect. +// returns a CrossTenantAccessPolicyB2BSettingable when successful +func (m *MultiTenantOrganizationPartnerConfigurationTemplate) GetB2bDirectConnectInbound()(CrossTenantAccessPolicyB2BSettingable) { + val, err := m.GetBackingStore().Get("b2bDirectConnectInbound") + if err != nil { + panic(err) + } + if val != nil { + return val.(CrossTenantAccessPolicyB2BSettingable) + } + return nil +} +// GetB2bDirectConnectOutbound gets the b2bDirectConnectOutbound property value. Defines your partner-specific configuration for users in your organization going outbound to access resources in another organization via Microsoft Entra B2B direct connect. +// returns a CrossTenantAccessPolicyB2BSettingable when successful +func (m *MultiTenantOrganizationPartnerConfigurationTemplate) GetB2bDirectConnectOutbound()(CrossTenantAccessPolicyB2BSettingable) { + val, err := m.GetBackingStore().Get("b2bDirectConnectOutbound") + if err != nil { + panic(err) + } + if val != nil { + return val.(CrossTenantAccessPolicyB2BSettingable) + } + return nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *MultiTenantOrganizationPartnerConfigurationTemplate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["automaticUserConsentSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateInboundOutboundPolicyConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAutomaticUserConsentSettings(val.(InboundOutboundPolicyConfigurationable)) + } + return nil + } + res["b2bCollaborationInbound"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCrossTenantAccessPolicyB2BSettingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetB2bCollaborationInbound(val.(CrossTenantAccessPolicyB2BSettingable)) + } + return nil + } + res["b2bCollaborationOutbound"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCrossTenantAccessPolicyB2BSettingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetB2bCollaborationOutbound(val.(CrossTenantAccessPolicyB2BSettingable)) + } + return nil + } + res["b2bDirectConnectInbound"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCrossTenantAccessPolicyB2BSettingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetB2bDirectConnectInbound(val.(CrossTenantAccessPolicyB2BSettingable)) + } + return nil + } + res["b2bDirectConnectOutbound"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCrossTenantAccessPolicyB2BSettingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetB2bDirectConnectOutbound(val.(CrossTenantAccessPolicyB2BSettingable)) + } + return nil + } + res["inboundTrust"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCrossTenantAccessPolicyInboundTrustFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInboundTrust(val.(CrossTenantAccessPolicyInboundTrustable)) + } + return nil + } + res["templateApplicationLevel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseTemplateApplicationLevel) + if err != nil { + return err + } + if val != nil { + m.SetTemplateApplicationLevel(val.(*TemplateApplicationLevel)) + } + return nil + } + return res +} +// GetInboundTrust gets the inboundTrust property value. Determines the partner-specific configuration for trusting other Conditional Access claims from external Microsoft Entra organizations. +// returns a CrossTenantAccessPolicyInboundTrustable when successful +func (m *MultiTenantOrganizationPartnerConfigurationTemplate) GetInboundTrust()(CrossTenantAccessPolicyInboundTrustable) { + val, err := m.GetBackingStore().Get("inboundTrust") + if err != nil { + panic(err) + } + if val != nil { + return val.(CrossTenantAccessPolicyInboundTrustable) + } + return nil +} +// GetTemplateApplicationLevel gets the templateApplicationLevel property value. The templateApplicationLevel property +// returns a *TemplateApplicationLevel when successful +func (m *MultiTenantOrganizationPartnerConfigurationTemplate) GetTemplateApplicationLevel()(*TemplateApplicationLevel) { + val, err := m.GetBackingStore().Get("templateApplicationLevel") + if err != nil { + panic(err) + } + if val != nil { + return val.(*TemplateApplicationLevel) + } + return nil +} +// Serialize serializes information the current object +func (m *MultiTenantOrganizationPartnerConfigurationTemplate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("automaticUserConsentSettings", m.GetAutomaticUserConsentSettings()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("b2bCollaborationInbound", m.GetB2bCollaborationInbound()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("b2bCollaborationOutbound", m.GetB2bCollaborationOutbound()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("b2bDirectConnectInbound", m.GetB2bDirectConnectInbound()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("b2bDirectConnectOutbound", m.GetB2bDirectConnectOutbound()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("inboundTrust", m.GetInboundTrust()) + if err != nil { + return err + } + } + if m.GetTemplateApplicationLevel() != nil { + cast := (*m.GetTemplateApplicationLevel()).String() + err = writer.WriteStringValue("templateApplicationLevel", &cast) + if err != nil { + return err + } + } + return nil +} +// SetAutomaticUserConsentSettings sets the automaticUserConsentSettings property value. Determines the partner-specific configuration for automatic user consent settings. Unless configured, the inboundAllowed and outboundAllowed properties are null and inherit from the default settings, which is always false. +func (m *MultiTenantOrganizationPartnerConfigurationTemplate) SetAutomaticUserConsentSettings(value InboundOutboundPolicyConfigurationable)() { + err := m.GetBackingStore().Set("automaticUserConsentSettings", value) + if err != nil { + panic(err) + } +} +// SetB2bCollaborationInbound sets the b2bCollaborationInbound property value. Defines your partner-specific configuration for users from other organizations accessing your resources via Microsoft Entra B2B collaboration. +func (m *MultiTenantOrganizationPartnerConfigurationTemplate) SetB2bCollaborationInbound(value CrossTenantAccessPolicyB2BSettingable)() { + err := m.GetBackingStore().Set("b2bCollaborationInbound", value) + if err != nil { + panic(err) + } +} +// SetB2bCollaborationOutbound sets the b2bCollaborationOutbound property value. Defines your partner-specific configuration for users in your organization going outbound to access resources in another organization via Microsoft Entra B2B collaboration. +func (m *MultiTenantOrganizationPartnerConfigurationTemplate) SetB2bCollaborationOutbound(value CrossTenantAccessPolicyB2BSettingable)() { + err := m.GetBackingStore().Set("b2bCollaborationOutbound", value) + if err != nil { + panic(err) + } +} +// SetB2bDirectConnectInbound sets the b2bDirectConnectInbound property value. Defines your partner-specific configuration for users from other organizations accessing your resources via Azure B2B direct connect. +func (m *MultiTenantOrganizationPartnerConfigurationTemplate) SetB2bDirectConnectInbound(value CrossTenantAccessPolicyB2BSettingable)() { + err := m.GetBackingStore().Set("b2bDirectConnectInbound", value) + if err != nil { + panic(err) + } +} +// SetB2bDirectConnectOutbound sets the b2bDirectConnectOutbound property value. Defines your partner-specific configuration for users in your organization going outbound to access resources in another organization via Microsoft Entra B2B direct connect. +func (m *MultiTenantOrganizationPartnerConfigurationTemplate) SetB2bDirectConnectOutbound(value CrossTenantAccessPolicyB2BSettingable)() { + err := m.GetBackingStore().Set("b2bDirectConnectOutbound", value) + if err != nil { + panic(err) + } +} +// SetInboundTrust sets the inboundTrust property value. Determines the partner-specific configuration for trusting other Conditional Access claims from external Microsoft Entra organizations. +func (m *MultiTenantOrganizationPartnerConfigurationTemplate) SetInboundTrust(value CrossTenantAccessPolicyInboundTrustable)() { + err := m.GetBackingStore().Set("inboundTrust", value) + if err != nil { + panic(err) + } +} +// SetTemplateApplicationLevel sets the templateApplicationLevel property value. The templateApplicationLevel property +func (m *MultiTenantOrganizationPartnerConfigurationTemplate) SetTemplateApplicationLevel(value *TemplateApplicationLevel)() { + err := m.GetBackingStore().Set("templateApplicationLevel", value) + if err != nil { + panic(err) + } +} +type MultiTenantOrganizationPartnerConfigurationTemplateable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAutomaticUserConsentSettings()(InboundOutboundPolicyConfigurationable) + GetB2bCollaborationInbound()(CrossTenantAccessPolicyB2BSettingable) + GetB2bCollaborationOutbound()(CrossTenantAccessPolicyB2BSettingable) + GetB2bDirectConnectInbound()(CrossTenantAccessPolicyB2BSettingable) + GetB2bDirectConnectOutbound()(CrossTenantAccessPolicyB2BSettingable) + GetInboundTrust()(CrossTenantAccessPolicyInboundTrustable) + GetTemplateApplicationLevel()(*TemplateApplicationLevel) + SetAutomaticUserConsentSettings(value InboundOutboundPolicyConfigurationable)() + SetB2bCollaborationInbound(value CrossTenantAccessPolicyB2BSettingable)() + SetB2bCollaborationOutbound(value CrossTenantAccessPolicyB2BSettingable)() + SetB2bDirectConnectInbound(value CrossTenantAccessPolicyB2BSettingable)() + SetB2bDirectConnectOutbound(value CrossTenantAccessPolicyB2BSettingable)() + SetInboundTrust(value CrossTenantAccessPolicyInboundTrustable)() + SetTemplateApplicationLevel(value *TemplateApplicationLevel)() +} diff --git a/models/multi_tenant_organization_state.go b/models/multi_tenant_organization_state.go new file mode 100644 index 0000000000..c30c185c33 --- /dev/null +++ b/models/multi_tenant_organization_state.go @@ -0,0 +1,39 @@ +package models +import ( + "errors" +) +type MultiTenantOrganizationState int + +const ( + ACTIVE_MULTITENANTORGANIZATIONSTATE MultiTenantOrganizationState = iota + INACTIVE_MULTITENANTORGANIZATIONSTATE + UNKNOWNFUTUREVALUE_MULTITENANTORGANIZATIONSTATE +) + +func (i MultiTenantOrganizationState) String() string { + return []string{"active", "inactive", "unknownFutureValue"}[i] +} +func ParseMultiTenantOrganizationState(v string) (any, error) { + result := ACTIVE_MULTITENANTORGANIZATIONSTATE + switch v { + case "active": + result = ACTIVE_MULTITENANTORGANIZATIONSTATE + case "inactive": + result = INACTIVE_MULTITENANTORGANIZATIONSTATE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_MULTITENANTORGANIZATIONSTATE + default: + return 0, errors.New("Unknown MultiTenantOrganizationState value: " + v) + } + return &result, nil +} +func SerializeMultiTenantOrganizationState(values []MultiTenantOrganizationState) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i MultiTenantOrganizationState) isMultiValue() bool { + return false +} diff --git a/models/on_token_issuance_start_custom_extension.go b/models/on_token_issuance_start_custom_extension.go new file mode 100644 index 0000000000..fed1b50f2e --- /dev/null +++ b/models/on_token_issuance_start_custom_extension.go @@ -0,0 +1,90 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type OnTokenIssuanceStartCustomExtension struct { + CustomAuthenticationExtension +} +// NewOnTokenIssuanceStartCustomExtension instantiates a new OnTokenIssuanceStartCustomExtension and sets the default values. +func NewOnTokenIssuanceStartCustomExtension()(*OnTokenIssuanceStartCustomExtension) { + m := &OnTokenIssuanceStartCustomExtension{ + CustomAuthenticationExtension: *NewCustomAuthenticationExtension(), + } + odataTypeValue := "#microsoft.graph.onTokenIssuanceStartCustomExtension" + m.SetOdataType(&odataTypeValue) + return m +} +// CreateOnTokenIssuanceStartCustomExtensionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateOnTokenIssuanceStartCustomExtensionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOnTokenIssuanceStartCustomExtension(), nil +} +// GetClaimsForTokenConfiguration gets the claimsForTokenConfiguration property value. Collection of claims to be returned by the API called by this custom authentication extension. Used to populate claims mapping experience in Microsoft Entra admin center. Optional. +// returns a []OnTokenIssuanceStartReturnClaimable when successful +func (m *OnTokenIssuanceStartCustomExtension) GetClaimsForTokenConfiguration()([]OnTokenIssuanceStartReturnClaimable) { + val, err := m.GetBackingStore().Get("claimsForTokenConfiguration") + if err != nil { + panic(err) + } + if val != nil { + return val.([]OnTokenIssuanceStartReturnClaimable) + } + return nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *OnTokenIssuanceStartCustomExtension) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.CustomAuthenticationExtension.GetFieldDeserializers() + res["claimsForTokenConfiguration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOnTokenIssuanceStartReturnClaimFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OnTokenIssuanceStartReturnClaimable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(OnTokenIssuanceStartReturnClaimable) + } + } + m.SetClaimsForTokenConfiguration(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *OnTokenIssuanceStartCustomExtension) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.CustomAuthenticationExtension.Serialize(writer) + if err != nil { + return err + } + if m.GetClaimsForTokenConfiguration() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetClaimsForTokenConfiguration())) + for i, v := range m.GetClaimsForTokenConfiguration() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err = writer.WriteCollectionOfObjectValues("claimsForTokenConfiguration", cast) + if err != nil { + return err + } + } + return nil +} +// SetClaimsForTokenConfiguration sets the claimsForTokenConfiguration property value. Collection of claims to be returned by the API called by this custom authentication extension. Used to populate claims mapping experience in Microsoft Entra admin center. Optional. +func (m *OnTokenIssuanceStartCustomExtension) SetClaimsForTokenConfiguration(value []OnTokenIssuanceStartReturnClaimable)() { + err := m.GetBackingStore().Set("claimsForTokenConfiguration", value) + if err != nil { + panic(err) + } +} +type OnTokenIssuanceStartCustomExtensionable interface { + CustomAuthenticationExtensionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetClaimsForTokenConfiguration()([]OnTokenIssuanceStartReturnClaimable) + SetClaimsForTokenConfiguration(value []OnTokenIssuanceStartReturnClaimable)() +} diff --git a/models/on_token_issuance_start_custom_extension_handler.go b/models/on_token_issuance_start_custom_extension_handler.go new file mode 100644 index 0000000000..354c869b21 --- /dev/null +++ b/models/on_token_issuance_start_custom_extension_handler.go @@ -0,0 +1,115 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type OnTokenIssuanceStartCustomExtensionHandler struct { + OnTokenIssuanceStartHandler +} +// NewOnTokenIssuanceStartCustomExtensionHandler instantiates a new OnTokenIssuanceStartCustomExtensionHandler and sets the default values. +func NewOnTokenIssuanceStartCustomExtensionHandler()(*OnTokenIssuanceStartCustomExtensionHandler) { + m := &OnTokenIssuanceStartCustomExtensionHandler{ + OnTokenIssuanceStartHandler: *NewOnTokenIssuanceStartHandler(), + } + odataTypeValue := "#microsoft.graph.onTokenIssuanceStartCustomExtensionHandler" + m.SetOdataType(&odataTypeValue) + return m +} +// CreateOnTokenIssuanceStartCustomExtensionHandlerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateOnTokenIssuanceStartCustomExtensionHandlerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOnTokenIssuanceStartCustomExtensionHandler(), nil +} +// GetConfiguration gets the configuration property value. The configuration property +// returns a CustomExtensionOverwriteConfigurationable when successful +func (m *OnTokenIssuanceStartCustomExtensionHandler) GetConfiguration()(CustomExtensionOverwriteConfigurationable) { + val, err := m.GetBackingStore().Get("configuration") + if err != nil { + panic(err) + } + if val != nil { + return val.(CustomExtensionOverwriteConfigurationable) + } + return nil +} +// GetCustomExtension gets the customExtension property value. The customExtension property +// returns a OnTokenIssuanceStartCustomExtensionable when successful +func (m *OnTokenIssuanceStartCustomExtensionHandler) GetCustomExtension()(OnTokenIssuanceStartCustomExtensionable) { + val, err := m.GetBackingStore().Get("customExtension") + if err != nil { + panic(err) + } + if val != nil { + return val.(OnTokenIssuanceStartCustomExtensionable) + } + return nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *OnTokenIssuanceStartCustomExtensionHandler) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.OnTokenIssuanceStartHandler.GetFieldDeserializers() + res["configuration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCustomExtensionOverwriteConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetConfiguration(val.(CustomExtensionOverwriteConfigurationable)) + } + return nil + } + res["customExtension"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateOnTokenIssuanceStartCustomExtensionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCustomExtension(val.(OnTokenIssuanceStartCustomExtensionable)) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *OnTokenIssuanceStartCustomExtensionHandler) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.OnTokenIssuanceStartHandler.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("configuration", m.GetConfiguration()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("customExtension", m.GetCustomExtension()) + if err != nil { + return err + } + } + return nil +} +// SetConfiguration sets the configuration property value. The configuration property +func (m *OnTokenIssuanceStartCustomExtensionHandler) SetConfiguration(value CustomExtensionOverwriteConfigurationable)() { + err := m.GetBackingStore().Set("configuration", value) + if err != nil { + panic(err) + } +} +// SetCustomExtension sets the customExtension property value. The customExtension property +func (m *OnTokenIssuanceStartCustomExtensionHandler) SetCustomExtension(value OnTokenIssuanceStartCustomExtensionable)() { + err := m.GetBackingStore().Set("customExtension", value) + if err != nil { + panic(err) + } +} +type OnTokenIssuanceStartCustomExtensionHandlerable interface { + OnTokenIssuanceStartHandlerable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConfiguration()(CustomExtensionOverwriteConfigurationable) + GetCustomExtension()(OnTokenIssuanceStartCustomExtensionable) + SetConfiguration(value CustomExtensionOverwriteConfigurationable)() + SetCustomExtension(value OnTokenIssuanceStartCustomExtensionable)() +} diff --git a/models/on_token_issuance_start_handler.go b/models/on_token_issuance_start_handler.go new file mode 100644 index 0000000000..b6fb5de0bf --- /dev/null +++ b/models/on_token_issuance_start_handler.go @@ -0,0 +1,131 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +type OnTokenIssuanceStartHandler struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewOnTokenIssuanceStartHandler instantiates a new OnTokenIssuanceStartHandler and sets the default values. +func NewOnTokenIssuanceStartHandler()(*OnTokenIssuanceStartHandler) { + m := &OnTokenIssuanceStartHandler{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateOnTokenIssuanceStartHandlerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateOnTokenIssuanceStartHandlerFromDiscriminatorValue(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.onTokenIssuanceStartCustomExtensionHandler": + return NewOnTokenIssuanceStartCustomExtensionHandler(), nil + } + } + } + } + return NewOnTokenIssuanceStartHandler(), 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 *OnTokenIssuanceStartHandler) 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 *OnTokenIssuanceStartHandler) 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 *OnTokenIssuanceStartHandler) 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 *OnTokenIssuanceStartHandler) 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 *OnTokenIssuanceStartHandler) 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 *OnTokenIssuanceStartHandler) 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 *OnTokenIssuanceStartHandler) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *OnTokenIssuanceStartHandler) SetOdataType(value *string)() { + err := m.GetBackingStore().Set("odataType", value) + if err != nil { + panic(err) + } +} +type OnTokenIssuanceStartHandlerable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetOdataType()(*string) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetOdataType(value *string)() +} diff --git a/models/on_token_issuance_start_listener.go b/models/on_token_issuance_start_listener.go new file mode 100644 index 0000000000..f0e00381c7 --- /dev/null +++ b/models/on_token_issuance_start_listener.go @@ -0,0 +1,78 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type OnTokenIssuanceStartListener struct { + AuthenticationEventListener +} +// NewOnTokenIssuanceStartListener instantiates a new OnTokenIssuanceStartListener and sets the default values. +func NewOnTokenIssuanceStartListener()(*OnTokenIssuanceStartListener) { + m := &OnTokenIssuanceStartListener{ + AuthenticationEventListener: *NewAuthenticationEventListener(), + } + odataTypeValue := "#microsoft.graph.onTokenIssuanceStartListener" + m.SetOdataType(&odataTypeValue) + return m +} +// CreateOnTokenIssuanceStartListenerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateOnTokenIssuanceStartListenerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOnTokenIssuanceStartListener(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *OnTokenIssuanceStartListener) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AuthenticationEventListener.GetFieldDeserializers() + res["handler"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateOnTokenIssuanceStartHandlerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetHandler(val.(OnTokenIssuanceStartHandlerable)) + } + return nil + } + return res +} +// GetHandler gets the handler property value. The handler to invoke when conditions are met for this onTokenIssuanceStartListener. +// returns a OnTokenIssuanceStartHandlerable when successful +func (m *OnTokenIssuanceStartListener) GetHandler()(OnTokenIssuanceStartHandlerable) { + val, err := m.GetBackingStore().Get("handler") + if err != nil { + panic(err) + } + if val != nil { + return val.(OnTokenIssuanceStartHandlerable) + } + return nil +} +// Serialize serializes information the current object +func (m *OnTokenIssuanceStartListener) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AuthenticationEventListener.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("handler", m.GetHandler()) + if err != nil { + return err + } + } + return nil +} +// SetHandler sets the handler property value. The handler to invoke when conditions are met for this onTokenIssuanceStartListener. +func (m *OnTokenIssuanceStartListener) SetHandler(value OnTokenIssuanceStartHandlerable)() { + err := m.GetBackingStore().Set("handler", value) + if err != nil { + panic(err) + } +} +type OnTokenIssuanceStartListenerable interface { + AuthenticationEventListenerable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetHandler()(OnTokenIssuanceStartHandlerable) + SetHandler(value OnTokenIssuanceStartHandlerable)() +} diff --git a/models/on_token_issuance_start_return_claim.go b/models/on_token_issuance_start_return_claim.go new file mode 100644 index 0000000000..36318d13bd --- /dev/null +++ b/models/on_token_issuance_start_return_claim.go @@ -0,0 +1,150 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +type OnTokenIssuanceStartReturnClaim struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewOnTokenIssuanceStartReturnClaim instantiates a new OnTokenIssuanceStartReturnClaim and sets the default values. +func NewOnTokenIssuanceStartReturnClaim()(*OnTokenIssuanceStartReturnClaim) { + m := &OnTokenIssuanceStartReturnClaim{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateOnTokenIssuanceStartReturnClaimFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateOnTokenIssuanceStartReturnClaimFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOnTokenIssuanceStartReturnClaim(), 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 *OnTokenIssuanceStartReturnClaim) 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 *OnTokenIssuanceStartReturnClaim) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetClaimIdInApiResponse gets the claimIdInApiResponse property value. The identifier of the claim returned by an API that is to be add to a token being issued. +// returns a *string when successful +func (m *OnTokenIssuanceStartReturnClaim) GetClaimIdInApiResponse()(*string) { + val, err := m.GetBackingStore().Get("claimIdInApiResponse") + 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 *OnTokenIssuanceStartReturnClaim) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["claimIdInApiResponse"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetClaimIdInApiResponse(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 *OnTokenIssuanceStartReturnClaim) 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 *OnTokenIssuanceStartReturnClaim) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("claimIdInApiResponse", m.GetClaimIdInApiResponse()) + if err != nil { + return err + } + } + { + 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 *OnTokenIssuanceStartReturnClaim) 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 *OnTokenIssuanceStartReturnClaim) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetClaimIdInApiResponse sets the claimIdInApiResponse property value. The identifier of the claim returned by an API that is to be add to a token being issued. +func (m *OnTokenIssuanceStartReturnClaim) SetClaimIdInApiResponse(value *string)() { + err := m.GetBackingStore().Set("claimIdInApiResponse", value) + if err != nil { + panic(err) + } +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *OnTokenIssuanceStartReturnClaim) SetOdataType(value *string)() { + err := m.GetBackingStore().Set("odataType", value) + if err != nil { + panic(err) + } +} +type OnTokenIssuanceStartReturnClaimable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetClaimIdInApiResponse()(*string) + GetOdataType()(*string) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetClaimIdInApiResponse(value *string)() + SetOdataType(value *string)() +} diff --git a/models/policy_template.go b/models/policy_template.go new file mode 100644 index 0000000000..c763b8ac57 --- /dev/null +++ b/models/policy_template.go @@ -0,0 +1,113 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type PolicyTemplate struct { + Entity +} +// NewPolicyTemplate instantiates a new PolicyTemplate and sets the default values. +func NewPolicyTemplate()(*PolicyTemplate) { + m := &PolicyTemplate{ + Entity: *NewEntity(), + } + return m +} +// CreatePolicyTemplateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePolicyTemplateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPolicyTemplate(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PolicyTemplate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["multiTenantOrganizationIdentitySynchronization"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMultiTenantOrganizationIdentitySyncPolicyTemplateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMultiTenantOrganizationIdentitySynchronization(val.(MultiTenantOrganizationIdentitySyncPolicyTemplateable)) + } + return nil + } + res["multiTenantOrganizationPartnerConfiguration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMultiTenantOrganizationPartnerConfigurationTemplateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMultiTenantOrganizationPartnerConfiguration(val.(MultiTenantOrganizationPartnerConfigurationTemplateable)) + } + return nil + } + return res +} +// GetMultiTenantOrganizationIdentitySynchronization gets the multiTenantOrganizationIdentitySynchronization property value. Defines an optional cross-tenant access policy template with user synchronization settings for a multitenant organization. +// returns a MultiTenantOrganizationIdentitySyncPolicyTemplateable when successful +func (m *PolicyTemplate) GetMultiTenantOrganizationIdentitySynchronization()(MultiTenantOrganizationIdentitySyncPolicyTemplateable) { + val, err := m.GetBackingStore().Get("multiTenantOrganizationIdentitySynchronization") + if err != nil { + panic(err) + } + if val != nil { + return val.(MultiTenantOrganizationIdentitySyncPolicyTemplateable) + } + return nil +} +// GetMultiTenantOrganizationPartnerConfiguration gets the multiTenantOrganizationPartnerConfiguration property value. Defines an optional cross-tenant access policy template with inbound and outbound partner configuration settings for a multitenant organization. +// returns a MultiTenantOrganizationPartnerConfigurationTemplateable when successful +func (m *PolicyTemplate) GetMultiTenantOrganizationPartnerConfiguration()(MultiTenantOrganizationPartnerConfigurationTemplateable) { + val, err := m.GetBackingStore().Get("multiTenantOrganizationPartnerConfiguration") + if err != nil { + panic(err) + } + if val != nil { + return val.(MultiTenantOrganizationPartnerConfigurationTemplateable) + } + return nil +} +// Serialize serializes information the current object +func (m *PolicyTemplate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("multiTenantOrganizationIdentitySynchronization", m.GetMultiTenantOrganizationIdentitySynchronization()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("multiTenantOrganizationPartnerConfiguration", m.GetMultiTenantOrganizationPartnerConfiguration()) + if err != nil { + return err + } + } + return nil +} +// SetMultiTenantOrganizationIdentitySynchronization sets the multiTenantOrganizationIdentitySynchronization property value. Defines an optional cross-tenant access policy template with user synchronization settings for a multitenant organization. +func (m *PolicyTemplate) SetMultiTenantOrganizationIdentitySynchronization(value MultiTenantOrganizationIdentitySyncPolicyTemplateable)() { + err := m.GetBackingStore().Set("multiTenantOrganizationIdentitySynchronization", value) + if err != nil { + panic(err) + } +} +// SetMultiTenantOrganizationPartnerConfiguration sets the multiTenantOrganizationPartnerConfiguration property value. Defines an optional cross-tenant access policy template with inbound and outbound partner configuration settings for a multitenant organization. +func (m *PolicyTemplate) SetMultiTenantOrganizationPartnerConfiguration(value MultiTenantOrganizationPartnerConfigurationTemplateable)() { + err := m.GetBackingStore().Set("multiTenantOrganizationPartnerConfiguration", value) + if err != nil { + panic(err) + } +} +type PolicyTemplateable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMultiTenantOrganizationIdentitySynchronization()(MultiTenantOrganizationIdentitySyncPolicyTemplateable) + GetMultiTenantOrganizationPartnerConfiguration()(MultiTenantOrganizationPartnerConfigurationTemplateable) + SetMultiTenantOrganizationIdentitySynchronization(value MultiTenantOrganizationIdentitySyncPolicyTemplateable)() + SetMultiTenantOrganizationPartnerConfiguration(value MultiTenantOrganizationPartnerConfigurationTemplateable)() +} diff --git a/models/security/detection_source.go b/models/security/detection_source.go index ea2c94cff5..37f0666aad 100644 --- a/models/security/detection_source.go +++ b/models/security/detection_source.go @@ -39,11 +39,12 @@ const ( SCHEDULEDALERTS_DETECTIONSOURCE MICROSOFTDEFENDERTHREATINTELLIGENCEANALYTICS_DETECTIONSOURCE BUILTINML_DETECTIONSOURCE + MICROSOFTINSIDERRISKMANAGEMENT_DETECTIONSOURCE MICROSOFTSENTINEL_DETECTIONSOURCE ) func (i DetectionSource) String() string { - return []string{"unknown", "microsoftDefenderForEndpoint", "antivirus", "smartScreen", "customTi", "microsoftDefenderForOffice365", "automatedInvestigation", "microsoftThreatExperts", "customDetection", "microsoftDefenderForIdentity", "cloudAppSecurity", "microsoft365Defender", "azureAdIdentityProtection", "manual", "microsoftDataLossPrevention", "appGovernancePolicy", "appGovernanceDetection", "unknownFutureValue", "microsoftDefenderForCloud", "microsoftDefenderForIoT", "microsoftDefenderForServers", "microsoftDefenderForStorage", "microsoftDefenderForDNS", "microsoftDefenderForDatabases", "microsoftDefenderForContainers", "microsoftDefenderForNetwork", "microsoftDefenderForAppService", "microsoftDefenderForKeyVault", "microsoftDefenderForResourceManager", "microsoftDefenderForApiManagement", "nrtAlerts", "scheduledAlerts", "microsoftDefenderThreatIntelligenceAnalytics", "builtInMl", "microsoftSentinel"}[i] + return []string{"unknown", "microsoftDefenderForEndpoint", "antivirus", "smartScreen", "customTi", "microsoftDefenderForOffice365", "automatedInvestigation", "microsoftThreatExperts", "customDetection", "microsoftDefenderForIdentity", "cloudAppSecurity", "microsoft365Defender", "azureAdIdentityProtection", "manual", "microsoftDataLossPrevention", "appGovernancePolicy", "appGovernanceDetection", "unknownFutureValue", "microsoftDefenderForCloud", "microsoftDefenderForIoT", "microsoftDefenderForServers", "microsoftDefenderForStorage", "microsoftDefenderForDNS", "microsoftDefenderForDatabases", "microsoftDefenderForContainers", "microsoftDefenderForNetwork", "microsoftDefenderForAppService", "microsoftDefenderForKeyVault", "microsoftDefenderForResourceManager", "microsoftDefenderForApiManagement", "nrtAlerts", "scheduledAlerts", "microsoftDefenderThreatIntelligenceAnalytics", "builtInMl", "microsoftInsiderRiskManagement", "microsoftSentinel"}[i] } func ParseDetectionSource(v string) (any, error) { result := UNKNOWN_DETECTIONSOURCE @@ -116,6 +117,8 @@ func ParseDetectionSource(v string) (any, error) { result = MICROSOFTDEFENDERTHREATINTELLIGENCEANALYTICS_DETECTIONSOURCE case "builtInMl": result = BUILTINML_DETECTIONSOURCE + case "microsoftInsiderRiskManagement": + result = MICROSOFTINSIDERRISKMANAGEMENT_DETECTIONSOURCE case "microsoftSentinel": result = MICROSOFTSENTINEL_DETECTIONSOURCE default: diff --git a/models/security/service_source.go b/models/security/service_source.go index b4d93ad4be..e8de3291a9 100644 --- a/models/security/service_source.go +++ b/models/security/service_source.go @@ -17,10 +17,11 @@ const ( UNKNOWNFUTUREVALUE_SERVICESOURCE MICROSOFTDEFENDERFORCLOUD_SERVICESOURCE MICROSOFTSENTINEL_SERVICESOURCE + MICROSOFTINSIDERRISKMANAGEMENT_SERVICESOURCE ) func (i ServiceSource) String() string { - return []string{"unknown", "microsoftDefenderForEndpoint", "microsoftDefenderForIdentity", "microsoftDefenderForCloudApps", "microsoftDefenderForOffice365", "microsoft365Defender", "azureAdIdentityProtection", "microsoftAppGovernance", "dataLossPrevention", "unknownFutureValue", "microsoftDefenderForCloud", "microsoftSentinel"}[i] + return []string{"unknown", "microsoftDefenderForEndpoint", "microsoftDefenderForIdentity", "microsoftDefenderForCloudApps", "microsoftDefenderForOffice365", "microsoft365Defender", "azureAdIdentityProtection", "microsoftAppGovernance", "dataLossPrevention", "unknownFutureValue", "microsoftDefenderForCloud", "microsoftSentinel", "microsoftInsiderRiskManagement"}[i] } func ParseServiceSource(v string) (any, error) { result := UNKNOWN_SERVICESOURCE @@ -49,6 +50,8 @@ func ParseServiceSource(v string) (any, error) { result = MICROSOFTDEFENDERFORCLOUD_SERVICESOURCE case "microsoftSentinel": result = MICROSOFTSENTINEL_SERVICESOURCE + case "microsoftInsiderRiskManagement": + result = MICROSOFTINSIDERRISKMANAGEMENT_SERVICESOURCE default: return 0, errors.New("Unknown ServiceSource value: " + v) } diff --git a/models/template_application_level.go b/models/template_application_level.go new file mode 100644 index 0000000000..31b3419a77 --- /dev/null +++ b/models/template_application_level.go @@ -0,0 +1,55 @@ +package models +import ( + "errors" + "math" + "strings" +) +type TemplateApplicationLevel int + +const ( + NONE_TEMPLATEAPPLICATIONLEVEL = 1 + NEWPARTNERS_TEMPLATEAPPLICATIONLEVEL = 2 + EXISTINGPARTNERS_TEMPLATEAPPLICATIONLEVEL = 4 + UNKNOWNFUTUREVALUE_TEMPLATEAPPLICATIONLEVEL = 8 +) + +func (i TemplateApplicationLevel) String() string { + var values []string + options := []string{"none", "newPartners", "existingPartners", "unknownFutureValue"} + for p := 0; p < 4; p++ { + mantis := TemplateApplicationLevel(int(math.Pow(2, float64(p)))) + if i&mantis == mantis { + values = append(values, options[p]) + } + } + return strings.Join(values, ",") +} +func ParseTemplateApplicationLevel(v string) (any, error) { + var result TemplateApplicationLevel + values := strings.Split(v, ",") + for _, str := range values { + switch str { + case "none": + result |= NONE_TEMPLATEAPPLICATIONLEVEL + case "newPartners": + result |= NEWPARTNERS_TEMPLATEAPPLICATIONLEVEL + case "existingPartners": + result |= EXISTINGPARTNERS_TEMPLATEAPPLICATIONLEVEL + case "unknownFutureValue": + result |= UNKNOWNFUTUREVALUE_TEMPLATEAPPLICATIONLEVEL + default: + return 0, errors.New("Unknown TemplateApplicationLevel value: " + v) + } + } + return &result, nil +} +func SerializeTemplateApplicationLevel(values []TemplateApplicationLevel) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i TemplateApplicationLevel) isMultiValue() bool { + return true +} diff --git a/models/tenant_relationship.go b/models/tenant_relationship.go index 3bbba6a727..60b61ff711 100644 --- a/models/tenant_relationship.go +++ b/models/tenant_relationship.go @@ -100,6 +100,16 @@ func (m *TenantRelationship) GetFieldDeserializers()(map[string]func(i878a80d233 } return nil } + res["multiTenantOrganization"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMultiTenantOrganizationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMultiTenantOrganization(val.(MultiTenantOrganizationable)) + } + return nil + } res["@odata.type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -112,6 +122,18 @@ func (m *TenantRelationship) GetFieldDeserializers()(map[string]func(i878a80d233 } return res } +// GetMultiTenantOrganization gets the multiTenantOrganization property value. Defines an organization with more than one instance of Microsoft Entra ID. +// returns a MultiTenantOrganizationable when successful +func (m *TenantRelationship) GetMultiTenantOrganization()(MultiTenantOrganizationable) { + val, err := m.GetBackingStore().Get("multiTenantOrganization") + if err != nil { + panic(err) + } + if val != nil { + return val.(MultiTenantOrganizationable) + } + return nil +} // GetOdataType gets the @odata.type property value. The OdataType property // returns a *string when successful func (m *TenantRelationship) GetOdataType()(*string) { @@ -150,6 +172,12 @@ func (m *TenantRelationship) Serialize(writer i878a80d2330e89d26896388a3f487eef2 return err } } + { + err := writer.WriteObjectValue("multiTenantOrganization", m.GetMultiTenantOrganization()) + if err != nil { + return err + } + } { err := writer.WriteStringValue("@odata.type", m.GetOdataType()) if err != nil { @@ -189,6 +217,13 @@ func (m *TenantRelationship) SetDelegatedAdminRelationships(value []DelegatedAdm panic(err) } } +// SetMultiTenantOrganization sets the multiTenantOrganization property value. Defines an organization with more than one instance of Microsoft Entra ID. +func (m *TenantRelationship) SetMultiTenantOrganization(value MultiTenantOrganizationable)() { + err := m.GetBackingStore().Set("multiTenantOrganization", value) + if err != nil { + panic(err) + } +} // SetOdataType sets the @odata.type property value. The OdataType property func (m *TenantRelationship) SetOdataType(value *string)() { err := m.GetBackingStore().Set("odataType", value) @@ -203,9 +238,11 @@ type TenantRelationshipable interface { GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) GetDelegatedAdminCustomers()([]DelegatedAdminCustomerable) GetDelegatedAdminRelationships()([]DelegatedAdminRelationshipable) + GetMultiTenantOrganization()(MultiTenantOrganizationable) GetOdataType()(*string) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() SetDelegatedAdminCustomers(value []DelegatedAdminCustomerable)() SetDelegatedAdminRelationships(value []DelegatedAdminRelationshipable)() + SetMultiTenantOrganization(value MultiTenantOrganizationable)() SetOdataType(value *string)() } diff --git a/models/verified_domain.go b/models/verified_domain.go index 79aba43f87..fd4bd8e72a 100644 --- a/models/verified_domain.go +++ b/models/verified_domain.go @@ -142,7 +142,7 @@ func (m *VerifiedDomain) GetIsInitial()(*bool) { } return nil } -// GetName gets the name property value. The domain name; for example, contoso.com`. +// GetName gets the name property value. The domain name; for example, contoso.com. // returns a *string when successful func (m *VerifiedDomain) GetName()(*string) { val, err := m.GetBackingStore().Get("name") @@ -256,7 +256,7 @@ func (m *VerifiedDomain) SetIsInitial(value *bool)() { panic(err) } } -// SetName sets the name property value. The domain name; for example, contoso.com`. +// SetName sets the name property value. The domain name; for example, contoso.com. func (m *VerifiedDomain) SetName(value *string)() { err := m.GetBackingStore().Set("name", value) if err != nil { diff --git a/organization/organization_item_request_builder.go b/organization/organization_item_request_builder.go index 4bced9c774..b4bbc68fea 100644 --- a/organization/organization_item_request_builder.go +++ b/organization/organization_item_request_builder.go @@ -18,7 +18,7 @@ type OrganizationItemRequestBuilderDeleteRequestConfiguration struct { // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// OrganizationItemRequestBuilderGetQueryParameters get the properties and relationships of the currently authenticated organization. Since the organization resource supports extensions, you can also use the GET operation to get custom properties and extension data in an organization instance. +// OrganizationItemRequestBuilderGetQueryParameters read properties and relationships of the organization object. type OrganizationItemRequestBuilderGetQueryParameters struct { // Expand related entities Expand []string `uriparametername:"%24expand"` @@ -95,12 +95,12 @@ func (m *OrganizationItemRequestBuilder) Delete(ctx context.Context, requestConf func (m *OrganizationItemRequestBuilder) Extensions()(*ItemExtensionsRequestBuilder) { return NewItemExtensionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Get get the properties and relationships of the currently authenticated organization. Since the organization resource supports extensions, you can also use the GET operation to get custom properties and extension data in an organization instance. +// Get read properties and relationships of the organization object. // returns a Organizationable 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/organization-get?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/intune-onboarding-organization-get?view=graph-rest-1.0 func (m *OrganizationItemRequestBuilder) Get(ctx context.Context, requestConfiguration *OrganizationItemRequestBuilderGetRequestConfiguration)(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.Organizationable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -172,7 +172,7 @@ func (m *OrganizationItemRequestBuilder) ToDeleteRequestInformation(ctx context. requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToGetRequestInformation get the properties and relationships of the currently authenticated organization. Since the organization resource supports extensions, you can also use the GET operation to get custom properties and extension data in an organization instance. +// ToGetRequestInformation read properties and relationships of the organization object. // returns a *RequestInformation when successful func (m *OrganizationItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *OrganizationItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/organization/organization_request_builder.go b/organization/organization_request_builder.go index d59c4559ee..17ae3d1ceb 100644 --- a/organization/organization_request_builder.go +++ b/organization/organization_request_builder.go @@ -11,7 +11,7 @@ import ( type OrganizationRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// OrganizationRequestBuilderGetQueryParameters retrieve a list of organization objects. There's only one organization object in the collection. +// OrganizationRequestBuilderGetQueryParameters list properties and relationships of the organization objects. type OrganizationRequestBuilderGetQueryParameters struct { // Include count of items Count *bool `uriparametername:"%24count"` @@ -81,12 +81,12 @@ func (m *OrganizationRequestBuilder) Count()(*CountRequestBuilder) { func (m *OrganizationRequestBuilder) Delta()(*DeltaRequestBuilder) { return NewDeltaRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Get retrieve a list of organization objects. There's only one organization object in the collection. +// Get list properties and relationships of the organization objects. // returns a OrganizationCollectionResponseable 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/organization-list?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/intune-onboarding-organization-list?view=graph-rest-1.0 func (m *OrganizationRequestBuilder) Get(ctx context.Context, requestConfiguration *OrganizationRequestBuilderGetRequestConfiguration)(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.OrganizationCollectionResponseable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -134,7 +134,7 @@ func (m *OrganizationRequestBuilder) Post(ctx context.Context, body iadcd8112441 } return res.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.Organizationable), nil } -// ToGetRequestInformation retrieve a list of organization objects. There's only one organization object in the collection. +// ToGetRequestInformation list properties and relationships of the organization objects. // returns a *RequestInformation when successful func (m *OrganizationRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *OrganizationRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/policies/cross_tenant_access_policy_request_builder.go b/policies/cross_tenant_access_policy_request_builder.go index b1455dc1dc..d4782102ff 100644 --- a/policies/cross_tenant_access_policy_request_builder.go +++ b/policies/cross_tenant_access_policy_request_builder.go @@ -120,6 +120,11 @@ func (m *CrossTenantAccessPolicyRequestBuilder) Patch(ctx context.Context, body } return res.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CrossTenantAccessPolicyable), nil } +// Templates provides operations to manage the templates property of the microsoft.graph.crossTenantAccessPolicy entity. +// returns a *CrossTenantAccessPolicyTemplatesRequestBuilder when successful +func (m *CrossTenantAccessPolicyRequestBuilder) Templates()(*CrossTenantAccessPolicyTemplatesRequestBuilder) { + return NewCrossTenantAccessPolicyTemplatesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToDeleteRequestInformation delete navigation property crossTenantAccessPolicy for policies // returns a *RequestInformation when successful func (m *CrossTenantAccessPolicyRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *CrossTenantAccessPolicyRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { diff --git a/policies/cross_tenant_access_policy_templates_multi_tenant_organization_identity_synchronization_request_builder.go b/policies/cross_tenant_access_policy_templates_multi_tenant_organization_identity_synchronization_request_builder.go new file mode 100644 index 0000000000..69b9752568 --- /dev/null +++ b/policies/cross_tenant_access_policy_templates_multi_tenant_organization_identity_synchronization_request_builder.go @@ -0,0 +1,157 @@ +package policies + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242 "github.com/microsoftgraph/msgraph-sdk-go/models" + ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a "github.com/microsoftgraph/msgraph-sdk-go/models/odataerrors" +) + +// CrossTenantAccessPolicyTemplatesMultiTenantOrganizationIdentitySynchronizationRequestBuilder provides operations to manage the multiTenantOrganizationIdentitySynchronization property of the microsoft.graph.policyTemplate entity. +type CrossTenantAccessPolicyTemplatesMultiTenantOrganizationIdentitySynchronizationRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// CrossTenantAccessPolicyTemplatesMultiTenantOrganizationIdentitySynchronizationRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CrossTenantAccessPolicyTemplatesMultiTenantOrganizationIdentitySynchronizationRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// CrossTenantAccessPolicyTemplatesMultiTenantOrganizationIdentitySynchronizationRequestBuilderGetQueryParameters defines an optional cross-tenant access policy template with user synchronization settings for a multitenant organization. +type CrossTenantAccessPolicyTemplatesMultiTenantOrganizationIdentitySynchronizationRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// CrossTenantAccessPolicyTemplatesMultiTenantOrganizationIdentitySynchronizationRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CrossTenantAccessPolicyTemplatesMultiTenantOrganizationIdentitySynchronizationRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *CrossTenantAccessPolicyTemplatesMultiTenantOrganizationIdentitySynchronizationRequestBuilderGetQueryParameters +} +// CrossTenantAccessPolicyTemplatesMultiTenantOrganizationIdentitySynchronizationRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CrossTenantAccessPolicyTemplatesMultiTenantOrganizationIdentitySynchronizationRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewCrossTenantAccessPolicyTemplatesMultiTenantOrganizationIdentitySynchronizationRequestBuilderInternal instantiates a new CrossTenantAccessPolicyTemplatesMultiTenantOrganizationIdentitySynchronizationRequestBuilder and sets the default values. +func NewCrossTenantAccessPolicyTemplatesMultiTenantOrganizationIdentitySynchronizationRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CrossTenantAccessPolicyTemplatesMultiTenantOrganizationIdentitySynchronizationRequestBuilder) { + m := &CrossTenantAccessPolicyTemplatesMultiTenantOrganizationIdentitySynchronizationRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/policies/crossTenantAccessPolicy/templates/multiTenantOrganizationIdentitySynchronization{?%24expand,%24select}", pathParameters), + } + return m +} +// NewCrossTenantAccessPolicyTemplatesMultiTenantOrganizationIdentitySynchronizationRequestBuilder instantiates a new CrossTenantAccessPolicyTemplatesMultiTenantOrganizationIdentitySynchronizationRequestBuilder and sets the default values. +func NewCrossTenantAccessPolicyTemplatesMultiTenantOrganizationIdentitySynchronizationRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CrossTenantAccessPolicyTemplatesMultiTenantOrganizationIdentitySynchronizationRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewCrossTenantAccessPolicyTemplatesMultiTenantOrganizationIdentitySynchronizationRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property multiTenantOrganizationIdentitySynchronization for policies +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *CrossTenantAccessPolicyTemplatesMultiTenantOrganizationIdentitySynchronizationRequestBuilder) Delete(ctx context.Context, requestConfiguration *CrossTenantAccessPolicyTemplatesMultiTenantOrganizationIdentitySynchronizationRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get defines an optional cross-tenant access policy template with user synchronization settings for a multitenant organization. +// returns a MultiTenantOrganizationIdentitySyncPolicyTemplateable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *CrossTenantAccessPolicyTemplatesMultiTenantOrganizationIdentitySynchronizationRequestBuilder) Get(ctx context.Context, requestConfiguration *CrossTenantAccessPolicyTemplatesMultiTenantOrganizationIdentitySynchronizationRequestBuilderGetRequestConfiguration)(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.MultiTenantOrganizationIdentitySyncPolicyTemplateable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CreateMultiTenantOrganizationIdentitySyncPolicyTemplateFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.MultiTenantOrganizationIdentitySyncPolicyTemplateable), nil +} +// Patch update the navigation property multiTenantOrganizationIdentitySynchronization in policies +// returns a MultiTenantOrganizationIdentitySyncPolicyTemplateable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *CrossTenantAccessPolicyTemplatesMultiTenantOrganizationIdentitySynchronizationRequestBuilder) Patch(ctx context.Context, body iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.MultiTenantOrganizationIdentitySyncPolicyTemplateable, requestConfiguration *CrossTenantAccessPolicyTemplatesMultiTenantOrganizationIdentitySynchronizationRequestBuilderPatchRequestConfiguration)(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.MultiTenantOrganizationIdentitySyncPolicyTemplateable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CreateMultiTenantOrganizationIdentitySyncPolicyTemplateFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.MultiTenantOrganizationIdentitySyncPolicyTemplateable), nil +} +// ToDeleteRequestInformation delete navigation property multiTenantOrganizationIdentitySynchronization for policies +// returns a *RequestInformation when successful +func (m *CrossTenantAccessPolicyTemplatesMultiTenantOrganizationIdentitySynchronizationRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *CrossTenantAccessPolicyTemplatesMultiTenantOrganizationIdentitySynchronizationRequestBuilderDeleteRequestConfiguration)(*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 defines an optional cross-tenant access policy template with user synchronization settings for a multitenant organization. +// returns a *RequestInformation when successful +func (m *CrossTenantAccessPolicyTemplatesMultiTenantOrganizationIdentitySynchronizationRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *CrossTenantAccessPolicyTemplatesMultiTenantOrganizationIdentitySynchronizationRequestBuilderGetRequestConfiguration)(*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 multiTenantOrganizationIdentitySynchronization in policies +// returns a *RequestInformation when successful +func (m *CrossTenantAccessPolicyTemplatesMultiTenantOrganizationIdentitySynchronizationRequestBuilder) ToPatchRequestInformation(ctx context.Context, body iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.MultiTenantOrganizationIdentitySyncPolicyTemplateable, requestConfiguration *CrossTenantAccessPolicyTemplatesMultiTenantOrganizationIdentitySynchronizationRequestBuilderPatchRequestConfiguration)(*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 *CrossTenantAccessPolicyTemplatesMultiTenantOrganizationIdentitySynchronizationRequestBuilder when successful +func (m *CrossTenantAccessPolicyTemplatesMultiTenantOrganizationIdentitySynchronizationRequestBuilder) WithUrl(rawUrl string)(*CrossTenantAccessPolicyTemplatesMultiTenantOrganizationIdentitySynchronizationRequestBuilder) { + return NewCrossTenantAccessPolicyTemplatesMultiTenantOrganizationIdentitySynchronizationRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/policies/cross_tenant_access_policy_templates_multi_tenant_organization_partner_configuration_request_builder.go b/policies/cross_tenant_access_policy_templates_multi_tenant_organization_partner_configuration_request_builder.go new file mode 100644 index 0000000000..4813d6a9c9 --- /dev/null +++ b/policies/cross_tenant_access_policy_templates_multi_tenant_organization_partner_configuration_request_builder.go @@ -0,0 +1,157 @@ +package policies + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242 "github.com/microsoftgraph/msgraph-sdk-go/models" + ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a "github.com/microsoftgraph/msgraph-sdk-go/models/odataerrors" +) + +// CrossTenantAccessPolicyTemplatesMultiTenantOrganizationPartnerConfigurationRequestBuilder provides operations to manage the multiTenantOrganizationPartnerConfiguration property of the microsoft.graph.policyTemplate entity. +type CrossTenantAccessPolicyTemplatesMultiTenantOrganizationPartnerConfigurationRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// CrossTenantAccessPolicyTemplatesMultiTenantOrganizationPartnerConfigurationRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CrossTenantAccessPolicyTemplatesMultiTenantOrganizationPartnerConfigurationRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// CrossTenantAccessPolicyTemplatesMultiTenantOrganizationPartnerConfigurationRequestBuilderGetQueryParameters defines an optional cross-tenant access policy template with inbound and outbound partner configuration settings for a multitenant organization. +type CrossTenantAccessPolicyTemplatesMultiTenantOrganizationPartnerConfigurationRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// CrossTenantAccessPolicyTemplatesMultiTenantOrganizationPartnerConfigurationRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CrossTenantAccessPolicyTemplatesMultiTenantOrganizationPartnerConfigurationRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *CrossTenantAccessPolicyTemplatesMultiTenantOrganizationPartnerConfigurationRequestBuilderGetQueryParameters +} +// CrossTenantAccessPolicyTemplatesMultiTenantOrganizationPartnerConfigurationRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CrossTenantAccessPolicyTemplatesMultiTenantOrganizationPartnerConfigurationRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewCrossTenantAccessPolicyTemplatesMultiTenantOrganizationPartnerConfigurationRequestBuilderInternal instantiates a new CrossTenantAccessPolicyTemplatesMultiTenantOrganizationPartnerConfigurationRequestBuilder and sets the default values. +func NewCrossTenantAccessPolicyTemplatesMultiTenantOrganizationPartnerConfigurationRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CrossTenantAccessPolicyTemplatesMultiTenantOrganizationPartnerConfigurationRequestBuilder) { + m := &CrossTenantAccessPolicyTemplatesMultiTenantOrganizationPartnerConfigurationRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/policies/crossTenantAccessPolicy/templates/multiTenantOrganizationPartnerConfiguration{?%24expand,%24select}", pathParameters), + } + return m +} +// NewCrossTenantAccessPolicyTemplatesMultiTenantOrganizationPartnerConfigurationRequestBuilder instantiates a new CrossTenantAccessPolicyTemplatesMultiTenantOrganizationPartnerConfigurationRequestBuilder and sets the default values. +func NewCrossTenantAccessPolicyTemplatesMultiTenantOrganizationPartnerConfigurationRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CrossTenantAccessPolicyTemplatesMultiTenantOrganizationPartnerConfigurationRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewCrossTenantAccessPolicyTemplatesMultiTenantOrganizationPartnerConfigurationRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property multiTenantOrganizationPartnerConfiguration for policies +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *CrossTenantAccessPolicyTemplatesMultiTenantOrganizationPartnerConfigurationRequestBuilder) Delete(ctx context.Context, requestConfiguration *CrossTenantAccessPolicyTemplatesMultiTenantOrganizationPartnerConfigurationRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get defines an optional cross-tenant access policy template with inbound and outbound partner configuration settings for a multitenant organization. +// returns a MultiTenantOrganizationPartnerConfigurationTemplateable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *CrossTenantAccessPolicyTemplatesMultiTenantOrganizationPartnerConfigurationRequestBuilder) Get(ctx context.Context, requestConfiguration *CrossTenantAccessPolicyTemplatesMultiTenantOrganizationPartnerConfigurationRequestBuilderGetRequestConfiguration)(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.MultiTenantOrganizationPartnerConfigurationTemplateable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CreateMultiTenantOrganizationPartnerConfigurationTemplateFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.MultiTenantOrganizationPartnerConfigurationTemplateable), nil +} +// Patch update the navigation property multiTenantOrganizationPartnerConfiguration in policies +// returns a MultiTenantOrganizationPartnerConfigurationTemplateable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *CrossTenantAccessPolicyTemplatesMultiTenantOrganizationPartnerConfigurationRequestBuilder) Patch(ctx context.Context, body iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.MultiTenantOrganizationPartnerConfigurationTemplateable, requestConfiguration *CrossTenantAccessPolicyTemplatesMultiTenantOrganizationPartnerConfigurationRequestBuilderPatchRequestConfiguration)(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.MultiTenantOrganizationPartnerConfigurationTemplateable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CreateMultiTenantOrganizationPartnerConfigurationTemplateFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.MultiTenantOrganizationPartnerConfigurationTemplateable), nil +} +// ToDeleteRequestInformation delete navigation property multiTenantOrganizationPartnerConfiguration for policies +// returns a *RequestInformation when successful +func (m *CrossTenantAccessPolicyTemplatesMultiTenantOrganizationPartnerConfigurationRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *CrossTenantAccessPolicyTemplatesMultiTenantOrganizationPartnerConfigurationRequestBuilderDeleteRequestConfiguration)(*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 defines an optional cross-tenant access policy template with inbound and outbound partner configuration settings for a multitenant organization. +// returns a *RequestInformation when successful +func (m *CrossTenantAccessPolicyTemplatesMultiTenantOrganizationPartnerConfigurationRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *CrossTenantAccessPolicyTemplatesMultiTenantOrganizationPartnerConfigurationRequestBuilderGetRequestConfiguration)(*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 multiTenantOrganizationPartnerConfiguration in policies +// returns a *RequestInformation when successful +func (m *CrossTenantAccessPolicyTemplatesMultiTenantOrganizationPartnerConfigurationRequestBuilder) ToPatchRequestInformation(ctx context.Context, body iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.MultiTenantOrganizationPartnerConfigurationTemplateable, requestConfiguration *CrossTenantAccessPolicyTemplatesMultiTenantOrganizationPartnerConfigurationRequestBuilderPatchRequestConfiguration)(*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 *CrossTenantAccessPolicyTemplatesMultiTenantOrganizationPartnerConfigurationRequestBuilder when successful +func (m *CrossTenantAccessPolicyTemplatesMultiTenantOrganizationPartnerConfigurationRequestBuilder) WithUrl(rawUrl string)(*CrossTenantAccessPolicyTemplatesMultiTenantOrganizationPartnerConfigurationRequestBuilder) { + return NewCrossTenantAccessPolicyTemplatesMultiTenantOrganizationPartnerConfigurationRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/policies/cross_tenant_access_policy_templates_request_builder.go b/policies/cross_tenant_access_policy_templates_request_builder.go new file mode 100644 index 0000000000..7cf3c52e71 --- /dev/null +++ b/policies/cross_tenant_access_policy_templates_request_builder.go @@ -0,0 +1,167 @@ +package policies + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242 "github.com/microsoftgraph/msgraph-sdk-go/models" + ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a "github.com/microsoftgraph/msgraph-sdk-go/models/odataerrors" +) + +// CrossTenantAccessPolicyTemplatesRequestBuilder provides operations to manage the templates property of the microsoft.graph.crossTenantAccessPolicy entity. +type CrossTenantAccessPolicyTemplatesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// CrossTenantAccessPolicyTemplatesRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CrossTenantAccessPolicyTemplatesRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// CrossTenantAccessPolicyTemplatesRequestBuilderGetQueryParameters represents the base policy in the directory for multitenant organization settings. +type CrossTenantAccessPolicyTemplatesRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// CrossTenantAccessPolicyTemplatesRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CrossTenantAccessPolicyTemplatesRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *CrossTenantAccessPolicyTemplatesRequestBuilderGetQueryParameters +} +// CrossTenantAccessPolicyTemplatesRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CrossTenantAccessPolicyTemplatesRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewCrossTenantAccessPolicyTemplatesRequestBuilderInternal instantiates a new CrossTenantAccessPolicyTemplatesRequestBuilder and sets the default values. +func NewCrossTenantAccessPolicyTemplatesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CrossTenantAccessPolicyTemplatesRequestBuilder) { + m := &CrossTenantAccessPolicyTemplatesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/policies/crossTenantAccessPolicy/templates{?%24expand,%24select}", pathParameters), + } + return m +} +// NewCrossTenantAccessPolicyTemplatesRequestBuilder instantiates a new CrossTenantAccessPolicyTemplatesRequestBuilder and sets the default values. +func NewCrossTenantAccessPolicyTemplatesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CrossTenantAccessPolicyTemplatesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewCrossTenantAccessPolicyTemplatesRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property templates for policies +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *CrossTenantAccessPolicyTemplatesRequestBuilder) Delete(ctx context.Context, requestConfiguration *CrossTenantAccessPolicyTemplatesRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get represents the base policy in the directory for multitenant organization settings. +// returns a PolicyTemplateable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *CrossTenantAccessPolicyTemplatesRequestBuilder) Get(ctx context.Context, requestConfiguration *CrossTenantAccessPolicyTemplatesRequestBuilderGetRequestConfiguration)(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.PolicyTemplateable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CreatePolicyTemplateFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.PolicyTemplateable), nil +} +// MultiTenantOrganizationIdentitySynchronization provides operations to manage the multiTenantOrganizationIdentitySynchronization property of the microsoft.graph.policyTemplate entity. +// returns a *CrossTenantAccessPolicyTemplatesMultiTenantOrganizationIdentitySynchronizationRequestBuilder when successful +func (m *CrossTenantAccessPolicyTemplatesRequestBuilder) MultiTenantOrganizationIdentitySynchronization()(*CrossTenantAccessPolicyTemplatesMultiTenantOrganizationIdentitySynchronizationRequestBuilder) { + return NewCrossTenantAccessPolicyTemplatesMultiTenantOrganizationIdentitySynchronizationRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// MultiTenantOrganizationPartnerConfiguration provides operations to manage the multiTenantOrganizationPartnerConfiguration property of the microsoft.graph.policyTemplate entity. +// returns a *CrossTenantAccessPolicyTemplatesMultiTenantOrganizationPartnerConfigurationRequestBuilder when successful +func (m *CrossTenantAccessPolicyTemplatesRequestBuilder) MultiTenantOrganizationPartnerConfiguration()(*CrossTenantAccessPolicyTemplatesMultiTenantOrganizationPartnerConfigurationRequestBuilder) { + return NewCrossTenantAccessPolicyTemplatesMultiTenantOrganizationPartnerConfigurationRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Patch update the navigation property templates in policies +// returns a PolicyTemplateable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *CrossTenantAccessPolicyTemplatesRequestBuilder) Patch(ctx context.Context, body iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.PolicyTemplateable, requestConfiguration *CrossTenantAccessPolicyTemplatesRequestBuilderPatchRequestConfiguration)(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.PolicyTemplateable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CreatePolicyTemplateFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.PolicyTemplateable), nil +} +// ToDeleteRequestInformation delete navigation property templates for policies +// returns a *RequestInformation when successful +func (m *CrossTenantAccessPolicyTemplatesRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *CrossTenantAccessPolicyTemplatesRequestBuilderDeleteRequestConfiguration)(*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 represents the base policy in the directory for multitenant organization settings. +// returns a *RequestInformation when successful +func (m *CrossTenantAccessPolicyTemplatesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *CrossTenantAccessPolicyTemplatesRequestBuilderGetRequestConfiguration)(*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 templates in policies +// returns a *RequestInformation when successful +func (m *CrossTenantAccessPolicyTemplatesRequestBuilder) ToPatchRequestInformation(ctx context.Context, body iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.PolicyTemplateable, requestConfiguration *CrossTenantAccessPolicyTemplatesRequestBuilderPatchRequestConfiguration)(*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 *CrossTenantAccessPolicyTemplatesRequestBuilder when successful +func (m *CrossTenantAccessPolicyTemplatesRequestBuilder) WithUrl(rawUrl string)(*CrossTenantAccessPolicyTemplatesRequestBuilder) { + return NewCrossTenantAccessPolicyTemplatesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/security/alerts_alert_item_request_builder.go b/security/alerts_alert_item_request_builder.go index d312fa2101..72c01e2aa8 100644 --- a/security/alerts_alert_item_request_builder.go +++ b/security/alerts_alert_item_request_builder.go @@ -48,6 +48,7 @@ func NewAlertsAlertItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7da return NewAlertsAlertItemRequestBuilderInternal(urlParams, requestAdapter) } // Get get alerts from security +// Deprecated: The legacy Graph Security API is deprecated and will stop returning data on January 31, 2025. Please use the new Graph Security API. as of 2024-01/Deprecation // returns a Alertable when successful // returns a ODataError error when the service returns a 4XX or 5XX status code func (m *AlertsAlertItemRequestBuilder) Get(ctx context.Context, requestConfiguration *AlertsAlertItemRequestBuilderGetRequestConfiguration)(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.Alertable, error) { @@ -68,6 +69,7 @@ func (m *AlertsAlertItemRequestBuilder) Get(ctx context.Context, requestConfigur return res.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.Alertable), nil } // Patch update the navigation property alerts in security +// Deprecated: The legacy Graph Security API is deprecated and will stop returning data on January 31, 2025. Please use the new Graph Security API. as of 2024-01/Deprecation // returns a Alertable when successful // returns a ODataError error when the service returns a 4XX or 5XX status code func (m *AlertsAlertItemRequestBuilder) Patch(ctx context.Context, body iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.Alertable, requestConfiguration *AlertsAlertItemRequestBuilderPatchRequestConfiguration)(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.Alertable, error) { @@ -88,6 +90,7 @@ func (m *AlertsAlertItemRequestBuilder) Patch(ctx context.Context, body iadcd811 return res.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.Alertable), nil } // ToGetRequestInformation get alerts from security +// Deprecated: The legacy Graph Security API is deprecated and will stop returning data on January 31, 2025. Please use the new Graph Security API. as of 2024-01/Deprecation // returns a *RequestInformation when successful func (m *AlertsAlertItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *AlertsAlertItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) @@ -102,6 +105,7 @@ func (m *AlertsAlertItemRequestBuilder) ToGetRequestInformation(ctx context.Cont return requestInfo, nil } // ToPatchRequestInformation update the navigation property alerts in security +// Deprecated: The legacy Graph Security API is deprecated and will stop returning data on January 31, 2025. Please use the new Graph Security API. as of 2024-01/Deprecation // returns a *RequestInformation when successful func (m *AlertsAlertItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.Alertable, requestConfiguration *AlertsAlertItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) @@ -117,6 +121,7 @@ func (m *AlertsAlertItemRequestBuilder) ToPatchRequestInformation(ctx context.Co return requestInfo, nil } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: The legacy Graph Security API is deprecated and will stop returning data on January 31, 2025. Please use the new Graph Security API. as of 2024-01/Deprecation // returns a *AlertsAlertItemRequestBuilder when successful func (m *AlertsAlertItemRequestBuilder) WithUrl(rawUrl string)(*AlertsAlertItemRequestBuilder) { return NewAlertsAlertItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); diff --git a/security/alerts_count_request_builder.go b/security/alerts_count_request_builder.go index 8e7f71a27e..fae0a43c22 100644 --- a/security/alerts_count_request_builder.go +++ b/security/alerts_count_request_builder.go @@ -40,6 +40,7 @@ func NewAlertsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee26 return NewAlertsCountRequestBuilderInternal(urlParams, requestAdapter) } // Get get the number of the resource +// Deprecated: The legacy Graph Security API is deprecated and will stop returning data on January 31, 2025. Please use the new Graph Security API. as of 2024-01/Deprecation // returns a *int32 when successful // returns a ODataError error when the service returns a 4XX or 5XX status code func (m *AlertsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *AlertsCountRequestBuilderGetRequestConfiguration)(*int32, error) { @@ -60,6 +61,7 @@ func (m *AlertsCountRequestBuilder) Get(ctx context.Context, requestConfiguratio return res.(*int32), nil } // ToGetRequestInformation get the number of the resource +// Deprecated: The legacy Graph Security API is deprecated and will stop returning data on January 31, 2025. Please use the new Graph Security API. as of 2024-01/Deprecation // returns a *RequestInformation when successful func (m *AlertsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *AlertsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) @@ -74,6 +76,7 @@ func (m *AlertsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, return requestInfo, nil } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: The legacy Graph Security API is deprecated and will stop returning data on January 31, 2025. Please use the new Graph Security API. as of 2024-01/Deprecation // returns a *AlertsCountRequestBuilder when successful func (m *AlertsCountRequestBuilder) WithUrl(rawUrl string)(*AlertsCountRequestBuilder) { return NewAlertsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); diff --git a/security/alerts_request_builder.go b/security/alerts_request_builder.go index ee497e874b..e8b5118caf 100644 --- a/security/alerts_request_builder.go +++ b/security/alerts_request_builder.go @@ -47,6 +47,7 @@ type AlertsRequestBuilderPostRequestConfiguration struct { Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } // ByAlertId provides operations to manage the alerts property of the microsoft.graph.security entity. +// Deprecated: The legacy Graph Security API is deprecated and will stop returning data on January 31, 2025. Please use the new Graph Security API. as of 2024-01/Deprecation // returns a *AlertsAlertItemRequestBuilder when successful func (m *AlertsRequestBuilder) ByAlertId(alertId string)(*AlertsAlertItemRequestBuilder) { urlTplParams := make(map[string]string) @@ -77,6 +78,7 @@ func (m *AlertsRequestBuilder) Count()(*AlertsCountRequestBuilder) { return NewAlertsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } // Get get alerts from security +// Deprecated: The legacy Graph Security API is deprecated and will stop returning data on January 31, 2025. Please use the new Graph Security API. as of 2024-01/Deprecation // returns a AlertCollectionResponseable when successful // returns a ODataError error when the service returns a 4XX or 5XX status code func (m *AlertsRequestBuilder) Get(ctx context.Context, requestConfiguration *AlertsRequestBuilderGetRequestConfiguration)(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.AlertCollectionResponseable, error) { @@ -97,6 +99,7 @@ func (m *AlertsRequestBuilder) Get(ctx context.Context, requestConfiguration *Al return res.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.AlertCollectionResponseable), nil } // Post create new navigation property to alerts for security +// Deprecated: The legacy Graph Security API is deprecated and will stop returning data on January 31, 2025. Please use the new Graph Security API. as of 2024-01/Deprecation // returns a Alertable when successful // returns a ODataError error when the service returns a 4XX or 5XX status code func (m *AlertsRequestBuilder) Post(ctx context.Context, body iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.Alertable, requestConfiguration *AlertsRequestBuilderPostRequestConfiguration)(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.Alertable, error) { @@ -117,6 +120,7 @@ func (m *AlertsRequestBuilder) Post(ctx context.Context, body iadcd81124412c61e6 return res.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.Alertable), nil } // ToGetRequestInformation get alerts from security +// Deprecated: The legacy Graph Security API is deprecated and will stop returning data on January 31, 2025. Please use the new Graph Security API. as of 2024-01/Deprecation // returns a *RequestInformation when successful func (m *AlertsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *AlertsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) @@ -131,6 +135,7 @@ func (m *AlertsRequestBuilder) ToGetRequestInformation(ctx context.Context, requ return requestInfo, nil } // ToPostRequestInformation create new navigation property to alerts for security +// Deprecated: The legacy Graph Security API is deprecated and will stop returning data on January 31, 2025. Please use the new Graph Security API. as of 2024-01/Deprecation // returns a *RequestInformation when successful func (m *AlertsRequestBuilder) ToPostRequestInformation(ctx context.Context, body iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.Alertable, requestConfiguration *AlertsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) @@ -146,6 +151,7 @@ func (m *AlertsRequestBuilder) ToPostRequestInformation(ctx context.Context, bod return requestInfo, nil } // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: The legacy Graph Security API is deprecated and will stop returning data on January 31, 2025. Please use the new Graph Security API. as of 2024-01/Deprecation // returns a *AlertsRequestBuilder when successful func (m *AlertsRequestBuilder) WithUrl(rawUrl string)(*AlertsRequestBuilder) { return NewAlertsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); diff --git a/tenantrelationships/multi_tenant_organization_join_request_request_builder.go b/tenantrelationships/multi_tenant_organization_join_request_request_builder.go new file mode 100644 index 0000000000..f8f878178a --- /dev/null +++ b/tenantrelationships/multi_tenant_organization_join_request_request_builder.go @@ -0,0 +1,123 @@ +package tenantrelationships + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242 "github.com/microsoftgraph/msgraph-sdk-go/models" + ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a "github.com/microsoftgraph/msgraph-sdk-go/models/odataerrors" +) + +// MultiTenantOrganizationJoinRequestRequestBuilder provides operations to manage the joinRequest property of the microsoft.graph.multiTenantOrganization entity. +type MultiTenantOrganizationJoinRequestRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MultiTenantOrganizationJoinRequestRequestBuilderGetQueryParameters defines the status of a tenant joining a multitenant organization. +type MultiTenantOrganizationJoinRequestRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MultiTenantOrganizationJoinRequestRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MultiTenantOrganizationJoinRequestRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MultiTenantOrganizationJoinRequestRequestBuilderGetQueryParameters +} +// MultiTenantOrganizationJoinRequestRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MultiTenantOrganizationJoinRequestRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMultiTenantOrganizationJoinRequestRequestBuilderInternal instantiates a new MultiTenantOrganizationJoinRequestRequestBuilder and sets the default values. +func NewMultiTenantOrganizationJoinRequestRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MultiTenantOrganizationJoinRequestRequestBuilder) { + m := &MultiTenantOrganizationJoinRequestRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/tenantRelationships/multiTenantOrganization/joinRequest{?%24expand,%24select}", pathParameters), + } + return m +} +// NewMultiTenantOrganizationJoinRequestRequestBuilder instantiates a new MultiTenantOrganizationJoinRequestRequestBuilder and sets the default values. +func NewMultiTenantOrganizationJoinRequestRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MultiTenantOrganizationJoinRequestRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMultiTenantOrganizationJoinRequestRequestBuilderInternal(urlParams, requestAdapter) +} +// Get defines the status of a tenant joining a multitenant organization. +// returns a MultiTenantOrganizationJoinRequestRecordable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *MultiTenantOrganizationJoinRequestRequestBuilder) Get(ctx context.Context, requestConfiguration *MultiTenantOrganizationJoinRequestRequestBuilderGetRequestConfiguration)(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.MultiTenantOrganizationJoinRequestRecordable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CreateMultiTenantOrganizationJoinRequestRecordFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.MultiTenantOrganizationJoinRequestRecordable), nil +} +// Patch update the navigation property joinRequest in tenantRelationships +// returns a MultiTenantOrganizationJoinRequestRecordable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *MultiTenantOrganizationJoinRequestRequestBuilder) Patch(ctx context.Context, body iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.MultiTenantOrganizationJoinRequestRecordable, requestConfiguration *MultiTenantOrganizationJoinRequestRequestBuilderPatchRequestConfiguration)(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.MultiTenantOrganizationJoinRequestRecordable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CreateMultiTenantOrganizationJoinRequestRecordFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.MultiTenantOrganizationJoinRequestRecordable), nil +} +// ToGetRequestInformation defines the status of a tenant joining a multitenant organization. +// returns a *RequestInformation when successful +func (m *MultiTenantOrganizationJoinRequestRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MultiTenantOrganizationJoinRequestRequestBuilderGetRequestConfiguration)(*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 joinRequest in tenantRelationships +// returns a *RequestInformation when successful +func (m *MultiTenantOrganizationJoinRequestRequestBuilder) ToPatchRequestInformation(ctx context.Context, body iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.MultiTenantOrganizationJoinRequestRecordable, requestConfiguration *MultiTenantOrganizationJoinRequestRequestBuilderPatchRequestConfiguration)(*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 *MultiTenantOrganizationJoinRequestRequestBuilder when successful +func (m *MultiTenantOrganizationJoinRequestRequestBuilder) WithUrl(rawUrl string)(*MultiTenantOrganizationJoinRequestRequestBuilder) { + return NewMultiTenantOrganizationJoinRequestRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/tenantrelationships/multi_tenant_organization_request_builder.go b/tenantrelationships/multi_tenant_organization_request_builder.go new file mode 100644 index 0000000000..a8ad8d0355 --- /dev/null +++ b/tenantrelationships/multi_tenant_organization_request_builder.go @@ -0,0 +1,133 @@ +package tenantrelationships + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242 "github.com/microsoftgraph/msgraph-sdk-go/models" + ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a "github.com/microsoftgraph/msgraph-sdk-go/models/odataerrors" +) + +// MultiTenantOrganizationRequestBuilder provides operations to manage the multiTenantOrganization property of the microsoft.graph.tenantRelationship entity. +type MultiTenantOrganizationRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MultiTenantOrganizationRequestBuilderGetQueryParameters defines an organization with more than one instance of Microsoft Entra ID. +type MultiTenantOrganizationRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MultiTenantOrganizationRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MultiTenantOrganizationRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MultiTenantOrganizationRequestBuilderGetQueryParameters +} +// MultiTenantOrganizationRequestBuilderPutRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MultiTenantOrganizationRequestBuilderPutRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMultiTenantOrganizationRequestBuilderInternal instantiates a new MultiTenantOrganizationRequestBuilder and sets the default values. +func NewMultiTenantOrganizationRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MultiTenantOrganizationRequestBuilder) { + m := &MultiTenantOrganizationRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/tenantRelationships/multiTenantOrganization{?%24expand,%24select}", pathParameters), + } + return m +} +// NewMultiTenantOrganizationRequestBuilder instantiates a new MultiTenantOrganizationRequestBuilder and sets the default values. +func NewMultiTenantOrganizationRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MultiTenantOrganizationRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMultiTenantOrganizationRequestBuilderInternal(urlParams, requestAdapter) +} +// Get defines an organization with more than one instance of Microsoft Entra ID. +// returns a MultiTenantOrganizationable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *MultiTenantOrganizationRequestBuilder) Get(ctx context.Context, requestConfiguration *MultiTenantOrganizationRequestBuilderGetRequestConfiguration)(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.MultiTenantOrganizationable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CreateMultiTenantOrganizationFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.MultiTenantOrganizationable), nil +} +// JoinRequest provides operations to manage the joinRequest property of the microsoft.graph.multiTenantOrganization entity. +// returns a *MultiTenantOrganizationJoinRequestRequestBuilder when successful +func (m *MultiTenantOrganizationRequestBuilder) JoinRequest()(*MultiTenantOrganizationJoinRequestRequestBuilder) { + return NewMultiTenantOrganizationJoinRequestRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Put update the navigation property multiTenantOrganization in tenantRelationships +// returns a MultiTenantOrganizationable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *MultiTenantOrganizationRequestBuilder) Put(ctx context.Context, body iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.MultiTenantOrganizationable, requestConfiguration *MultiTenantOrganizationRequestBuilderPutRequestConfiguration)(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.MultiTenantOrganizationable, error) { + requestInfo, err := m.ToPutRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CreateMultiTenantOrganizationFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.MultiTenantOrganizationable), nil +} +// Tenants provides operations to manage the tenants property of the microsoft.graph.multiTenantOrganization entity. +// returns a *MultiTenantOrganizationTenantsRequestBuilder when successful +func (m *MultiTenantOrganizationRequestBuilder) Tenants()(*MultiTenantOrganizationTenantsRequestBuilder) { + return NewMultiTenantOrganizationTenantsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToGetRequestInformation defines an organization with more than one instance of Microsoft Entra ID. +// returns a *RequestInformation when successful +func (m *MultiTenantOrganizationRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MultiTenantOrganizationRequestBuilderGetRequestConfiguration)(*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 +} +// ToPutRequestInformation update the navigation property multiTenantOrganization in tenantRelationships +// returns a *RequestInformation when successful +func (m *MultiTenantOrganizationRequestBuilder) ToPutRequestInformation(ctx context.Context, body iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.MultiTenantOrganizationable, requestConfiguration *MultiTenantOrganizationRequestBuilderPutRequestConfiguration)(*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") + 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 *MultiTenantOrganizationRequestBuilder when successful +func (m *MultiTenantOrganizationRequestBuilder) WithUrl(rawUrl string)(*MultiTenantOrganizationRequestBuilder) { + return NewMultiTenantOrganizationRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/tenantrelationships/multi_tenant_organization_tenants_count_request_builder.go b/tenantrelationships/multi_tenant_organization_tenants_count_request_builder.go new file mode 100644 index 0000000000..7e7d09906e --- /dev/null +++ b/tenantrelationships/multi_tenant_organization_tenants_count_request_builder.go @@ -0,0 +1,80 @@ +package tenantrelationships + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a "github.com/microsoftgraph/msgraph-sdk-go/models/odataerrors" +) + +// MultiTenantOrganizationTenantsCountRequestBuilder provides operations to count the resources in the collection. +type MultiTenantOrganizationTenantsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MultiTenantOrganizationTenantsCountRequestBuilderGetQueryParameters get the number of the resource +type MultiTenantOrganizationTenantsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// MultiTenantOrganizationTenantsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MultiTenantOrganizationTenantsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MultiTenantOrganizationTenantsCountRequestBuilderGetQueryParameters +} +// NewMultiTenantOrganizationTenantsCountRequestBuilderInternal instantiates a new MultiTenantOrganizationTenantsCountRequestBuilder and sets the default values. +func NewMultiTenantOrganizationTenantsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MultiTenantOrganizationTenantsCountRequestBuilder) { + m := &MultiTenantOrganizationTenantsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/tenantRelationships/multiTenantOrganization/tenants/$count{?%24filter,%24search}", pathParameters), + } + return m +} +// NewMultiTenantOrganizationTenantsCountRequestBuilder instantiates a new MultiTenantOrganizationTenantsCountRequestBuilder and sets the default values. +func NewMultiTenantOrganizationTenantsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MultiTenantOrganizationTenantsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMultiTenantOrganizationTenantsCountRequestBuilderInternal(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 *MultiTenantOrganizationTenantsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *MultiTenantOrganizationTenantsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.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 *MultiTenantOrganizationTenantsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MultiTenantOrganizationTenantsCountRequestBuilderGetRequestConfiguration)(*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 *MultiTenantOrganizationTenantsCountRequestBuilder when successful +func (m *MultiTenantOrganizationTenantsCountRequestBuilder) WithUrl(rawUrl string)(*MultiTenantOrganizationTenantsCountRequestBuilder) { + return NewMultiTenantOrganizationTenantsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/tenantrelationships/multi_tenant_organization_tenants_multi_tenant_organization_member_item_request_builder.go b/tenantrelationships/multi_tenant_organization_tenants_multi_tenant_organization_member_item_request_builder.go new file mode 100644 index 0000000000..6ef0477210 --- /dev/null +++ b/tenantrelationships/multi_tenant_organization_tenants_multi_tenant_organization_member_item_request_builder.go @@ -0,0 +1,157 @@ +package tenantrelationships + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242 "github.com/microsoftgraph/msgraph-sdk-go/models" + ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a "github.com/microsoftgraph/msgraph-sdk-go/models/odataerrors" +) + +// MultiTenantOrganizationTenantsMultiTenantOrganizationMemberItemRequestBuilder provides operations to manage the tenants property of the microsoft.graph.multiTenantOrganization entity. +type MultiTenantOrganizationTenantsMultiTenantOrganizationMemberItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MultiTenantOrganizationTenantsMultiTenantOrganizationMemberItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MultiTenantOrganizationTenantsMultiTenantOrganizationMemberItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// MultiTenantOrganizationTenantsMultiTenantOrganizationMemberItemRequestBuilderGetQueryParameters defines tenants added to a multitenant organization. +type MultiTenantOrganizationTenantsMultiTenantOrganizationMemberItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// MultiTenantOrganizationTenantsMultiTenantOrganizationMemberItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MultiTenantOrganizationTenantsMultiTenantOrganizationMemberItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MultiTenantOrganizationTenantsMultiTenantOrganizationMemberItemRequestBuilderGetQueryParameters +} +// MultiTenantOrganizationTenantsMultiTenantOrganizationMemberItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MultiTenantOrganizationTenantsMultiTenantOrganizationMemberItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMultiTenantOrganizationTenantsMultiTenantOrganizationMemberItemRequestBuilderInternal instantiates a new MultiTenantOrganizationTenantsMultiTenantOrganizationMemberItemRequestBuilder and sets the default values. +func NewMultiTenantOrganizationTenantsMultiTenantOrganizationMemberItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MultiTenantOrganizationTenantsMultiTenantOrganizationMemberItemRequestBuilder) { + m := &MultiTenantOrganizationTenantsMultiTenantOrganizationMemberItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/tenantRelationships/multiTenantOrganization/tenants/{multiTenantOrganizationMember%2Did}{?%24expand,%24select}", pathParameters), + } + return m +} +// NewMultiTenantOrganizationTenantsMultiTenantOrganizationMemberItemRequestBuilder instantiates a new MultiTenantOrganizationTenantsMultiTenantOrganizationMemberItemRequestBuilder and sets the default values. +func NewMultiTenantOrganizationTenantsMultiTenantOrganizationMemberItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MultiTenantOrganizationTenantsMultiTenantOrganizationMemberItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMultiTenantOrganizationTenantsMultiTenantOrganizationMemberItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property tenants for tenantRelationships +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *MultiTenantOrganizationTenantsMultiTenantOrganizationMemberItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *MultiTenantOrganizationTenantsMultiTenantOrganizationMemberItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get defines tenants added to a multitenant organization. +// returns a MultiTenantOrganizationMemberable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *MultiTenantOrganizationTenantsMultiTenantOrganizationMemberItemRequestBuilder) Get(ctx context.Context, requestConfiguration *MultiTenantOrganizationTenantsMultiTenantOrganizationMemberItemRequestBuilderGetRequestConfiguration)(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.MultiTenantOrganizationMemberable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CreateMultiTenantOrganizationMemberFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.MultiTenantOrganizationMemberable), nil +} +// Patch update the navigation property tenants in tenantRelationships +// returns a MultiTenantOrganizationMemberable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *MultiTenantOrganizationTenantsMultiTenantOrganizationMemberItemRequestBuilder) Patch(ctx context.Context, body iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.MultiTenantOrganizationMemberable, requestConfiguration *MultiTenantOrganizationTenantsMultiTenantOrganizationMemberItemRequestBuilderPatchRequestConfiguration)(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.MultiTenantOrganizationMemberable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CreateMultiTenantOrganizationMemberFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.MultiTenantOrganizationMemberable), nil +} +// ToDeleteRequestInformation delete navigation property tenants for tenantRelationships +// returns a *RequestInformation when successful +func (m *MultiTenantOrganizationTenantsMultiTenantOrganizationMemberItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *MultiTenantOrganizationTenantsMultiTenantOrganizationMemberItemRequestBuilderDeleteRequestConfiguration)(*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 defines tenants added to a multitenant organization. +// returns a *RequestInformation when successful +func (m *MultiTenantOrganizationTenantsMultiTenantOrganizationMemberItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MultiTenantOrganizationTenantsMultiTenantOrganizationMemberItemRequestBuilderGetRequestConfiguration)(*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 tenants in tenantRelationships +// returns a *RequestInformation when successful +func (m *MultiTenantOrganizationTenantsMultiTenantOrganizationMemberItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.MultiTenantOrganizationMemberable, requestConfiguration *MultiTenantOrganizationTenantsMultiTenantOrganizationMemberItemRequestBuilderPatchRequestConfiguration)(*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 *MultiTenantOrganizationTenantsMultiTenantOrganizationMemberItemRequestBuilder when successful +func (m *MultiTenantOrganizationTenantsMultiTenantOrganizationMemberItemRequestBuilder) WithUrl(rawUrl string)(*MultiTenantOrganizationTenantsMultiTenantOrganizationMemberItemRequestBuilder) { + return NewMultiTenantOrganizationTenantsMultiTenantOrganizationMemberItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/tenantrelationships/multi_tenant_organization_tenants_request_builder.go b/tenantrelationships/multi_tenant_organization_tenants_request_builder.go new file mode 100644 index 0000000000..288b87b012 --- /dev/null +++ b/tenantrelationships/multi_tenant_organization_tenants_request_builder.go @@ -0,0 +1,152 @@ +package tenantrelationships + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242 "github.com/microsoftgraph/msgraph-sdk-go/models" + ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a "github.com/microsoftgraph/msgraph-sdk-go/models/odataerrors" +) + +// MultiTenantOrganizationTenantsRequestBuilder provides operations to manage the tenants property of the microsoft.graph.multiTenantOrganization entity. +type MultiTenantOrganizationTenantsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// MultiTenantOrganizationTenantsRequestBuilderGetQueryParameters defines tenants added to a multitenant organization. +type MultiTenantOrganizationTenantsRequestBuilderGetQueryParameters 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"` +} +// MultiTenantOrganizationTenantsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MultiTenantOrganizationTenantsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *MultiTenantOrganizationTenantsRequestBuilderGetQueryParameters +} +// MultiTenantOrganizationTenantsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type MultiTenantOrganizationTenantsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByMultiTenantOrganizationMemberId provides operations to manage the tenants property of the microsoft.graph.multiTenantOrganization entity. +// returns a *MultiTenantOrganizationTenantsMultiTenantOrganizationMemberItemRequestBuilder when successful +func (m *MultiTenantOrganizationTenantsRequestBuilder) ByMultiTenantOrganizationMemberId(multiTenantOrganizationMemberId string)(*MultiTenantOrganizationTenantsMultiTenantOrganizationMemberItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if multiTenantOrganizationMemberId != "" { + urlTplParams["multiTenantOrganizationMember%2Did"] = multiTenantOrganizationMemberId + } + return NewMultiTenantOrganizationTenantsMultiTenantOrganizationMemberItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewMultiTenantOrganizationTenantsRequestBuilderInternal instantiates a new MultiTenantOrganizationTenantsRequestBuilder and sets the default values. +func NewMultiTenantOrganizationTenantsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MultiTenantOrganizationTenantsRequestBuilder) { + m := &MultiTenantOrganizationTenantsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/tenantRelationships/multiTenantOrganization/tenants{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters), + } + return m +} +// NewMultiTenantOrganizationTenantsRequestBuilder instantiates a new MultiTenantOrganizationTenantsRequestBuilder and sets the default values. +func NewMultiTenantOrganizationTenantsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MultiTenantOrganizationTenantsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMultiTenantOrganizationTenantsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +// returns a *MultiTenantOrganizationTenantsCountRequestBuilder when successful +func (m *MultiTenantOrganizationTenantsRequestBuilder) Count()(*MultiTenantOrganizationTenantsCountRequestBuilder) { + return NewMultiTenantOrganizationTenantsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get defines tenants added to a multitenant organization. +// returns a MultiTenantOrganizationMemberCollectionResponseable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *MultiTenantOrganizationTenantsRequestBuilder) Get(ctx context.Context, requestConfiguration *MultiTenantOrganizationTenantsRequestBuilderGetRequestConfiguration)(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.MultiTenantOrganizationMemberCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CreateMultiTenantOrganizationMemberCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.MultiTenantOrganizationMemberCollectionResponseable), nil +} +// Post create new navigation property to tenants for tenantRelationships +// returns a MultiTenantOrganizationMemberable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *MultiTenantOrganizationTenantsRequestBuilder) Post(ctx context.Context, body iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.MultiTenantOrganizationMemberable, requestConfiguration *MultiTenantOrganizationTenantsRequestBuilderPostRequestConfiguration)(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.MultiTenantOrganizationMemberable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CreateMultiTenantOrganizationMemberFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.MultiTenantOrganizationMemberable), nil +} +// ToGetRequestInformation defines tenants added to a multitenant organization. +// returns a *RequestInformation when successful +func (m *MultiTenantOrganizationTenantsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MultiTenantOrganizationTenantsRequestBuilderGetRequestConfiguration)(*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 new navigation property to tenants for tenantRelationships +// returns a *RequestInformation when successful +func (m *MultiTenantOrganizationTenantsRequestBuilder) ToPostRequestInformation(ctx context.Context, body iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.MultiTenantOrganizationMemberable, requestConfiguration *MultiTenantOrganizationTenantsRequestBuilderPostRequestConfiguration)(*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 *MultiTenantOrganizationTenantsRequestBuilder when successful +func (m *MultiTenantOrganizationTenantsRequestBuilder) WithUrl(rawUrl string)(*MultiTenantOrganizationTenantsRequestBuilder) { + return NewMultiTenantOrganizationTenantsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/tenantrelationships/tenant_relationships_request_builder.go b/tenantrelationships/tenant_relationships_request_builder.go index 7867acb4f4..be1ed77172 100644 --- a/tenantrelationships/tenant_relationships_request_builder.go +++ b/tenantrelationships/tenant_relationships_request_builder.go @@ -87,6 +87,11 @@ func (m *TenantRelationshipsRequestBuilder) Get(ctx context.Context, requestConf } return res.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.TenantRelationshipable), nil } +// MultiTenantOrganization provides operations to manage the multiTenantOrganization property of the microsoft.graph.tenantRelationship entity. +// returns a *MultiTenantOrganizationRequestBuilder when successful +func (m *TenantRelationshipsRequestBuilder) MultiTenantOrganization()(*MultiTenantOrganizationRequestBuilder) { + return NewMultiTenantOrganizationRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // Patch update tenantRelationships // returns a TenantRelationshipable when successful // returns a ODataError error when the service returns a 4XX or 5XX status code diff --git a/users/user_item_request_builder.go b/users/user_item_request_builder.go index 56d424ec06..2d5e88a356 100644 --- a/users/user_item_request_builder.go +++ b/users/user_item_request_builder.go @@ -18,7 +18,7 @@ type UserItemRequestBuilderDeleteRequestConfiguration struct { // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// UserItemRequestBuilderGetQueryParameters retrieve the properties and relationships of user object. This operation returns by default only a subset of the more commonly used properties for each user. These default properties are noted in the Properties section. To get properties that are not returned by default, do a GET operation for the user and specify the properties in a $select OData query option. Because the user resource supports extensions, you can also use the GET operation to get custom properties and extension data in a user instance. Customers through Microsoft Entra ID for customers can also use this API operation to retrieve their details. +// UserItemRequestBuilderGetQueryParameters read properties and relationships of the user object. type UserItemRequestBuilderGetQueryParameters struct { // Expand related entities Expand []string `uriparametername:"%24expand"` @@ -143,7 +143,7 @@ func (m *UserItemRequestBuilder) CreatedObjects()(*ItemCreatedObjectsRequestBuil // 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/intune-mam-user-delete?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/intune-onboarding-user-delete?view=graph-rest-1.0 func (m *UserItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *UserItemRequestBuilderDeleteRequestConfiguration)(error) { requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); if err != nil { @@ -218,12 +218,12 @@ func (m *UserItemRequestBuilder) FindMeetingTimes()(*ItemFindMeetingTimesRequest func (m *UserItemRequestBuilder) FollowedSites()(*ItemFollowedSitesRequestBuilder) { return NewItemFollowedSitesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Get retrieve the properties and relationships of user object. This operation returns by default only a subset of the more commonly used properties for each user. These default properties are noted in the Properties section. To get properties that are not returned by default, do a GET operation for the user and specify the properties in a $select OData query option. Because the user resource supports extensions, you can also use the GET operation to get custom properties and extension data in a user instance. Customers through Microsoft Entra ID for customers can also use this API operation to retrieve their details. +// Get read properties and relationships of the user object. // returns a Userable 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/user-get?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/intune-onboarding-user-get?view=graph-rest-1.0 func (m *UserItemRequestBuilder) Get(ctx context.Context, requestConfiguration *UserItemRequestBuilderGetRequestConfiguration)(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.Userable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -490,7 +490,7 @@ func (m *UserItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, func (m *UserItemRequestBuilder) Todo()(*ItemTodoRequestBuilder) { return NewItemTodoRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// ToGetRequestInformation retrieve the properties and relationships of user object. This operation returns by default only a subset of the more commonly used properties for each user. These default properties are noted in the Properties section. To get properties that are not returned by default, do a GET operation for the user and specify the properties in a $select OData query option. Because the user resource supports extensions, you can also use the GET operation to get custom properties and extension data in a user instance. Customers through Microsoft Entra ID for customers can also use this API operation to retrieve their details. +// ToGetRequestInformation read properties and relationships of the user object. // returns a *RequestInformation when successful func (m *UserItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *UserItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/users/users_request_builder.go b/users/users_request_builder.go index 25d51dcb6b..d9c73a38ca 100644 --- a/users/users_request_builder.go +++ b/users/users_request_builder.go @@ -84,7 +84,7 @@ func (m *UsersRequestBuilder) Delta()(*DeltaRequestBuilder) { // 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/intune-onboarding-user-list?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/intune-mam-user-list?view=graph-rest-1.0 func (m *UsersRequestBuilder) Get(ctx context.Context, requestConfiguration *UsersRequestBuilderGetRequestConfiguration)(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.UserCollectionResponseable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -117,7 +117,7 @@ func (m *UsersRequestBuilder) GetByIds()(*GetByIdsRequestBuilder) { // 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/intune-onboarding-user-create?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/intune-mam-user-create?view=graph-rest-1.0 func (m *UsersRequestBuilder) Post(ctx context.Context, body iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.Userable, requestConfiguration *UsersRequestBuilderPostRequestConfiguration)(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.Userable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil {