diff --git a/admin/admin_request_builder.go b/admin/admin_request_builder.go index 43ea2cf9123..606efe50162 100644 --- a/admin/admin_request_builder.go +++ b/admin/admin_request_builder.go @@ -82,6 +82,10 @@ func (m *AdminRequestBuilder) Get(ctx context.Context, requestConfiguration *Adm } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Adminable), nil } +// Microsoft365Apps provides operations to manage the microsoft365Apps property of the microsoft.graph.admin entity. +func (m *AdminRequestBuilder) Microsoft365Apps()(*Microsoft365AppsRequestBuilder) { + return NewMicrosoft365AppsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // Patch update admin func (m *AdminRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Adminable, requestConfiguration *AdminRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Adminable, error) { requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); diff --git a/admin/microsoft365_apps_installation_options_request_builder.go b/admin/microsoft365_apps_installation_options_request_builder.go new file mode 100644 index 00000000000..77298f7c68e --- /dev/null +++ b/admin/microsoft365_apps_installation_options_request_builder.go @@ -0,0 +1,157 @@ +package admin + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// Microsoft365AppsInstallationOptionsRequestBuilder provides operations to manage the installationOptions property of the microsoft.graph.adminMicrosoft365Apps entity. +type Microsoft365AppsInstallationOptionsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Microsoft365AppsInstallationOptionsRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type Microsoft365AppsInstallationOptionsRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// Microsoft365AppsInstallationOptionsRequestBuilderGetQueryParameters read the properties and relationships of an m365AppsInstallationOptions object. +type Microsoft365AppsInstallationOptionsRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// Microsoft365AppsInstallationOptionsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type Microsoft365AppsInstallationOptionsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *Microsoft365AppsInstallationOptionsRequestBuilderGetQueryParameters +} +// Microsoft365AppsInstallationOptionsRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type Microsoft365AppsInstallationOptionsRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMicrosoft365AppsInstallationOptionsRequestBuilderInternal instantiates a new InstallationOptionsRequestBuilder and sets the default values. +func NewMicrosoft365AppsInstallationOptionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*Microsoft365AppsInstallationOptionsRequestBuilder) { + m := &Microsoft365AppsInstallationOptionsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/admin/microsoft365Apps/installationOptions{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMicrosoft365AppsInstallationOptionsRequestBuilder instantiates a new InstallationOptionsRequestBuilder and sets the default values. +func NewMicrosoft365AppsInstallationOptionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*Microsoft365AppsInstallationOptionsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMicrosoft365AppsInstallationOptionsRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property installationOptions for admin +func (m *Microsoft365AppsInstallationOptionsRequestBuilder) Delete(ctx context.Context, requestConfiguration *Microsoft365AppsInstallationOptionsRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get read the properties and relationships of an m365AppsInstallationOptions object. +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/m365appsinstallationoptions-get?view=graph-rest-1.0 +func (m *Microsoft365AppsInstallationOptionsRequestBuilder) Get(ctx context.Context, requestConfiguration *Microsoft365AppsInstallationOptionsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.M365AppsInstallationOptionsable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateM365AppsInstallationOptionsFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.M365AppsInstallationOptionsable), nil +} +// Patch update the properties of an m365AppsInstallationOptions object. +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/m365appsinstallationoptions-update?view=graph-rest-1.0 +func (m *Microsoft365AppsInstallationOptionsRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.M365AppsInstallationOptionsable, requestConfiguration *Microsoft365AppsInstallationOptionsRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.M365AppsInstallationOptionsable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateM365AppsInstallationOptionsFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.M365AppsInstallationOptionsable), nil +} +// ToDeleteRequestInformation delete navigation property installationOptions for admin +func (m *Microsoft365AppsInstallationOptionsRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *Microsoft365AppsInstallationOptionsRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation read the properties and relationships of an m365AppsInstallationOptions object. +func (m *Microsoft365AppsInstallationOptionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *Microsoft365AppsInstallationOptionsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation update the properties of an m365AppsInstallationOptions object. +func (m *Microsoft365AppsInstallationOptionsRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.M365AppsInstallationOptionsable, requestConfiguration *Microsoft365AppsInstallationOptionsRequestBuilderPatchRequestConfiguration)(*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. +func (m *Microsoft365AppsInstallationOptionsRequestBuilder) WithUrl(rawUrl string)(*Microsoft365AppsInstallationOptionsRequestBuilder) { + return NewMicrosoft365AppsInstallationOptionsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/admin/microsoft365_apps_request_builder.go b/admin/microsoft365_apps_request_builder.go new file mode 100644 index 00000000000..ed0f6e171f7 --- /dev/null +++ b/admin/microsoft365_apps_request_builder.go @@ -0,0 +1,155 @@ +package admin + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// Microsoft365AppsRequestBuilder provides operations to manage the microsoft365Apps property of the microsoft.graph.admin entity. +type Microsoft365AppsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Microsoft365AppsRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type Microsoft365AppsRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// Microsoft365AppsRequestBuilderGetQueryParameters a container for the Microsoft 365 apps admin functionality. +type Microsoft365AppsRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// Microsoft365AppsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type Microsoft365AppsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *Microsoft365AppsRequestBuilderGetQueryParameters +} +// Microsoft365AppsRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type Microsoft365AppsRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewMicrosoft365AppsRequestBuilderInternal instantiates a new Microsoft365AppsRequestBuilder and sets the default values. +func NewMicrosoft365AppsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*Microsoft365AppsRequestBuilder) { + m := &Microsoft365AppsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/admin/microsoft365Apps{?%24select,%24expand}", pathParameters), + } + return m +} +// NewMicrosoft365AppsRequestBuilder instantiates a new Microsoft365AppsRequestBuilder and sets the default values. +func NewMicrosoft365AppsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*Microsoft365AppsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewMicrosoft365AppsRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property microsoft365Apps for admin +func (m *Microsoft365AppsRequestBuilder) Delete(ctx context.Context, requestConfiguration *Microsoft365AppsRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get a container for the Microsoft 365 apps admin functionality. +func (m *Microsoft365AppsRequestBuilder) Get(ctx context.Context, requestConfiguration *Microsoft365AppsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AdminMicrosoft365Appsable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateAdminMicrosoft365AppsFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AdminMicrosoft365Appsable), nil +} +// InstallationOptions provides operations to manage the installationOptions property of the microsoft.graph.adminMicrosoft365Apps entity. +func (m *Microsoft365AppsRequestBuilder) InstallationOptions()(*Microsoft365AppsInstallationOptionsRequestBuilder) { + return NewMicrosoft365AppsInstallationOptionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Patch update the navigation property microsoft365Apps in admin +func (m *Microsoft365AppsRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AdminMicrosoft365Appsable, requestConfiguration *Microsoft365AppsRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AdminMicrosoft365Appsable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateAdminMicrosoft365AppsFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AdminMicrosoft365Appsable), nil +} +// ToDeleteRequestInformation delete navigation property microsoft365Apps for admin +func (m *Microsoft365AppsRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *Microsoft365AppsRequestBuilderDeleteRequestConfiguration)(*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 a container for the Microsoft 365 apps admin functionality. +func (m *Microsoft365AppsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *Microsoft365AppsRequestBuilderGetRequestConfiguration)(*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 microsoft365Apps in admin +func (m *Microsoft365AppsRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AdminMicrosoft365Appsable, requestConfiguration *Microsoft365AppsRequestBuilderPatchRequestConfiguration)(*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. +func (m *Microsoft365AppsRequestBuilder) WithUrl(rawUrl string)(*Microsoft365AppsRequestBuilder) { + return NewMicrosoft365AppsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/admin/windows_updates_resource_connections_resource_connection_item_request_builder.go b/admin/windows_updates_resource_connections_resource_connection_item_request_builder.go index 95e32161c37..601ff029e8e 100644 --- a/admin/windows_updates_resource_connections_resource_connection_item_request_builder.go +++ b/admin/windows_updates_resource_connections_resource_connection_item_request_builder.go @@ -54,10 +54,10 @@ func NewWindowsUpdatesResourceConnectionsResourceConnectionItemRequestBuilder(ra urlParams["request-raw-url"] = rawUrl return NewWindowsUpdatesResourceConnectionsResourceConnectionItemRequestBuilderInternal(urlParams, requestAdapter) } -// Delete delete an operationalInsightsConnection object. +// Delete delete a resourceConnection object. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/windowsupdates-operationalinsightsconnection-delete?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/windowsupdates-resourceconnection-delete?view=graph-rest-1.0 func (m *WindowsUpdatesResourceConnectionsResourceConnectionItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *WindowsUpdatesResourceConnectionsResourceConnectionItemRequestBuilderDeleteRequestConfiguration)(error) { requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); if err != nil { @@ -114,7 +114,7 @@ func (m *WindowsUpdatesResourceConnectionsResourceConnectionItemRequestBuilder) } return res.(i17376df570f19ff3c32da2d66a677d31250ed0ff64059351645f48a152316b3c.ResourceConnectionable), nil } -// ToDeleteRequestInformation delete an operationalInsightsConnection object. +// ToDeleteRequestInformation delete a resourceConnection object. func (m *WindowsUpdatesResourceConnectionsResourceConnectionItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *WindowsUpdatesResourceConnectionsResourceConnectionItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/admin/windows_updates_updatable_assets_updatable_asset_item_request_builder.go b/admin/windows_updates_updatable_assets_updatable_asset_item_request_builder.go index 5dd534f2ba4..2f630dcdd4c 100644 --- a/admin/windows_updates_updatable_assets_updatable_asset_item_request_builder.go +++ b/admin/windows_updates_updatable_assets_updatable_asset_item_request_builder.go @@ -18,7 +18,7 @@ type WindowsUpdatesUpdatableAssetsUpdatableAssetItemRequestBuilderDeleteRequestC // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// WindowsUpdatesUpdatableAssetsUpdatableAssetItemRequestBuilderGetQueryParameters read the properties and relationships of an updatableAsset object. +// WindowsUpdatesUpdatableAssetsUpdatableAssetItemRequestBuilderGetQueryParameters read the properties and relationships of an updatableAssetGroup object. type WindowsUpdatesUpdatableAssetsUpdatableAssetItemRequestBuilderGetQueryParameters struct { // Expand related entities Expand []string `uriparametername:"%24expand"` @@ -54,10 +54,10 @@ func NewWindowsUpdatesUpdatableAssetsUpdatableAssetItemRequestBuilder(rawUrl str urlParams["request-raw-url"] = rawUrl return NewWindowsUpdatesUpdatableAssetsUpdatableAssetItemRequestBuilderInternal(urlParams, requestAdapter) } -// Delete delete an updatableAssetGroup object. When an updatableAssetGroup object, its member updatableAsset objects are not deleted. +// Delete delete an azureADDevice object. When a Microsoft Entra device is deleted, it is unregistered from the deployment service and automatically unenrolled from management by the service for all update categories, as well as removed from every deploymentAudience and updatableAssetGroup. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/windowsupdates-updatableassetgroup-delete?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/windowsupdates-azureaddevice-delete?view=graph-rest-1.0 func (m *WindowsUpdatesUpdatableAssetsUpdatableAssetItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *WindowsUpdatesUpdatableAssetsUpdatableAssetItemRequestBuilderDeleteRequestConfiguration)(error) { requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); if err != nil { @@ -73,10 +73,10 @@ func (m *WindowsUpdatesUpdatableAssetsUpdatableAssetItemRequestBuilder) Delete(c } return nil } -// Get read the properties and relationships of an updatableAsset object. +// Get read the properties and relationships of an updatableAssetGroup object. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/windowsupdates-updatableasset-get?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/windowsupdates-updatableassetgroup-get?view=graph-rest-1.0 func (m *WindowsUpdatesUpdatableAssetsUpdatableAssetItemRequestBuilder) Get(ctx context.Context, requestConfiguration *WindowsUpdatesUpdatableAssetsUpdatableAssetItemRequestBuilderGetRequestConfiguration)(i17376df570f19ff3c32da2d66a677d31250ed0ff64059351645f48a152316b3c.UpdatableAssetable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -130,7 +130,7 @@ func (m *WindowsUpdatesUpdatableAssetsUpdatableAssetItemRequestBuilder) Patch(ct } return res.(i17376df570f19ff3c32da2d66a677d31250ed0ff64059351645f48a152316b3c.UpdatableAssetable), nil } -// ToDeleteRequestInformation delete an updatableAssetGroup object. When an updatableAssetGroup object, its member updatableAsset objects are not deleted. +// ToDeleteRequestInformation delete an azureADDevice object. When a Microsoft Entra device is deleted, it is unregistered from the deployment service and automatically unenrolled from management by the service for all update categories, as well as removed from every deploymentAudience and updatableAssetGroup. func (m *WindowsUpdatesUpdatableAssetsUpdatableAssetItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *WindowsUpdatesUpdatableAssetsUpdatableAssetItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -140,7 +140,7 @@ func (m *WindowsUpdatesUpdatableAssetsUpdatableAssetItemRequestBuilder) ToDelete requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToGetRequestInformation read the properties and relationships of an updatableAsset object. +// ToGetRequestInformation read the properties and relationships of an updatableAssetGroup object. func (m *WindowsUpdatesUpdatableAssetsUpdatableAssetItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *WindowsUpdatesUpdatableAssetsUpdatableAssetItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/admin/windows_updates_update_policies_item_compliance_changes_compliance_change_item_request_builder.go b/admin/windows_updates_update_policies_item_compliance_changes_compliance_change_item_request_builder.go index 6cdc212c749..17923331b12 100644 --- a/admin/windows_updates_update_policies_item_compliance_changes_compliance_change_item_request_builder.go +++ b/admin/windows_updates_update_policies_item_compliance_changes_compliance_change_item_request_builder.go @@ -18,7 +18,7 @@ type WindowsUpdatesUpdatePoliciesItemComplianceChangesComplianceChangeItemReques // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// WindowsUpdatesUpdatePoliciesItemComplianceChangesComplianceChangeItemRequestBuilderGetQueryParameters read the properties and relationships of a contentApproval object. +// WindowsUpdatesUpdatePoliciesItemComplianceChangesComplianceChangeItemRequestBuilderGetQueryParameters read the properties and relationships of a complianceChange object. type WindowsUpdatesUpdatePoliciesItemComplianceChangesComplianceChangeItemRequestBuilderGetQueryParameters struct { // Expand related entities Expand []string `uriparametername:"%24expand"` @@ -54,10 +54,10 @@ func NewWindowsUpdatesUpdatePoliciesItemComplianceChangesComplianceChangeItemReq urlParams["request-raw-url"] = rawUrl return NewWindowsUpdatesUpdatePoliciesItemComplianceChangesComplianceChangeItemRequestBuilderInternal(urlParams, requestAdapter) } -// Delete delete a complianceChange object. +// Delete delete a contentApproval object. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/windowsupdates-compliancechange-delete?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/windowsupdates-contentapproval-delete?view=graph-rest-1.0 func (m *WindowsUpdatesUpdatePoliciesItemComplianceChangesComplianceChangeItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *WindowsUpdatesUpdatePoliciesItemComplianceChangesComplianceChangeItemRequestBuilderDeleteRequestConfiguration)(error) { requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); if err != nil { @@ -73,10 +73,10 @@ func (m *WindowsUpdatesUpdatePoliciesItemComplianceChangesComplianceChangeItemRe } return nil } -// Get read the properties and relationships of a contentApproval object. +// Get read the properties and relationships of a complianceChange object. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/windowsupdates-contentapproval-get?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/windowsupdates-compliancechange-get?view=graph-rest-1.0 func (m *WindowsUpdatesUpdatePoliciesItemComplianceChangesComplianceChangeItemRequestBuilder) Get(ctx context.Context, requestConfiguration *WindowsUpdatesUpdatePoliciesItemComplianceChangesComplianceChangeItemRequestBuilderGetRequestConfiguration)(i17376df570f19ff3c32da2d66a677d31250ed0ff64059351645f48a152316b3c.ComplianceChangeable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -95,10 +95,10 @@ func (m *WindowsUpdatesUpdatePoliciesItemComplianceChangesComplianceChangeItemRe } return res.(i17376df570f19ff3c32da2d66a677d31250ed0ff64059351645f48a152316b3c.ComplianceChangeable), nil } -// Patch update the properties of a complianceChange object. +// Patch update the properties of a contentApproval object. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/windowsupdates-compliancechange-update?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/windowsupdates-contentapproval-update?view=graph-rest-1.0 func (m *WindowsUpdatesUpdatePoliciesItemComplianceChangesComplianceChangeItemRequestBuilder) Patch(ctx context.Context, body i17376df570f19ff3c32da2d66a677d31250ed0ff64059351645f48a152316b3c.ComplianceChangeable, requestConfiguration *WindowsUpdatesUpdatePoliciesItemComplianceChangesComplianceChangeItemRequestBuilderPatchRequestConfiguration)(i17376df570f19ff3c32da2d66a677d31250ed0ff64059351645f48a152316b3c.ComplianceChangeable, error) { requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -117,7 +117,7 @@ func (m *WindowsUpdatesUpdatePoliciesItemComplianceChangesComplianceChangeItemRe } return res.(i17376df570f19ff3c32da2d66a677d31250ed0ff64059351645f48a152316b3c.ComplianceChangeable), nil } -// ToDeleteRequestInformation delete a complianceChange object. +// ToDeleteRequestInformation delete a contentApproval object. func (m *WindowsUpdatesUpdatePoliciesItemComplianceChangesComplianceChangeItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *WindowsUpdatesUpdatePoliciesItemComplianceChangesComplianceChangeItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -127,7 +127,7 @@ func (m *WindowsUpdatesUpdatePoliciesItemComplianceChangesComplianceChangeItemRe requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToGetRequestInformation read the properties and relationships of a contentApproval object. +// ToGetRequestInformation read the properties and relationships of a complianceChange object. func (m *WindowsUpdatesUpdatePoliciesItemComplianceChangesComplianceChangeItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *WindowsUpdatesUpdatePoliciesItemComplianceChangesComplianceChangeItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -140,7 +140,7 @@ func (m *WindowsUpdatesUpdatePoliciesItemComplianceChangesComplianceChangeItemRe requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPatchRequestInformation update the properties of a complianceChange object. +// ToPatchRequestInformation update the properties of a contentApproval object. func (m *WindowsUpdatesUpdatePoliciesItemComplianceChangesComplianceChangeItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body i17376df570f19ff3c32da2d66a677d31250ed0ff64059351645f48a152316b3c.ComplianceChangeable, requestConfiguration *WindowsUpdatesUpdatePoliciesItemComplianceChangesComplianceChangeItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/app/calls_item_participants_invite_request_builder.go b/app/calls_item_participants_invite_request_builder.go index f6a1df958bd..1ed0da9c622 100644 --- a/app/calls_item_participants_invite_request_builder.go +++ b/app/calls_item_participants_invite_request_builder.go @@ -31,10 +31,10 @@ 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. // [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)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.InviteParticipantsOperationable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -53,7 +53,7 @@ func (m *CallsItemParticipantsInviteRequestBuilder) Post(ctx context.Context, bo } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.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. 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) if requestConfiguration != nil { diff --git a/app/online_meetings_item_meeting_attendance_report_request_builder.go b/app/online_meetings_item_meeting_attendance_report_request_builder.go index 18ee37d3957..25461747f31 100644 --- a/app/online_meetings_item_meeting_attendance_report_request_builder.go +++ b/app/online_meetings_item_meeting_attendance_report_request_builder.go @@ -18,7 +18,7 @@ type OnlineMeetingsItemMeetingAttendanceReportRequestBuilderDeleteRequestConfigu // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// OnlineMeetingsItemMeetingAttendanceReportRequestBuilderGetQueryParameters get the meetingAttendanceReport for an onlineMeeting. Each time an online meeting ends, an attendance report will be generated for that session. +// OnlineMeetingsItemMeetingAttendanceReportRequestBuilderGetQueryParameters get the meetingAttendanceReport for an onlineMeeting. Each time an online meeting ends, an attendance report is generated for that session. type OnlineMeetingsItemMeetingAttendanceReportRequestBuilderGetQueryParameters struct { // Expand related entities Expand []string `uriparametername:"%24expand"` @@ -74,7 +74,7 @@ func (m *OnlineMeetingsItemMeetingAttendanceReportRequestBuilder) Delete(ctx con } return nil } -// Get get the meetingAttendanceReport for an onlineMeeting. Each time an online meeting ends, an attendance report will be generated for that session. +// Get get the meetingAttendanceReport for an onlineMeeting. Each time an online meeting ends, an attendance report is generated for that session. // [Find more info here] // // [Find more info here]: https://learn.microsoft.com/graph/api/meetingattendancereport-get?view=graph-rest-1.0 @@ -125,7 +125,7 @@ func (m *OnlineMeetingsItemMeetingAttendanceReportRequestBuilder) ToDeleteReques requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToGetRequestInformation get the meetingAttendanceReport for an onlineMeeting. Each time an online meeting ends, an attendance report will be generated for that session. +// ToGetRequestInformation get the meetingAttendanceReport for an onlineMeeting. Each time an online meeting ends, an attendance report is generated for that session. func (m *OnlineMeetingsItemMeetingAttendanceReportRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *OnlineMeetingsItemMeetingAttendanceReportRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/app/online_meetings_item_registration_request_builder.go b/app/online_meetings_item_registration_request_builder.go index d80677c1a1d..bf9aa3f3c91 100644 --- a/app/online_meetings_item_registration_request_builder.go +++ b/app/online_meetings_item_registration_request_builder.go @@ -58,10 +58,10 @@ func NewOnlineMeetingsItemRegistrationRequestBuilder(rawUrl string, requestAdapt func (m *OnlineMeetingsItemRegistrationRequestBuilder) CustomQuestions()(*OnlineMeetingsItemRegistrationCustomQuestionsRequestBuilder) { return NewOnlineMeetingsItemRegistrationCustomQuestionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Delete disable and delete the externalMeetingRegistration of an onlineMeeting. +// Delete disable and delete the meetingRegistration of an onlineMeeting on behalf of the organizer. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/externalmeetingregistration-delete?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/meetingregistration-delete?view=graph-rest-1.0 func (m *OnlineMeetingsItemRegistrationRequestBuilder) Delete(ctx context.Context, requestConfiguration *OnlineMeetingsItemRegistrationRequestBuilderDeleteRequestConfiguration)(error) { requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); if err != nil { @@ -125,7 +125,7 @@ func (m *OnlineMeetingsItemRegistrationRequestBuilder) Patch(ctx context.Context func (m *OnlineMeetingsItemRegistrationRequestBuilder) Registrants()(*OnlineMeetingsItemRegistrationRegistrantsRequestBuilder) { return NewOnlineMeetingsItemRegistrationRegistrantsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// ToDeleteRequestInformation disable and delete the externalMeetingRegistration of an onlineMeeting. +// ToDeleteRequestInformation disable and delete the meetingRegistration of an onlineMeeting on behalf of the organizer. func (m *OnlineMeetingsItemRegistrationRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *OnlineMeetingsItemRegistrationRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/app/online_meetings_item_send_virtual_appointment_reminder_sms_post_request_body.go b/app/online_meetings_item_send_virtual_appointment_reminder_sms_post_request_body.go index 19965451643..3865965fdac 100644 --- a/app/online_meetings_item_send_virtual_appointment_reminder_sms_post_request_body.go +++ b/app/online_meetings_item_send_virtual_appointment_reminder_sms_post_request_body.go @@ -35,6 +35,17 @@ func (m *OnlineMeetingsItemSendVirtualAppointmentReminderSmsPostRequestBody) Get } return val.(map[string]any) } +// GetAttendees gets the attendees property value. The attendees property +func (m *OnlineMeetingsItemSendVirtualAppointmentReminderSmsPostRequestBody) GetAttendees()([]ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttendeeNotificationInfoable) { + val, err := m.GetBackingStore().Get("attendees") + if err != nil { + panic(err) + } + if val != nil { + return val.([]ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttendeeNotificationInfoable) + } + return nil +} // GetBackingStore gets the BackingStore property value. Stores model information. func (m *OnlineMeetingsItemSendVirtualAppointmentReminderSmsPostRequestBody) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { return m.backingStore @@ -42,19 +53,19 @@ func (m *OnlineMeetingsItemSendVirtualAppointmentReminderSmsPostRequestBody) Get // GetFieldDeserializers the deserialization information for the current model func (m *OnlineMeetingsItemSendVirtualAppointmentReminderSmsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) - res["phoneNumbers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfPrimitiveValues("string") + res["attendees"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateAttendeeNotificationInfoFromDiscriminatorValue) if err != nil { return err } if val != nil { - res := make([]string, len(val)) + res := make([]ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttendeeNotificationInfoable, len(val)) for i, v := range val { if v != nil { - res[i] = *(v.(*string)) + res[i] = v.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttendeeNotificationInfoable) } } - m.SetPhoneNumbers(res) + m.SetAttendees(res) } return nil } @@ -70,17 +81,6 @@ func (m *OnlineMeetingsItemSendVirtualAppointmentReminderSmsPostRequestBody) Get } return res } -// GetPhoneNumbers gets the phoneNumbers property value. The phoneNumbers property -func (m *OnlineMeetingsItemSendVirtualAppointmentReminderSmsPostRequestBody) GetPhoneNumbers()([]string) { - val, err := m.GetBackingStore().Get("phoneNumbers") - if err != nil { - panic(err) - } - if val != nil { - return val.([]string) - } - return nil -} // GetRemindBeforeTimeInMinutesType gets the remindBeforeTimeInMinutesType property value. The remindBeforeTimeInMinutesType property func (m *OnlineMeetingsItemSendVirtualAppointmentReminderSmsPostRequestBody) GetRemindBeforeTimeInMinutesType()(*ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.RemindBeforeTimeInMinutesType) { val, err := m.GetBackingStore().Get("remindBeforeTimeInMinutesType") @@ -94,8 +94,14 @@ func (m *OnlineMeetingsItemSendVirtualAppointmentReminderSmsPostRequestBody) Get } // Serialize serializes information the current object func (m *OnlineMeetingsItemSendVirtualAppointmentReminderSmsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - if m.GetPhoneNumbers() != nil { - err := writer.WriteCollectionOfStringValues("phoneNumbers", m.GetPhoneNumbers()) + if m.GetAttendees() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAttendees())) + for i, v := range m.GetAttendees() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("attendees", cast) if err != nil { return err } @@ -122,17 +128,17 @@ func (m *OnlineMeetingsItemSendVirtualAppointmentReminderSmsPostRequestBody) Set panic(err) } } -// SetBackingStore sets the BackingStore property value. Stores model information. -func (m *OnlineMeetingsItemSendVirtualAppointmentReminderSmsPostRequestBody) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { - m.backingStore = value -} -// SetPhoneNumbers sets the phoneNumbers property value. The phoneNumbers property -func (m *OnlineMeetingsItemSendVirtualAppointmentReminderSmsPostRequestBody) SetPhoneNumbers(value []string)() { - err := m.GetBackingStore().Set("phoneNumbers", value) +// SetAttendees sets the attendees property value. The attendees property +func (m *OnlineMeetingsItemSendVirtualAppointmentReminderSmsPostRequestBody) SetAttendees(value []ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttendeeNotificationInfoable)() { + err := m.GetBackingStore().Set("attendees", value) if err != nil { panic(err) } } +// SetBackingStore sets the BackingStore property value. Stores model information. +func (m *OnlineMeetingsItemSendVirtualAppointmentReminderSmsPostRequestBody) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} // SetRemindBeforeTimeInMinutesType sets the remindBeforeTimeInMinutesType property value. The remindBeforeTimeInMinutesType property func (m *OnlineMeetingsItemSendVirtualAppointmentReminderSmsPostRequestBody) SetRemindBeforeTimeInMinutesType(value *ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.RemindBeforeTimeInMinutesType)() { err := m.GetBackingStore().Set("remindBeforeTimeInMinutesType", value) @@ -145,10 +151,10 @@ type OnlineMeetingsItemSendVirtualAppointmentReminderSmsPostRequestBodyable inte i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAttendees()([]ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttendeeNotificationInfoable) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) - GetPhoneNumbers()([]string) GetRemindBeforeTimeInMinutesType()(*ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.RemindBeforeTimeInMinutesType) + SetAttendees(value []ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttendeeNotificationInfoable)() SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() - SetPhoneNumbers(value []string)() SetRemindBeforeTimeInMinutesType(value *ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.RemindBeforeTimeInMinutesType)() } diff --git a/app/online_meetings_item_send_virtual_appointment_sms_post_request_body.go b/app/online_meetings_item_send_virtual_appointment_sms_post_request_body.go index 25016bcc3a8..0707f3e3624 100644 --- a/app/online_meetings_item_send_virtual_appointment_sms_post_request_body.go +++ b/app/online_meetings_item_send_virtual_appointment_sms_post_request_body.go @@ -35,6 +35,17 @@ func (m *OnlineMeetingsItemSendVirtualAppointmentSmsPostRequestBody) GetAddition } return val.(map[string]any) } +// GetAttendees gets the attendees property value. The attendees property +func (m *OnlineMeetingsItemSendVirtualAppointmentSmsPostRequestBody) GetAttendees()([]ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttendeeNotificationInfoable) { + val, err := m.GetBackingStore().Get("attendees") + if err != nil { + panic(err) + } + if val != nil { + return val.([]ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttendeeNotificationInfoable) + } + return nil +} // GetBackingStore gets the BackingStore property value. Stores model information. func (m *OnlineMeetingsItemSendVirtualAppointmentSmsPostRequestBody) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { return m.backingStore @@ -42,67 +53,62 @@ func (m *OnlineMeetingsItemSendVirtualAppointmentSmsPostRequestBody) GetBackingS // GetFieldDeserializers the deserialization information for the current model func (m *OnlineMeetingsItemSendVirtualAppointmentSmsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) - res["phoneNumbers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfPrimitiveValues("string") + res["attendees"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateAttendeeNotificationInfoFromDiscriminatorValue) if err != nil { return err } if val != nil { - res := make([]string, len(val)) + res := make([]ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttendeeNotificationInfoable, len(val)) for i, v := range val { if v != nil { - res[i] = *(v.(*string)) + res[i] = v.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttendeeNotificationInfoable) } } - m.SetPhoneNumbers(res) + m.SetAttendees(res) } return nil } - res["smsType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetEnumValue(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ParseVirtualAppointmentSmsType) + res["messageType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ParseVirtualAppointmentMessageType) if err != nil { return err } if val != nil { - m.SetSmsType(val.(*ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualAppointmentSmsType)) + m.SetMessageType(val.(*ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualAppointmentMessageType)) } return nil } return res } -// GetPhoneNumbers gets the phoneNumbers property value. The phoneNumbers property -func (m *OnlineMeetingsItemSendVirtualAppointmentSmsPostRequestBody) GetPhoneNumbers()([]string) { - val, err := m.GetBackingStore().Get("phoneNumbers") - if err != nil { - panic(err) - } - if val != nil { - return val.([]string) - } - return nil -} -// GetSmsType gets the smsType property value. The smsType property -func (m *OnlineMeetingsItemSendVirtualAppointmentSmsPostRequestBody) GetSmsType()(*ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualAppointmentSmsType) { - val, err := m.GetBackingStore().Get("smsType") +// GetMessageType gets the messageType property value. The messageType property +func (m *OnlineMeetingsItemSendVirtualAppointmentSmsPostRequestBody) GetMessageType()(*ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualAppointmentMessageType) { + val, err := m.GetBackingStore().Get("messageType") if err != nil { panic(err) } if val != nil { - return val.(*ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualAppointmentSmsType) + return val.(*ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualAppointmentMessageType) } return nil } // Serialize serializes information the current object func (m *OnlineMeetingsItemSendVirtualAppointmentSmsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - if m.GetPhoneNumbers() != nil { - err := writer.WriteCollectionOfStringValues("phoneNumbers", m.GetPhoneNumbers()) + if m.GetAttendees() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAttendees())) + for i, v := range m.GetAttendees() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("attendees", cast) if err != nil { return err } } - if m.GetSmsType() != nil { - cast := (*m.GetSmsType()).String() - err := writer.WriteStringValue("smsType", &cast) + if m.GetMessageType() != nil { + cast := (*m.GetMessageType()).String() + err := writer.WriteStringValue("messageType", &cast) if err != nil { return err } @@ -122,20 +128,20 @@ func (m *OnlineMeetingsItemSendVirtualAppointmentSmsPostRequestBody) SetAddition panic(err) } } -// SetBackingStore sets the BackingStore property value. Stores model information. -func (m *OnlineMeetingsItemSendVirtualAppointmentSmsPostRequestBody) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { - m.backingStore = value -} -// SetPhoneNumbers sets the phoneNumbers property value. The phoneNumbers property -func (m *OnlineMeetingsItemSendVirtualAppointmentSmsPostRequestBody) SetPhoneNumbers(value []string)() { - err := m.GetBackingStore().Set("phoneNumbers", value) +// SetAttendees sets the attendees property value. The attendees property +func (m *OnlineMeetingsItemSendVirtualAppointmentSmsPostRequestBody) SetAttendees(value []ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttendeeNotificationInfoable)() { + err := m.GetBackingStore().Set("attendees", value) if err != nil { panic(err) } } -// SetSmsType sets the smsType property value. The smsType property -func (m *OnlineMeetingsItemSendVirtualAppointmentSmsPostRequestBody) SetSmsType(value *ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualAppointmentSmsType)() { - err := m.GetBackingStore().Set("smsType", value) +// SetBackingStore sets the BackingStore property value. Stores model information. +func (m *OnlineMeetingsItemSendVirtualAppointmentSmsPostRequestBody) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetMessageType sets the messageType property value. The messageType property +func (m *OnlineMeetingsItemSendVirtualAppointmentSmsPostRequestBody) SetMessageType(value *ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualAppointmentMessageType)() { + err := m.GetBackingStore().Set("messageType", value) if err != nil { panic(err) } @@ -145,10 +151,10 @@ type OnlineMeetingsItemSendVirtualAppointmentSmsPostRequestBodyable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAttendees()([]ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttendeeNotificationInfoable) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) - GetPhoneNumbers()([]string) - GetSmsType()(*ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualAppointmentSmsType) + GetMessageType()(*ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualAppointmentMessageType) + SetAttendees(value []ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttendeeNotificationInfoable)() SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() - SetPhoneNumbers(value []string)() - SetSmsType(value *ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualAppointmentSmsType)() + SetMessageType(value *ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualAppointmentMessageType)() } diff --git a/chats/item_messages_request_builder.go b/chats/item_messages_request_builder.go index 92f469f5f1a..424d6a60eb4 100644 --- a/chats/item_messages_request_builder.go +++ b/chats/item_messages_request_builder.go @@ -100,10 +100,10 @@ func (m *ItemMessagesRequestBuilder) Get(ctx context.Context, requestConfigurati } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageCollectionResponseable), nil } -// Post send a new chatMessage in the specified channel or a chat. +// Post send a new chatMessage in the specified chat. This API cannot create a new chat; you must use the list chats method to retrieve the ID of an existing chat before creating a chat message. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/chatmessage-post?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/chat-post-messages?view=graph-rest-1.0 func (m *ItemMessagesRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, requestConfiguration *ItemMessagesRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -135,7 +135,7 @@ func (m *ItemMessagesRequestBuilder) ToGetRequestInformation(ctx context.Context requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation send a new chatMessage in the specified channel or a chat. +// ToPostRequestInformation send a new chatMessage in the specified chat. This API cannot create a new chat; you must use the list chats method to retrieve the ID of an existing chat before creating a chat message. func (m *ItemMessagesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, requestConfiguration *ItemMessagesRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/communications/calls_item_participants_invite_request_builder.go b/communications/calls_item_participants_invite_request_builder.go index 979595bf21b..f4200bd9847 100644 --- a/communications/calls_item_participants_invite_request_builder.go +++ b/communications/calls_item_participants_invite_request_builder.go @@ -31,10 +31,10 @@ 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. // [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)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.InviteParticipantsOperationable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -53,7 +53,7 @@ func (m *CallsItemParticipantsInviteRequestBuilder) Post(ctx context.Context, bo } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.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. 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) if requestConfiguration != nil { diff --git a/communications/online_meetings_item_meeting_attendance_report_request_builder.go b/communications/online_meetings_item_meeting_attendance_report_request_builder.go index 05fde12e94d..f1a35a20dd9 100644 --- a/communications/online_meetings_item_meeting_attendance_report_request_builder.go +++ b/communications/online_meetings_item_meeting_attendance_report_request_builder.go @@ -18,7 +18,7 @@ type OnlineMeetingsItemMeetingAttendanceReportRequestBuilderDeleteRequestConfigu // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// OnlineMeetingsItemMeetingAttendanceReportRequestBuilderGetQueryParameters get the meetingAttendanceReport for an onlineMeeting. Each time an online meeting ends, an attendance report will be generated for that session. +// OnlineMeetingsItemMeetingAttendanceReportRequestBuilderGetQueryParameters get the meetingAttendanceReport for an onlineMeeting. Each time an online meeting ends, an attendance report is generated for that session. type OnlineMeetingsItemMeetingAttendanceReportRequestBuilderGetQueryParameters struct { // Expand related entities Expand []string `uriparametername:"%24expand"` @@ -74,7 +74,7 @@ func (m *OnlineMeetingsItemMeetingAttendanceReportRequestBuilder) Delete(ctx con } return nil } -// Get get the meetingAttendanceReport for an onlineMeeting. Each time an online meeting ends, an attendance report will be generated for that session. +// Get get the meetingAttendanceReport for an onlineMeeting. Each time an online meeting ends, an attendance report is generated for that session. // [Find more info here] // // [Find more info here]: https://learn.microsoft.com/graph/api/meetingattendancereport-get?view=graph-rest-1.0 @@ -125,7 +125,7 @@ func (m *OnlineMeetingsItemMeetingAttendanceReportRequestBuilder) ToDeleteReques requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToGetRequestInformation get the meetingAttendanceReport for an onlineMeeting. Each time an online meeting ends, an attendance report will be generated for that session. +// ToGetRequestInformation get the meetingAttendanceReport for an onlineMeeting. Each time an online meeting ends, an attendance report is generated for that session. func (m *OnlineMeetingsItemMeetingAttendanceReportRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *OnlineMeetingsItemMeetingAttendanceReportRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/communications/online_meetings_item_registration_request_builder.go b/communications/online_meetings_item_registration_request_builder.go index a07eb2c4ba8..2601f22454c 100644 --- a/communications/online_meetings_item_registration_request_builder.go +++ b/communications/online_meetings_item_registration_request_builder.go @@ -58,10 +58,10 @@ func NewOnlineMeetingsItemRegistrationRequestBuilder(rawUrl string, requestAdapt func (m *OnlineMeetingsItemRegistrationRequestBuilder) CustomQuestions()(*OnlineMeetingsItemRegistrationCustomQuestionsRequestBuilder) { return NewOnlineMeetingsItemRegistrationCustomQuestionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Delete disable and delete the externalMeetingRegistration of an onlineMeeting. +// Delete disable and delete the meetingRegistration of an onlineMeeting on behalf of the organizer. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/externalmeetingregistration-delete?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/meetingregistration-delete?view=graph-rest-1.0 func (m *OnlineMeetingsItemRegistrationRequestBuilder) Delete(ctx context.Context, requestConfiguration *OnlineMeetingsItemRegistrationRequestBuilderDeleteRequestConfiguration)(error) { requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); if err != nil { @@ -125,7 +125,7 @@ func (m *OnlineMeetingsItemRegistrationRequestBuilder) Patch(ctx context.Context func (m *OnlineMeetingsItemRegistrationRequestBuilder) Registrants()(*OnlineMeetingsItemRegistrationRegistrantsRequestBuilder) { return NewOnlineMeetingsItemRegistrationRegistrantsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// ToDeleteRequestInformation disable and delete the externalMeetingRegistration of an onlineMeeting. +// ToDeleteRequestInformation disable and delete the meetingRegistration of an onlineMeeting on behalf of the organizer. func (m *OnlineMeetingsItemRegistrationRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *OnlineMeetingsItemRegistrationRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/communications/online_meetings_item_send_virtual_appointment_reminder_sms_post_request_body.go b/communications/online_meetings_item_send_virtual_appointment_reminder_sms_post_request_body.go index a09cafac24c..4b210307d08 100644 --- a/communications/online_meetings_item_send_virtual_appointment_reminder_sms_post_request_body.go +++ b/communications/online_meetings_item_send_virtual_appointment_reminder_sms_post_request_body.go @@ -35,6 +35,17 @@ func (m *OnlineMeetingsItemSendVirtualAppointmentReminderSmsPostRequestBody) Get } return val.(map[string]any) } +// GetAttendees gets the attendees property value. The attendees property +func (m *OnlineMeetingsItemSendVirtualAppointmentReminderSmsPostRequestBody) GetAttendees()([]ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttendeeNotificationInfoable) { + val, err := m.GetBackingStore().Get("attendees") + if err != nil { + panic(err) + } + if val != nil { + return val.([]ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttendeeNotificationInfoable) + } + return nil +} // GetBackingStore gets the BackingStore property value. Stores model information. func (m *OnlineMeetingsItemSendVirtualAppointmentReminderSmsPostRequestBody) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { return m.backingStore @@ -42,19 +53,19 @@ func (m *OnlineMeetingsItemSendVirtualAppointmentReminderSmsPostRequestBody) Get // GetFieldDeserializers the deserialization information for the current model func (m *OnlineMeetingsItemSendVirtualAppointmentReminderSmsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) - res["phoneNumbers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfPrimitiveValues("string") + res["attendees"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateAttendeeNotificationInfoFromDiscriminatorValue) if err != nil { return err } if val != nil { - res := make([]string, len(val)) + res := make([]ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttendeeNotificationInfoable, len(val)) for i, v := range val { if v != nil { - res[i] = *(v.(*string)) + res[i] = v.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttendeeNotificationInfoable) } } - m.SetPhoneNumbers(res) + m.SetAttendees(res) } return nil } @@ -70,17 +81,6 @@ func (m *OnlineMeetingsItemSendVirtualAppointmentReminderSmsPostRequestBody) Get } return res } -// GetPhoneNumbers gets the phoneNumbers property value. The phoneNumbers property -func (m *OnlineMeetingsItemSendVirtualAppointmentReminderSmsPostRequestBody) GetPhoneNumbers()([]string) { - val, err := m.GetBackingStore().Get("phoneNumbers") - if err != nil { - panic(err) - } - if val != nil { - return val.([]string) - } - return nil -} // GetRemindBeforeTimeInMinutesType gets the remindBeforeTimeInMinutesType property value. The remindBeforeTimeInMinutesType property func (m *OnlineMeetingsItemSendVirtualAppointmentReminderSmsPostRequestBody) GetRemindBeforeTimeInMinutesType()(*ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.RemindBeforeTimeInMinutesType) { val, err := m.GetBackingStore().Get("remindBeforeTimeInMinutesType") @@ -94,8 +94,14 @@ func (m *OnlineMeetingsItemSendVirtualAppointmentReminderSmsPostRequestBody) Get } // Serialize serializes information the current object func (m *OnlineMeetingsItemSendVirtualAppointmentReminderSmsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - if m.GetPhoneNumbers() != nil { - err := writer.WriteCollectionOfStringValues("phoneNumbers", m.GetPhoneNumbers()) + if m.GetAttendees() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAttendees())) + for i, v := range m.GetAttendees() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("attendees", cast) if err != nil { return err } @@ -122,17 +128,17 @@ func (m *OnlineMeetingsItemSendVirtualAppointmentReminderSmsPostRequestBody) Set panic(err) } } -// SetBackingStore sets the BackingStore property value. Stores model information. -func (m *OnlineMeetingsItemSendVirtualAppointmentReminderSmsPostRequestBody) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { - m.backingStore = value -} -// SetPhoneNumbers sets the phoneNumbers property value. The phoneNumbers property -func (m *OnlineMeetingsItemSendVirtualAppointmentReminderSmsPostRequestBody) SetPhoneNumbers(value []string)() { - err := m.GetBackingStore().Set("phoneNumbers", value) +// SetAttendees sets the attendees property value. The attendees property +func (m *OnlineMeetingsItemSendVirtualAppointmentReminderSmsPostRequestBody) SetAttendees(value []ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttendeeNotificationInfoable)() { + err := m.GetBackingStore().Set("attendees", value) if err != nil { panic(err) } } +// SetBackingStore sets the BackingStore property value. Stores model information. +func (m *OnlineMeetingsItemSendVirtualAppointmentReminderSmsPostRequestBody) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} // SetRemindBeforeTimeInMinutesType sets the remindBeforeTimeInMinutesType property value. The remindBeforeTimeInMinutesType property func (m *OnlineMeetingsItemSendVirtualAppointmentReminderSmsPostRequestBody) SetRemindBeforeTimeInMinutesType(value *ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.RemindBeforeTimeInMinutesType)() { err := m.GetBackingStore().Set("remindBeforeTimeInMinutesType", value) @@ -145,10 +151,10 @@ type OnlineMeetingsItemSendVirtualAppointmentReminderSmsPostRequestBodyable inte i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAttendees()([]ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttendeeNotificationInfoable) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) - GetPhoneNumbers()([]string) GetRemindBeforeTimeInMinutesType()(*ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.RemindBeforeTimeInMinutesType) + SetAttendees(value []ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttendeeNotificationInfoable)() SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() - SetPhoneNumbers(value []string)() SetRemindBeforeTimeInMinutesType(value *ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.RemindBeforeTimeInMinutesType)() } diff --git a/communications/online_meetings_item_send_virtual_appointment_sms_post_request_body.go b/communications/online_meetings_item_send_virtual_appointment_sms_post_request_body.go index 9751e07bf82..6a90e11f043 100644 --- a/communications/online_meetings_item_send_virtual_appointment_sms_post_request_body.go +++ b/communications/online_meetings_item_send_virtual_appointment_sms_post_request_body.go @@ -35,6 +35,17 @@ func (m *OnlineMeetingsItemSendVirtualAppointmentSmsPostRequestBody) GetAddition } return val.(map[string]any) } +// GetAttendees gets the attendees property value. The attendees property +func (m *OnlineMeetingsItemSendVirtualAppointmentSmsPostRequestBody) GetAttendees()([]ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttendeeNotificationInfoable) { + val, err := m.GetBackingStore().Get("attendees") + if err != nil { + panic(err) + } + if val != nil { + return val.([]ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttendeeNotificationInfoable) + } + return nil +} // GetBackingStore gets the BackingStore property value. Stores model information. func (m *OnlineMeetingsItemSendVirtualAppointmentSmsPostRequestBody) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { return m.backingStore @@ -42,67 +53,62 @@ func (m *OnlineMeetingsItemSendVirtualAppointmentSmsPostRequestBody) GetBackingS // GetFieldDeserializers the deserialization information for the current model func (m *OnlineMeetingsItemSendVirtualAppointmentSmsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) - res["phoneNumbers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfPrimitiveValues("string") + res["attendees"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateAttendeeNotificationInfoFromDiscriminatorValue) if err != nil { return err } if val != nil { - res := make([]string, len(val)) + res := make([]ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttendeeNotificationInfoable, len(val)) for i, v := range val { if v != nil { - res[i] = *(v.(*string)) + res[i] = v.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttendeeNotificationInfoable) } } - m.SetPhoneNumbers(res) + m.SetAttendees(res) } return nil } - res["smsType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetEnumValue(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ParseVirtualAppointmentSmsType) + res["messageType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ParseVirtualAppointmentMessageType) if err != nil { return err } if val != nil { - m.SetSmsType(val.(*ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualAppointmentSmsType)) + m.SetMessageType(val.(*ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualAppointmentMessageType)) } return nil } return res } -// GetPhoneNumbers gets the phoneNumbers property value. The phoneNumbers property -func (m *OnlineMeetingsItemSendVirtualAppointmentSmsPostRequestBody) GetPhoneNumbers()([]string) { - val, err := m.GetBackingStore().Get("phoneNumbers") - if err != nil { - panic(err) - } - if val != nil { - return val.([]string) - } - return nil -} -// GetSmsType gets the smsType property value. The smsType property -func (m *OnlineMeetingsItemSendVirtualAppointmentSmsPostRequestBody) GetSmsType()(*ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualAppointmentSmsType) { - val, err := m.GetBackingStore().Get("smsType") +// GetMessageType gets the messageType property value. The messageType property +func (m *OnlineMeetingsItemSendVirtualAppointmentSmsPostRequestBody) GetMessageType()(*ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualAppointmentMessageType) { + val, err := m.GetBackingStore().Get("messageType") if err != nil { panic(err) } if val != nil { - return val.(*ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualAppointmentSmsType) + return val.(*ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualAppointmentMessageType) } return nil } // Serialize serializes information the current object func (m *OnlineMeetingsItemSendVirtualAppointmentSmsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - if m.GetPhoneNumbers() != nil { - err := writer.WriteCollectionOfStringValues("phoneNumbers", m.GetPhoneNumbers()) + if m.GetAttendees() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAttendees())) + for i, v := range m.GetAttendees() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("attendees", cast) if err != nil { return err } } - if m.GetSmsType() != nil { - cast := (*m.GetSmsType()).String() - err := writer.WriteStringValue("smsType", &cast) + if m.GetMessageType() != nil { + cast := (*m.GetMessageType()).String() + err := writer.WriteStringValue("messageType", &cast) if err != nil { return err } @@ -122,20 +128,20 @@ func (m *OnlineMeetingsItemSendVirtualAppointmentSmsPostRequestBody) SetAddition panic(err) } } -// SetBackingStore sets the BackingStore property value. Stores model information. -func (m *OnlineMeetingsItemSendVirtualAppointmentSmsPostRequestBody) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { - m.backingStore = value -} -// SetPhoneNumbers sets the phoneNumbers property value. The phoneNumbers property -func (m *OnlineMeetingsItemSendVirtualAppointmentSmsPostRequestBody) SetPhoneNumbers(value []string)() { - err := m.GetBackingStore().Set("phoneNumbers", value) +// SetAttendees sets the attendees property value. The attendees property +func (m *OnlineMeetingsItemSendVirtualAppointmentSmsPostRequestBody) SetAttendees(value []ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttendeeNotificationInfoable)() { + err := m.GetBackingStore().Set("attendees", value) if err != nil { panic(err) } } -// SetSmsType sets the smsType property value. The smsType property -func (m *OnlineMeetingsItemSendVirtualAppointmentSmsPostRequestBody) SetSmsType(value *ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualAppointmentSmsType)() { - err := m.GetBackingStore().Set("smsType", value) +// SetBackingStore sets the BackingStore property value. Stores model information. +func (m *OnlineMeetingsItemSendVirtualAppointmentSmsPostRequestBody) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetMessageType sets the messageType property value. The messageType property +func (m *OnlineMeetingsItemSendVirtualAppointmentSmsPostRequestBody) SetMessageType(value *ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualAppointmentMessageType)() { + err := m.GetBackingStore().Set("messageType", value) if err != nil { panic(err) } @@ -145,10 +151,10 @@ type OnlineMeetingsItemSendVirtualAppointmentSmsPostRequestBodyable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAttendees()([]ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttendeeNotificationInfoable) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) - GetPhoneNumbers()([]string) - GetSmsType()(*ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualAppointmentSmsType) + GetMessageType()(*ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualAppointmentMessageType) + SetAttendees(value []ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttendeeNotificationInfoable)() SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() - SetPhoneNumbers(value []string)() - SetSmsType(value *ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualAppointmentSmsType)() + SetMessageType(value *ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualAppointmentMessageType)() } diff --git a/devicemanagement/virtual_endpoint_reports_get_cloud_pc_performance_report_post_request_body.go b/devicemanagement/virtual_endpoint_reports_get_cloud_pc_performance_report_post_request_body.go new file mode 100644 index 00000000000..8b9ee25aef1 --- /dev/null +++ b/devicemanagement/virtual_endpoint_reports_get_cloud_pc_performance_report_post_request_body.go @@ -0,0 +1,382 @@ +package devicemanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +// VirtualEndpointReportsGetCloudPcPerformanceReportPostRequestBody +type VirtualEndpointReportsGetCloudPcPerformanceReportPostRequestBody struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewVirtualEndpointReportsGetCloudPcPerformanceReportPostRequestBody instantiates a new VirtualEndpointReportsGetCloudPcPerformanceReportPostRequestBody and sets the default values. +func NewVirtualEndpointReportsGetCloudPcPerformanceReportPostRequestBody()(*VirtualEndpointReportsGetCloudPcPerformanceReportPostRequestBody) { + m := &VirtualEndpointReportsGetCloudPcPerformanceReportPostRequestBody{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateVirtualEndpointReportsGetCloudPcPerformanceReportPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateVirtualEndpointReportsGetCloudPcPerformanceReportPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewVirtualEndpointReportsGetCloudPcPerformanceReportPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *VirtualEndpointReportsGetCloudPcPerformanceReportPostRequestBody) GetAdditionalData()(map[string]any) { + val , err := m.backingStore.Get("additionalData") + if err != nil { + panic(err) + } + if val == nil { + var value = make(map[string]any); + m.SetAdditionalData(value); + } + return val.(map[string]any) +} +// GetBackingStore gets the BackingStore property value. Stores model information. +func (m *VirtualEndpointReportsGetCloudPcPerformanceReportPostRequestBody) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetFieldDeserializers the deserialization information for the current model +func (m *VirtualEndpointReportsGetCloudPcPerformanceReportPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["filter"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFilter(val) + } + return nil + } + res["groupBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetGroupBy(res) + } + return nil + } + res["orderBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetOrderBy(res) + } + return nil + } + res["reportName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ParseCloudPCPerformanceReportName) + if err != nil { + return err + } + if val != nil { + m.SetReportName(val.(*ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CloudPCPerformanceReportName)) + } + return nil + } + res["search"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSearch(val) + } + return nil + } + res["select"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetSelectEscaped(res) + } + return nil + } + res["skip"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSkip(val) + } + return nil + } + res["top"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTop(val) + } + return nil + } + return res +} +// GetFilter gets the filter property value. The filter property +func (m *VirtualEndpointReportsGetCloudPcPerformanceReportPostRequestBody) GetFilter()(*string) { + val, err := m.GetBackingStore().Get("filter") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetGroupBy gets the groupBy property value. The groupBy property +func (m *VirtualEndpointReportsGetCloudPcPerformanceReportPostRequestBody) GetGroupBy()([]string) { + val, err := m.GetBackingStore().Get("groupBy") + if err != nil { + panic(err) + } + if val != nil { + return val.([]string) + } + return nil +} +// GetOrderBy gets the orderBy property value. The orderBy property +func (m *VirtualEndpointReportsGetCloudPcPerformanceReportPostRequestBody) GetOrderBy()([]string) { + val, err := m.GetBackingStore().Get("orderBy") + if err != nil { + panic(err) + } + if val != nil { + return val.([]string) + } + return nil +} +// GetReportName gets the reportName property value. The reportName property +func (m *VirtualEndpointReportsGetCloudPcPerformanceReportPostRequestBody) GetReportName()(*ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CloudPCPerformanceReportName) { + val, err := m.GetBackingStore().Get("reportName") + if err != nil { + panic(err) + } + if val != nil { + return val.(*ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CloudPCPerformanceReportName) + } + return nil +} +// GetSearch gets the search property value. The search property +func (m *VirtualEndpointReportsGetCloudPcPerformanceReportPostRequestBody) GetSearch()(*string) { + val, err := m.GetBackingStore().Get("search") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetSelectEscaped gets the select property value. The select property +func (m *VirtualEndpointReportsGetCloudPcPerformanceReportPostRequestBody) GetSelectEscaped()([]string) { + val, err := m.GetBackingStore().Get("selectEscaped") + if err != nil { + panic(err) + } + if val != nil { + return val.([]string) + } + return nil +} +// GetSkip gets the skip property value. The skip property +func (m *VirtualEndpointReportsGetCloudPcPerformanceReportPostRequestBody) GetSkip()(*int32) { + val, err := m.GetBackingStore().Get("skip") + if err != nil { + panic(err) + } + if val != nil { + return val.(*int32) + } + return nil +} +// GetTop gets the top property value. The top property +func (m *VirtualEndpointReportsGetCloudPcPerformanceReportPostRequestBody) GetTop()(*int32) { + val, err := m.GetBackingStore().Get("top") + if err != nil { + panic(err) + } + if val != nil { + return val.(*int32) + } + return nil +} +// Serialize serializes information the current object +func (m *VirtualEndpointReportsGetCloudPcPerformanceReportPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("filter", m.GetFilter()) + if err != nil { + return err + } + } + if m.GetGroupBy() != nil { + err := writer.WriteCollectionOfStringValues("groupBy", m.GetGroupBy()) + if err != nil { + return err + } + } + if m.GetOrderBy() != nil { + err := writer.WriteCollectionOfStringValues("orderBy", m.GetOrderBy()) + if err != nil { + return err + } + } + if m.GetReportName() != nil { + cast := (*m.GetReportName()).String() + err := writer.WriteStringValue("reportName", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("search", m.GetSearch()) + if err != nil { + return err + } + } + if m.GetSelectEscaped() != nil { + err := writer.WriteCollectionOfStringValues("select", m.GetSelectEscaped()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("skip", m.GetSkip()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("top", m.GetTop()) + 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 *VirtualEndpointReportsGetCloudPcPerformanceReportPostRequestBody) 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 *VirtualEndpointReportsGetCloudPcPerformanceReportPostRequestBody) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetFilter sets the filter property value. The filter property +func (m *VirtualEndpointReportsGetCloudPcPerformanceReportPostRequestBody) SetFilter(value *string)() { + err := m.GetBackingStore().Set("filter", value) + if err != nil { + panic(err) + } +} +// SetGroupBy sets the groupBy property value. The groupBy property +func (m *VirtualEndpointReportsGetCloudPcPerformanceReportPostRequestBody) SetGroupBy(value []string)() { + err := m.GetBackingStore().Set("groupBy", value) + if err != nil { + panic(err) + } +} +// SetOrderBy sets the orderBy property value. The orderBy property +func (m *VirtualEndpointReportsGetCloudPcPerformanceReportPostRequestBody) SetOrderBy(value []string)() { + err := m.GetBackingStore().Set("orderBy", value) + if err != nil { + panic(err) + } +} +// SetReportName sets the reportName property value. The reportName property +func (m *VirtualEndpointReportsGetCloudPcPerformanceReportPostRequestBody) SetReportName(value *ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CloudPCPerformanceReportName)() { + err := m.GetBackingStore().Set("reportName", value) + if err != nil { + panic(err) + } +} +// SetSearch sets the search property value. The search property +func (m *VirtualEndpointReportsGetCloudPcPerformanceReportPostRequestBody) SetSearch(value *string)() { + err := m.GetBackingStore().Set("search", value) + if err != nil { + panic(err) + } +} +// SetSelectEscaped sets the select property value. The select property +func (m *VirtualEndpointReportsGetCloudPcPerformanceReportPostRequestBody) SetSelectEscaped(value []string)() { + err := m.GetBackingStore().Set("selectEscaped", value) + if err != nil { + panic(err) + } +} +// SetSkip sets the skip property value. The skip property +func (m *VirtualEndpointReportsGetCloudPcPerformanceReportPostRequestBody) SetSkip(value *int32)() { + err := m.GetBackingStore().Set("skip", value) + if err != nil { + panic(err) + } +} +// SetTop sets the top property value. The top property +func (m *VirtualEndpointReportsGetCloudPcPerformanceReportPostRequestBody) SetTop(value *int32)() { + err := m.GetBackingStore().Set("top", value) + if err != nil { + panic(err) + } +} +// VirtualEndpointReportsGetCloudPcPerformanceReportPostRequestBodyable +type VirtualEndpointReportsGetCloudPcPerformanceReportPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetFilter()(*string) + GetGroupBy()([]string) + GetOrderBy()([]string) + GetReportName()(*ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CloudPCPerformanceReportName) + GetSearch()(*string) + GetSelectEscaped()([]string) + GetSkip()(*int32) + GetTop()(*int32) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetFilter(value *string)() + SetGroupBy(value []string)() + SetOrderBy(value []string)() + SetReportName(value *ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CloudPCPerformanceReportName)() + SetSearch(value *string)() + SetSelectEscaped(value []string)() + SetSkip(value *int32)() + SetTop(value *int32)() +} diff --git a/devicemanagement/virtual_endpoint_reports_get_cloud_pc_performance_report_request_builder.go b/devicemanagement/virtual_endpoint_reports_get_cloud_pc_performance_report_request_builder.go new file mode 100644 index 00000000000..07eced1e2a9 --- /dev/null +++ b/devicemanagement/virtual_endpoint_reports_get_cloud_pc_performance_report_request_builder.go @@ -0,0 +1,69 @@ +package devicemanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// VirtualEndpointReportsGetCloudPcPerformanceReportRequestBuilder provides operations to call the getCloudPcPerformanceReport method. +type VirtualEndpointReportsGetCloudPcPerformanceReportRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// VirtualEndpointReportsGetCloudPcPerformanceReportRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type VirtualEndpointReportsGetCloudPcPerformanceReportRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewVirtualEndpointReportsGetCloudPcPerformanceReportRequestBuilderInternal instantiates a new GetCloudPcPerformanceReportRequestBuilder and sets the default values. +func NewVirtualEndpointReportsGetCloudPcPerformanceReportRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*VirtualEndpointReportsGetCloudPcPerformanceReportRequestBuilder) { + m := &VirtualEndpointReportsGetCloudPcPerformanceReportRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceManagement/virtualEndpoint/reports/getCloudPcPerformanceReport", pathParameters), + } + return m +} +// NewVirtualEndpointReportsGetCloudPcPerformanceReportRequestBuilder instantiates a new GetCloudPcPerformanceReportRequestBuilder and sets the default values. +func NewVirtualEndpointReportsGetCloudPcPerformanceReportRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*VirtualEndpointReportsGetCloudPcPerformanceReportRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewVirtualEndpointReportsGetCloudPcPerformanceReportRequestBuilderInternal(urlParams, requestAdapter) +} +// Post invoke action getCloudPcPerformanceReport +func (m *VirtualEndpointReportsGetCloudPcPerformanceReportRequestBuilder) Post(ctx context.Context, body VirtualEndpointReportsGetCloudPcPerformanceReportPostRequestBodyable, requestConfiguration *VirtualEndpointReportsGetCloudPcPerformanceReportRequestBuilderPostRequestConfiguration)([]byte, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "[]byte", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.([]byte), nil +} +// ToPostRequestInformation invoke action getCloudPcPerformanceReport +func (m *VirtualEndpointReportsGetCloudPcPerformanceReportRequestBuilder) ToPostRequestInformation(ctx context.Context, body VirtualEndpointReportsGetCloudPcPerformanceReportPostRequestBodyable, requestConfiguration *VirtualEndpointReportsGetCloudPcPerformanceReportRequestBuilderPostRequestConfiguration)(*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/octet-stream, 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. +func (m *VirtualEndpointReportsGetCloudPcPerformanceReportRequestBuilder) WithUrl(rawUrl string)(*VirtualEndpointReportsGetCloudPcPerformanceReportRequestBuilder) { + return NewVirtualEndpointReportsGetCloudPcPerformanceReportRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/devicemanagement/virtual_endpoint_reports_get_inaccessible_cloud_pc_reports_post_request_body.go b/devicemanagement/virtual_endpoint_reports_get_inaccessible_cloud_pc_reports_post_request_body.go index 3a4a1d8abea..b23e53f13c1 100644 --- a/devicemanagement/virtual_endpoint_reports_get_inaccessible_cloud_pc_reports_post_request_body.go +++ b/devicemanagement/virtual_endpoint_reports_get_inaccessible_cloud_pc_reports_post_request_body.go @@ -2,6 +2,7 @@ package devicemanagement import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" ) @@ -83,6 +84,16 @@ func (m *VirtualEndpointReportsGetInaccessibleCloudPcReportsPostRequestBody) Get } return nil } + res["reportName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ParseCloudPCInaccessibleReportName) + if err != nil { + return err + } + if val != nil { + m.SetReportName(val.(*ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CloudPCInaccessibleReportName)) + } + return nil + } res["search"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -164,6 +175,17 @@ func (m *VirtualEndpointReportsGetInaccessibleCloudPcReportsPostRequestBody) Get } return nil } +// GetReportName gets the reportName property value. The reportName property +func (m *VirtualEndpointReportsGetInaccessibleCloudPcReportsPostRequestBody) GetReportName()(*ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CloudPCInaccessibleReportName) { + val, err := m.GetBackingStore().Get("reportName") + if err != nil { + panic(err) + } + if val != nil { + return val.(*ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CloudPCInaccessibleReportName) + } + return nil +} // GetSearch gets the search property value. The search property func (m *VirtualEndpointReportsGetInaccessibleCloudPcReportsPostRequestBody) GetSearch()(*string) { val, err := m.GetBackingStore().Get("search") @@ -228,6 +250,13 @@ func (m *VirtualEndpointReportsGetInaccessibleCloudPcReportsPostRequestBody) Ser return err } } + if m.GetReportName() != nil { + cast := (*m.GetReportName()).String() + err := writer.WriteStringValue("reportName", &cast) + if err != nil { + return err + } + } { err := writer.WriteStringValue("search", m.GetSearch()) if err != nil { @@ -292,6 +321,13 @@ func (m *VirtualEndpointReportsGetInaccessibleCloudPcReportsPostRequestBody) Set panic(err) } } +// SetReportName sets the reportName property value. The reportName property +func (m *VirtualEndpointReportsGetInaccessibleCloudPcReportsPostRequestBody) SetReportName(value *ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CloudPCInaccessibleReportName)() { + err := m.GetBackingStore().Set("reportName", value) + if err != nil { + panic(err) + } +} // SetSearch sets the search property value. The search property func (m *VirtualEndpointReportsGetInaccessibleCloudPcReportsPostRequestBody) SetSearch(value *string)() { err := m.GetBackingStore().Set("search", value) @@ -329,6 +365,7 @@ type VirtualEndpointReportsGetInaccessibleCloudPcReportsPostRequestBodyable inte GetFilter()(*string) GetGroupBy()([]string) GetOrderBy()([]string) + GetReportName()(*ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CloudPCInaccessibleReportName) GetSearch()(*string) GetSelectEscaped()([]string) GetSkip()(*int32) @@ -337,6 +374,7 @@ type VirtualEndpointReportsGetInaccessibleCloudPcReportsPostRequestBodyable inte SetFilter(value *string)() SetGroupBy(value []string)() SetOrderBy(value []string)() + SetReportName(value *ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CloudPCInaccessibleReportName)() SetSearch(value *string)() SetSelectEscaped(value []string)() SetSkip(value *int32)() diff --git a/devicemanagement/virtual_endpoint_reports_request_builder.go b/devicemanagement/virtual_endpoint_reports_request_builder.go index d0113f267d2..4a217f4e5ba 100644 --- a/devicemanagement/virtual_endpoint_reports_request_builder.go +++ b/devicemanagement/virtual_endpoint_reports_request_builder.go @@ -97,6 +97,10 @@ func (m *VirtualEndpointReportsRequestBuilder) Get(ctx context.Context, requestC func (m *VirtualEndpointReportsRequestBuilder) GetActionStatusReports()(*VirtualEndpointReportsGetActionStatusReportsRequestBuilder) { return NewVirtualEndpointReportsGetActionStatusReportsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// GetCloudPcPerformanceReport provides operations to call the getCloudPcPerformanceReport method. +func (m *VirtualEndpointReportsRequestBuilder) GetCloudPcPerformanceReport()(*VirtualEndpointReportsGetCloudPcPerformanceReportRequestBuilder) { + return NewVirtualEndpointReportsGetCloudPcPerformanceReportRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // GetCloudPcRecommendationReports provides operations to call the getCloudPcRecommendationReports method. func (m *VirtualEndpointReportsRequestBuilder) GetCloudPcRecommendationReports()(*VirtualEndpointReportsGetCloudPcRecommendationReportsRequestBuilder) { return NewVirtualEndpointReportsGetCloudPcRecommendationReportsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) @@ -160,6 +164,10 @@ func (m *VirtualEndpointReportsRequestBuilder) Patch(ctx context.Context, body i } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CloudPcReportsable), nil } +// RetrieveCrossRegionDisasterRecoveryReport provides operations to call the retrieveCrossRegionDisasterRecoveryReport method. +func (m *VirtualEndpointReportsRequestBuilder) RetrieveCrossRegionDisasterRecoveryReport()(*VirtualEndpointReportsRetrieveCrossRegionDisasterRecoveryReportRequestBuilder) { + return NewVirtualEndpointReportsRetrieveCrossRegionDisasterRecoveryReportRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // ToDeleteRequestInformation delete navigation property reports for deviceManagement func (m *VirtualEndpointReportsRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *VirtualEndpointReportsRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/devicemanagement/virtual_endpoint_reports_retrieve_cross_region_disaster_recovery_report_post_request_body.go b/devicemanagement/virtual_endpoint_reports_retrieve_cross_region_disaster_recovery_report_post_request_body.go new file mode 100644 index 00000000000..d6dac52bb6f --- /dev/null +++ b/devicemanagement/virtual_endpoint_reports_retrieve_cross_region_disaster_recovery_report_post_request_body.go @@ -0,0 +1,344 @@ +package devicemanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +// VirtualEndpointReportsRetrieveCrossRegionDisasterRecoveryReportPostRequestBody +type VirtualEndpointReportsRetrieveCrossRegionDisasterRecoveryReportPostRequestBody struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewVirtualEndpointReportsRetrieveCrossRegionDisasterRecoveryReportPostRequestBody instantiates a new VirtualEndpointReportsRetrieveCrossRegionDisasterRecoveryReportPostRequestBody and sets the default values. +func NewVirtualEndpointReportsRetrieveCrossRegionDisasterRecoveryReportPostRequestBody()(*VirtualEndpointReportsRetrieveCrossRegionDisasterRecoveryReportPostRequestBody) { + m := &VirtualEndpointReportsRetrieveCrossRegionDisasterRecoveryReportPostRequestBody{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateVirtualEndpointReportsRetrieveCrossRegionDisasterRecoveryReportPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateVirtualEndpointReportsRetrieveCrossRegionDisasterRecoveryReportPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewVirtualEndpointReportsRetrieveCrossRegionDisasterRecoveryReportPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *VirtualEndpointReportsRetrieveCrossRegionDisasterRecoveryReportPostRequestBody) GetAdditionalData()(map[string]any) { + val , err := m.backingStore.Get("additionalData") + if err != nil { + panic(err) + } + if val == nil { + var value = make(map[string]any); + m.SetAdditionalData(value); + } + return val.(map[string]any) +} +// GetBackingStore gets the BackingStore property value. Stores model information. +func (m *VirtualEndpointReportsRetrieveCrossRegionDisasterRecoveryReportPostRequestBody) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetFieldDeserializers the deserialization information for the current model +func (m *VirtualEndpointReportsRetrieveCrossRegionDisasterRecoveryReportPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["filter"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFilter(val) + } + return nil + } + res["groupBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetGroupBy(res) + } + return nil + } + res["orderBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetOrderBy(res) + } + return nil + } + res["search"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSearch(val) + } + return nil + } + res["select"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetSelectEscaped(res) + } + return nil + } + res["skip"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSkip(val) + } + return nil + } + res["top"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTop(val) + } + return nil + } + return res +} +// GetFilter gets the filter property value. The filter property +func (m *VirtualEndpointReportsRetrieveCrossRegionDisasterRecoveryReportPostRequestBody) GetFilter()(*string) { + val, err := m.GetBackingStore().Get("filter") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetGroupBy gets the groupBy property value. The groupBy property +func (m *VirtualEndpointReportsRetrieveCrossRegionDisasterRecoveryReportPostRequestBody) GetGroupBy()([]string) { + val, err := m.GetBackingStore().Get("groupBy") + if err != nil { + panic(err) + } + if val != nil { + return val.([]string) + } + return nil +} +// GetOrderBy gets the orderBy property value. The orderBy property +func (m *VirtualEndpointReportsRetrieveCrossRegionDisasterRecoveryReportPostRequestBody) GetOrderBy()([]string) { + val, err := m.GetBackingStore().Get("orderBy") + if err != nil { + panic(err) + } + if val != nil { + return val.([]string) + } + return nil +} +// GetSearch gets the search property value. The search property +func (m *VirtualEndpointReportsRetrieveCrossRegionDisasterRecoveryReportPostRequestBody) GetSearch()(*string) { + val, err := m.GetBackingStore().Get("search") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetSelectEscaped gets the select property value. The select property +func (m *VirtualEndpointReportsRetrieveCrossRegionDisasterRecoveryReportPostRequestBody) GetSelectEscaped()([]string) { + val, err := m.GetBackingStore().Get("selectEscaped") + if err != nil { + panic(err) + } + if val != nil { + return val.([]string) + } + return nil +} +// GetSkip gets the skip property value. The skip property +func (m *VirtualEndpointReportsRetrieveCrossRegionDisasterRecoveryReportPostRequestBody) GetSkip()(*int32) { + val, err := m.GetBackingStore().Get("skip") + if err != nil { + panic(err) + } + if val != nil { + return val.(*int32) + } + return nil +} +// GetTop gets the top property value. The top property +func (m *VirtualEndpointReportsRetrieveCrossRegionDisasterRecoveryReportPostRequestBody) GetTop()(*int32) { + val, err := m.GetBackingStore().Get("top") + if err != nil { + panic(err) + } + if val != nil { + return val.(*int32) + } + return nil +} +// Serialize serializes information the current object +func (m *VirtualEndpointReportsRetrieveCrossRegionDisasterRecoveryReportPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("filter", m.GetFilter()) + if err != nil { + return err + } + } + if m.GetGroupBy() != nil { + err := writer.WriteCollectionOfStringValues("groupBy", m.GetGroupBy()) + if err != nil { + return err + } + } + if m.GetOrderBy() != nil { + err := writer.WriteCollectionOfStringValues("orderBy", m.GetOrderBy()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("search", m.GetSearch()) + if err != nil { + return err + } + } + if m.GetSelectEscaped() != nil { + err := writer.WriteCollectionOfStringValues("select", m.GetSelectEscaped()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("skip", m.GetSkip()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("top", m.GetTop()) + 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 *VirtualEndpointReportsRetrieveCrossRegionDisasterRecoveryReportPostRequestBody) 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 *VirtualEndpointReportsRetrieveCrossRegionDisasterRecoveryReportPostRequestBody) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetFilter sets the filter property value. The filter property +func (m *VirtualEndpointReportsRetrieveCrossRegionDisasterRecoveryReportPostRequestBody) SetFilter(value *string)() { + err := m.GetBackingStore().Set("filter", value) + if err != nil { + panic(err) + } +} +// SetGroupBy sets the groupBy property value. The groupBy property +func (m *VirtualEndpointReportsRetrieveCrossRegionDisasterRecoveryReportPostRequestBody) SetGroupBy(value []string)() { + err := m.GetBackingStore().Set("groupBy", value) + if err != nil { + panic(err) + } +} +// SetOrderBy sets the orderBy property value. The orderBy property +func (m *VirtualEndpointReportsRetrieveCrossRegionDisasterRecoveryReportPostRequestBody) SetOrderBy(value []string)() { + err := m.GetBackingStore().Set("orderBy", value) + if err != nil { + panic(err) + } +} +// SetSearch sets the search property value. The search property +func (m *VirtualEndpointReportsRetrieveCrossRegionDisasterRecoveryReportPostRequestBody) SetSearch(value *string)() { + err := m.GetBackingStore().Set("search", value) + if err != nil { + panic(err) + } +} +// SetSelectEscaped sets the select property value. The select property +func (m *VirtualEndpointReportsRetrieveCrossRegionDisasterRecoveryReportPostRequestBody) SetSelectEscaped(value []string)() { + err := m.GetBackingStore().Set("selectEscaped", value) + if err != nil { + panic(err) + } +} +// SetSkip sets the skip property value. The skip property +func (m *VirtualEndpointReportsRetrieveCrossRegionDisasterRecoveryReportPostRequestBody) SetSkip(value *int32)() { + err := m.GetBackingStore().Set("skip", value) + if err != nil { + panic(err) + } +} +// SetTop sets the top property value. The top property +func (m *VirtualEndpointReportsRetrieveCrossRegionDisasterRecoveryReportPostRequestBody) SetTop(value *int32)() { + err := m.GetBackingStore().Set("top", value) + if err != nil { + panic(err) + } +} +// VirtualEndpointReportsRetrieveCrossRegionDisasterRecoveryReportPostRequestBodyable +type VirtualEndpointReportsRetrieveCrossRegionDisasterRecoveryReportPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetFilter()(*string) + GetGroupBy()([]string) + GetOrderBy()([]string) + GetSearch()(*string) + GetSelectEscaped()([]string) + GetSkip()(*int32) + GetTop()(*int32) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetFilter(value *string)() + SetGroupBy(value []string)() + SetOrderBy(value []string)() + SetSearch(value *string)() + SetSelectEscaped(value []string)() + SetSkip(value *int32)() + SetTop(value *int32)() +} diff --git a/devicemanagement/virtual_endpoint_reports_retrieve_cross_region_disaster_recovery_report_request_builder.go b/devicemanagement/virtual_endpoint_reports_retrieve_cross_region_disaster_recovery_report_request_builder.go new file mode 100644 index 00000000000..ad7dc73ed70 --- /dev/null +++ b/devicemanagement/virtual_endpoint_reports_retrieve_cross_region_disaster_recovery_report_request_builder.go @@ -0,0 +1,69 @@ +package devicemanagement + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// VirtualEndpointReportsRetrieveCrossRegionDisasterRecoveryReportRequestBuilder provides operations to call the retrieveCrossRegionDisasterRecoveryReport method. +type VirtualEndpointReportsRetrieveCrossRegionDisasterRecoveryReportRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// VirtualEndpointReportsRetrieveCrossRegionDisasterRecoveryReportRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type VirtualEndpointReportsRetrieveCrossRegionDisasterRecoveryReportRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewVirtualEndpointReportsRetrieveCrossRegionDisasterRecoveryReportRequestBuilderInternal instantiates a new RetrieveCrossRegionDisasterRecoveryReportRequestBuilder and sets the default values. +func NewVirtualEndpointReportsRetrieveCrossRegionDisasterRecoveryReportRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*VirtualEndpointReportsRetrieveCrossRegionDisasterRecoveryReportRequestBuilder) { + m := &VirtualEndpointReportsRetrieveCrossRegionDisasterRecoveryReportRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/deviceManagement/virtualEndpoint/reports/retrieveCrossRegionDisasterRecoveryReport", pathParameters), + } + return m +} +// NewVirtualEndpointReportsRetrieveCrossRegionDisasterRecoveryReportRequestBuilder instantiates a new RetrieveCrossRegionDisasterRecoveryReportRequestBuilder and sets the default values. +func NewVirtualEndpointReportsRetrieveCrossRegionDisasterRecoveryReportRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*VirtualEndpointReportsRetrieveCrossRegionDisasterRecoveryReportRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewVirtualEndpointReportsRetrieveCrossRegionDisasterRecoveryReportRequestBuilderInternal(urlParams, requestAdapter) +} +// Post invoke action retrieveCrossRegionDisasterRecoveryReport +func (m *VirtualEndpointReportsRetrieveCrossRegionDisasterRecoveryReportRequestBuilder) Post(ctx context.Context, body VirtualEndpointReportsRetrieveCrossRegionDisasterRecoveryReportPostRequestBodyable, requestConfiguration *VirtualEndpointReportsRetrieveCrossRegionDisasterRecoveryReportRequestBuilderPostRequestConfiguration)([]byte, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "[]byte", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.([]byte), nil +} +// ToPostRequestInformation invoke action retrieveCrossRegionDisasterRecoveryReport +func (m *VirtualEndpointReportsRetrieveCrossRegionDisasterRecoveryReportRequestBuilder) ToPostRequestInformation(ctx context.Context, body VirtualEndpointReportsRetrieveCrossRegionDisasterRecoveryReportPostRequestBodyable, requestConfiguration *VirtualEndpointReportsRetrieveCrossRegionDisasterRecoveryReportRequestBuilderPostRequestConfiguration)(*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/octet-stream, 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. +func (m *VirtualEndpointReportsRetrieveCrossRegionDisasterRecoveryReportRequestBuilder) WithUrl(rawUrl string)(*VirtualEndpointReportsRetrieveCrossRegionDisasterRecoveryReportRequestBuilder) { + return NewVirtualEndpointReportsRetrieveCrossRegionDisasterRecoveryReportRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/drives/item_items_item_retention_label_request_builder.go b/drives/item_items_item_retention_label_request_builder.go index 467cc55b39c..9637a5c4f16 100644 --- a/drives/item_items_item_retention_label_request_builder.go +++ b/drives/item_items_item_retention_label_request_builder.go @@ -92,10 +92,10 @@ func (m *ItemItemsItemRetentionLabelRequestBuilder) Get(ctx context.Context, req } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ItemRetentionLabelable), nil } -// Patch lock or unlock a retention label on a driveItem that classifies content as records. For information about retention labels from an administrator's perspective, see Use retention labels to manage the lifecycle of documents stored in SharePoint. For more information about how you can lock and unlock retention labels, see Use record versioning to update records stored in SharePoint or OneDrive. +// Patch apply (set) a retention label on a driveItem (files and folders). Retention labels don't need to be published in a retention label policy to be applied using this method. When a retention label is applied to a folder, all the items in the folder are tagged with the same retention label. For information about conflict resolution for retention labels, see Will an existing label be overridden or removed. For information about retention labels from an administrator's perspective, see Use retention labels to manage the lifecycle of documents stored in SharePoint. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/driveitem-lockorunlockrecord?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/driveitem-setretentionlabel?view=graph-rest-1.0 func (m *ItemItemsItemRetentionLabelRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ItemRetentionLabelable, requestConfiguration *ItemItemsItemRetentionLabelRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ItemRetentionLabelable, error) { requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -137,7 +137,7 @@ func (m *ItemItemsItemRetentionLabelRequestBuilder) ToGetRequestInformation(ctx requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPatchRequestInformation lock or unlock a retention label on a driveItem that classifies content as records. For information about retention labels from an administrator's perspective, see Use retention labels to manage the lifecycle of documents stored in SharePoint. For more information about how you can lock and unlock retention labels, see Use record versioning to update records stored in SharePoint or OneDrive. +// ToPatchRequestInformation apply (set) a retention label on a driveItem (files and folders). Retention labels don't need to be published in a retention label policy to be applied using this method. When a retention label is applied to a folder, all the items in the folder are tagged with the same retention label. For information about conflict resolution for retention labels, see Will an existing label be overridden or removed. For information about retention labels from an administrator's perspective, see Use retention labels to manage the lifecycle of documents stored in SharePoint. func (m *ItemItemsItemRetentionLabelRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ItemRetentionLabelable, requestConfiguration *ItemItemsItemRetentionLabelRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/drives/item_items_item_workbook_names_request_builder.go b/drives/item_items_item_workbook_names_request_builder.go index 32a0f4eb0c5..6d230738fac 100644 --- a/drives/item_items_item_workbook_names_request_builder.go +++ b/drives/item_items_item_workbook_names_request_builder.go @@ -85,7 +85,7 @@ func (m *ItemItemsItemWorkbookNamesRequestBuilder) Count()(*ItemItemsItemWorkboo // Get retrieve a list of nameditem objects. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/workbook-list-names?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/nameditem-list?view=graph-rest-1.0 func (m *ItemItemsItemWorkbookNamesRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemItemsItemWorkbookNamesRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.WorkbookNamedItemCollectionResponseable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { diff --git a/drives/item_items_item_workbook_tables_add_request_builder.go b/drives/item_items_item_workbook_tables_add_request_builder.go index de7b64dc196..73717c5ff9d 100644 --- a/drives/item_items_item_workbook_tables_add_request_builder.go +++ b/drives/item_items_item_workbook_tables_add_request_builder.go @@ -31,10 +31,10 @@ 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 thrown. // [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)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.WorkbookTableable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -53,7 +53,7 @@ func (m *ItemItemsItemWorkbookTablesAddRequestBuilder) Post(ctx context.Context, } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.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 thrown. 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) if requestConfiguration != nil { diff --git a/drives/item_items_item_workbook_tables_item_rows_request_builder.go b/drives/item_items_item_workbook_tables_item_rows_request_builder.go index 69ad2ae0c96..00b83821a9d 100644 --- a/drives/item_items_item_workbook_tables_item_rows_request_builder.go +++ b/drives/item_items_item_workbook_tables_item_rows_request_builder.go @@ -81,7 +81,7 @@ func (m *ItemItemsItemWorkbookTablesItemRowsRequestBuilder) Count()(*ItemItemsIt // Get retrieve a list of tablerow objects. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/tablerow-list?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/table-list-rows?view=graph-rest-1.0 func (m *ItemItemsItemWorkbookTablesItemRowsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemItemsItemWorkbookTablesItemRowsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.WorkbookTableRowCollectionResponseable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { diff --git a/drives/item_items_item_workbook_tables_request_builder.go b/drives/item_items_item_workbook_tables_request_builder.go index b28656db88c..c68aab65dac 100644 --- a/drives/item_items_item_workbook_tables_request_builder.go +++ b/drives/item_items_item_workbook_tables_request_builder.go @@ -81,7 +81,7 @@ func (m *ItemItemsItemWorkbookTablesRequestBuilder) Count()(*ItemItemsItemWorkbo // Get retrieve a list of table objects. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/workbook-list-tables?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/table-list?view=graph-rest-1.0 func (m *ItemItemsItemWorkbookTablesRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemItemsItemWorkbookTablesRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.WorkbookTableCollectionResponseable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { diff --git a/drives/item_items_item_workbook_worksheets_item_charts_item_series_item_points_request_builder.go b/drives/item_items_item_workbook_worksheets_item_charts_item_series_item_points_request_builder.go index c7b325c5baa..465f64f37c2 100644 --- a/drives/item_items_item_workbook_worksheets_item_charts_item_series_item_points_request_builder.go +++ b/drives/item_items_item_workbook_worksheets_item_charts_item_series_item_points_request_builder.go @@ -11,7 +11,7 @@ import ( type ItemItemsItemWorkbookWorksheetsItemChartsItemSeriesItemPointsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ItemItemsItemWorkbookWorksheetsItemChartsItemSeriesItemPointsRequestBuilderGetQueryParameters retrieve a list of chartpoints objects. +// ItemItemsItemWorkbookWorksheetsItemChartsItemSeriesItemPointsRequestBuilderGetQueryParameters retrieve a list of chartpoint objects. type ItemItemsItemWorkbookWorksheetsItemChartsItemSeriesItemPointsRequestBuilderGetQueryParameters struct { // Include count of items Count *bool `uriparametername:"%24count"` @@ -74,10 +74,10 @@ func NewItemItemsItemWorkbookWorksheetsItemChartsItemSeriesItemPointsRequestBuil func (m *ItemItemsItemWorkbookWorksheetsItemChartsItemSeriesItemPointsRequestBuilder) Count()(*ItemItemsItemWorkbookWorksheetsItemChartsItemSeriesItemPointsCountRequestBuilder) { return NewItemItemsItemWorkbookWorksheetsItemChartsItemSeriesItemPointsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Get retrieve a list of chartpoints objects. +// Get retrieve a list of chartpoint objects. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/chartseries-list-points?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/chartpoint-list?view=graph-rest-1.0 func (m *ItemItemsItemWorkbookWorksheetsItemChartsItemSeriesItemPointsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemItemsItemWorkbookWorksheetsItemChartsItemSeriesItemPointsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.WorkbookChartPointCollectionResponseable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -122,7 +122,7 @@ func (m *ItemItemsItemWorkbookWorksheetsItemChartsItemSeriesItemPointsRequestBui } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.WorkbookChartPointable), nil } -// ToGetRequestInformation retrieve a list of chartpoints objects. +// ToGetRequestInformation retrieve a list of chartpoint objects. func (m *ItemItemsItemWorkbookWorksheetsItemChartsItemSeriesItemPointsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemItemsItemWorkbookWorksheetsItemChartsItemSeriesItemPointsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/drives/item_items_item_workbook_worksheets_item_charts_item_series_request_builder.go b/drives/item_items_item_workbook_worksheets_item_charts_item_series_request_builder.go index cef2751f74a..b93ada8ca8a 100644 --- a/drives/item_items_item_workbook_worksheets_item_charts_item_series_request_builder.go +++ b/drives/item_items_item_workbook_worksheets_item_charts_item_series_request_builder.go @@ -77,7 +77,7 @@ func (m *ItemItemsItemWorkbookWorksheetsItemChartsItemSeriesRequestBuilder) Coun // Get retrieve a list of chartseries objects. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/chartseries-list?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/chart-list-series?view=graph-rest-1.0 func (m *ItemItemsItemWorkbookWorksheetsItemChartsItemSeriesRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemItemsItemWorkbookWorksheetsItemChartsItemSeriesRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.WorkbookChartSeriesCollectionResponseable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { diff --git a/drives/item_items_item_workbook_worksheets_item_tables_add_request_builder.go b/drives/item_items_item_workbook_worksheets_item_tables_add_request_builder.go index 5b6c7868bee..c6981153b75 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,10 +31,10 @@ 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 thrown. // [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)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.WorkbookTableable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -53,7 +53,7 @@ func (m *ItemItemsItemWorkbookWorksheetsItemTablesAddRequestBuilder) Post(ctx co } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.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 thrown. 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) if requestConfiguration != nil { diff --git a/drives/item_items_item_workbook_worksheets_item_tables_item_rows_request_builder.go b/drives/item_items_item_workbook_worksheets_item_tables_item_rows_request_builder.go index 2c7d6b12a10..c5ac9e13bee 100644 --- a/drives/item_items_item_workbook_worksheets_item_tables_item_rows_request_builder.go +++ b/drives/item_items_item_workbook_worksheets_item_tables_item_rows_request_builder.go @@ -81,7 +81,7 @@ func (m *ItemItemsItemWorkbookWorksheetsItemTablesItemRowsRequestBuilder) Count( // Get retrieve a list of tablerow objects. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/tablerow-list?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/table-list-rows?view=graph-rest-1.0 func (m *ItemItemsItemWorkbookWorksheetsItemTablesItemRowsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemItemsItemWorkbookWorksheetsItemTablesItemRowsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.WorkbookTableRowCollectionResponseable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { diff --git a/drives/item_items_item_workbook_worksheets_request_builder.go b/drives/item_items_item_workbook_worksheets_request_builder.go index 073d8c603f2..75500ddef93 100644 --- a/drives/item_items_item_workbook_worksheets_request_builder.go +++ b/drives/item_items_item_workbook_worksheets_request_builder.go @@ -81,7 +81,7 @@ func (m *ItemItemsItemWorkbookWorksheetsRequestBuilder) Count()(*ItemItemsItemWo // Get retrieve a list of worksheet objects. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/workbook-list-worksheets?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/worksheet-list?view=graph-rest-1.0 func (m *ItemItemsItemWorkbookWorksheetsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemItemsItemWorkbookWorksheetsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.WorkbookWorksheetCollectionResponseable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { diff --git a/drives/item_list_items_item_create_link_post_request_body.go b/drives/item_list_items_item_create_link_post_request_body.go index ed608025189..46f141c656c 100644 --- a/drives/item_list_items_item_create_link_post_request_body.go +++ b/drives/item_list_items_item_create_link_post_request_body.go @@ -64,6 +64,16 @@ func (m *ItemListItemsItemCreateLinkPostRequestBody) GetFieldDeserializers()(map } return nil } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } res["password"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -132,6 +142,17 @@ func (m *ItemListItemsItemCreateLinkPostRequestBody) GetFieldDeserializers()(map } return res } +// GetMessage gets the message property value. The message property +func (m *ItemListItemsItemCreateLinkPostRequestBody) GetMessage()(*string) { + val, err := m.GetBackingStore().Get("message") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} // GetPassword gets the password property value. The password property func (m *ItemListItemsItemCreateLinkPostRequestBody) GetPassword()(*string) { val, err := m.GetBackingStore().Get("password") @@ -206,6 +227,12 @@ func (m *ItemListItemsItemCreateLinkPostRequestBody) Serialize(writer i878a80d23 return err } } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } { err := writer.WriteStringValue("password", m.GetPassword()) if err != nil { @@ -274,6 +301,13 @@ func (m *ItemListItemsItemCreateLinkPostRequestBody) SetExpirationDateTime(value panic(err) } } +// SetMessage sets the message property value. The message property +func (m *ItemListItemsItemCreateLinkPostRequestBody) SetMessage(value *string)() { + err := m.GetBackingStore().Set("message", value) + if err != nil { + panic(err) + } +} // SetPassword sets the password property value. The password property func (m *ItemListItemsItemCreateLinkPostRequestBody) SetPassword(value *string)() { err := m.GetBackingStore().Set("password", value) @@ -323,6 +357,7 @@ type ItemListItemsItemCreateLinkPostRequestBodyable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) GetExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetMessage()(*string) GetPassword()(*string) GetRecipients()([]ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DriveRecipientable) GetRetainInheritedPermissions()(*bool) @@ -331,6 +366,7 @@ type ItemListItemsItemCreateLinkPostRequestBodyable interface { GetTypeEscaped()(*string) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() SetExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetMessage(value *string)() SetPassword(value *string)() SetRecipients(value []ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DriveRecipientable)() SetRetainInheritedPermissions(value *bool)() diff --git a/education/users_education_user_item_request_builder.go b/education/users_education_user_item_request_builder.go index 8528bdf1be7..5a8a58e7bb7 100644 --- a/education/users_education_user_item_request_builder.go +++ b/education/users_education_user_item_request_builder.go @@ -103,10 +103,10 @@ func (m *UsersEducationUserItemRequestBuilder) Get(ctx context.Context, requestC } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.EducationUserable), nil } -// Patch update the properties of an educationuser object. +// Patch update the relatedContact collection of an educationUser object. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/educationuser-update?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/relatedcontact-update?view=graph-rest-1.0 func (m *UsersEducationUserItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.EducationUserable, requestConfiguration *UsersEducationUserItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.EducationUserable, error) { requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -160,7 +160,7 @@ func (m *UsersEducationUserItemRequestBuilder) ToGetRequestInformation(ctx conte requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPatchRequestInformation update the properties of an educationuser object. +// ToPatchRequestInformation update the relatedContact collection of an educationUser object. func (m *UsersEducationUserItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.EducationUserable, requestConfiguration *UsersEducationUserItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/employeeexperience/communities_community_item_request_builder.go b/employeeexperience/communities_community_item_request_builder.go new file mode 100644 index 00000000000..2067856c877 --- /dev/null +++ b/employeeexperience/communities_community_item_request_builder.go @@ -0,0 +1,162 @@ +package employeeexperience + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// CommunitiesCommunityItemRequestBuilder provides operations to manage the communities property of the microsoft.graph.employeeExperience entity. +type CommunitiesCommunityItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// CommunitiesCommunityItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CommunitiesCommunityItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// CommunitiesCommunityItemRequestBuilderGetQueryParameters read the properties and relationships of a community object. +type CommunitiesCommunityItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// CommunitiesCommunityItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CommunitiesCommunityItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *CommunitiesCommunityItemRequestBuilderGetQueryParameters +} +// CommunitiesCommunityItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CommunitiesCommunityItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewCommunitiesCommunityItemRequestBuilderInternal instantiates a new CommunityItemRequestBuilder and sets the default values. +func NewCommunitiesCommunityItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CommunitiesCommunityItemRequestBuilder) { + m := &CommunitiesCommunityItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/employeeExperience/communities/{community%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewCommunitiesCommunityItemRequestBuilder instantiates a new CommunityItemRequestBuilder and sets the default values. +func NewCommunitiesCommunityItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CommunitiesCommunityItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewCommunitiesCommunityItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property communities for employeeExperience +func (m *CommunitiesCommunityItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *CommunitiesCommunityItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get read the properties and relationships of a community object. +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/community-get?view=graph-rest-1.0 +func (m *CommunitiesCommunityItemRequestBuilder) Get(ctx context.Context, requestConfiguration *CommunitiesCommunityItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Communityable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateCommunityFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Communityable), nil +} +// Group provides operations to manage the group property of the microsoft.graph.community entity. +func (m *CommunitiesCommunityItemRequestBuilder) Group()(*CommunitiesItemGroupRequestBuilder) { + return NewCommunitiesItemGroupRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Owners provides operations to manage the owners property of the microsoft.graph.community entity. +func (m *CommunitiesCommunityItemRequestBuilder) Owners()(*CommunitiesItemOwnersRequestBuilder) { + return NewCommunitiesItemOwnersRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Patch update the navigation property communities in employeeExperience +func (m *CommunitiesCommunityItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Communityable, requestConfiguration *CommunitiesCommunityItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Communityable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateCommunityFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Communityable), nil +} +// ToDeleteRequestInformation delete navigation property communities for employeeExperience +func (m *CommunitiesCommunityItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *CommunitiesCommunityItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation read the properties and relationships of a community object. +func (m *CommunitiesCommunityItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *CommunitiesCommunityItemRequestBuilderGetRequestConfiguration)(*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 communities in employeeExperience +func (m *CommunitiesCommunityItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Communityable, requestConfiguration *CommunitiesCommunityItemRequestBuilderPatchRequestConfiguration)(*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. +func (m *CommunitiesCommunityItemRequestBuilder) WithUrl(rawUrl string)(*CommunitiesCommunityItemRequestBuilder) { + return NewCommunitiesCommunityItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/employeeexperience/communities_count_request_builder.go b/employeeexperience/communities_count_request_builder.go new file mode 100644 index 00000000000..012680acec5 --- /dev/null +++ b/employeeexperience/communities_count_request_builder.go @@ -0,0 +1,77 @@ +package employeeexperience + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// CommunitiesCountRequestBuilder provides operations to count the resources in the collection. +type CommunitiesCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// CommunitiesCountRequestBuilderGetQueryParameters get the number of the resource +type CommunitiesCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// CommunitiesCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CommunitiesCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *CommunitiesCountRequestBuilderGetQueryParameters +} +// NewCommunitiesCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewCommunitiesCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CommunitiesCountRequestBuilder) { + m := &CommunitiesCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/employeeExperience/communities/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewCommunitiesCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewCommunitiesCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CommunitiesCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewCommunitiesCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *CommunitiesCountRequestBuilder) Get(ctx context.Context, requestConfiguration *CommunitiesCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *CommunitiesCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *CommunitiesCountRequestBuilderGetRequestConfiguration)(*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. +func (m *CommunitiesCountRequestBuilder) WithUrl(rawUrl string)(*CommunitiesCountRequestBuilder) { + return NewCommunitiesCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/employeeexperience/communities_item_group_request_builder.go b/employeeexperience/communities_item_group_request_builder.go new file mode 100644 index 00000000000..c14225897a9 --- /dev/null +++ b/employeeexperience/communities_item_group_request_builder.go @@ -0,0 +1,82 @@ +package employeeexperience + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// CommunitiesItemGroupRequestBuilder provides operations to manage the group property of the microsoft.graph.community entity. +type CommunitiesItemGroupRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// CommunitiesItemGroupRequestBuilderGetQueryParameters the Microsoft 365 group that manages the membership of this community. +type CommunitiesItemGroupRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// CommunitiesItemGroupRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CommunitiesItemGroupRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *CommunitiesItemGroupRequestBuilderGetQueryParameters +} +// NewCommunitiesItemGroupRequestBuilderInternal instantiates a new GroupRequestBuilder and sets the default values. +func NewCommunitiesItemGroupRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CommunitiesItemGroupRequestBuilder) { + m := &CommunitiesItemGroupRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/employeeExperience/communities/{community%2Did}/group{?%24select,%24expand}", pathParameters), + } + return m +} +// NewCommunitiesItemGroupRequestBuilder instantiates a new GroupRequestBuilder and sets the default values. +func NewCommunitiesItemGroupRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CommunitiesItemGroupRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewCommunitiesItemGroupRequestBuilderInternal(urlParams, requestAdapter) +} +// Get the Microsoft 365 group that manages the membership of this community. +func (m *CommunitiesItemGroupRequestBuilder) Get(ctx context.Context, requestConfiguration *CommunitiesItemGroupRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Groupable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateGroupFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Groupable), nil +} +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *CommunitiesItemGroupRequestBuilder) ServiceProvisioningErrors()(*CommunitiesItemGroupServiceProvisioningErrorsRequestBuilder) { + return NewCommunitiesItemGroupServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToGetRequestInformation the Microsoft 365 group that manages the membership of this community. +func (m *CommunitiesItemGroupRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *CommunitiesItemGroupRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *CommunitiesItemGroupRequestBuilder) WithUrl(rawUrl string)(*CommunitiesItemGroupRequestBuilder) { + return NewCommunitiesItemGroupRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/employeeexperience/communities_item_group_service_provisioning_errors_count_request_builder.go b/employeeexperience/communities_item_group_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..8015d1006b0 --- /dev/null +++ b/employeeexperience/communities_item_group_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,77 @@ +package employeeexperience + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// CommunitiesItemGroupServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type CommunitiesItemGroupServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// CommunitiesItemGroupServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type CommunitiesItemGroupServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// CommunitiesItemGroupServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CommunitiesItemGroupServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *CommunitiesItemGroupServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewCommunitiesItemGroupServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewCommunitiesItemGroupServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CommunitiesItemGroupServiceProvisioningErrorsCountRequestBuilder) { + m := &CommunitiesItemGroupServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/employeeExperience/communities/{community%2Did}/group/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewCommunitiesItemGroupServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewCommunitiesItemGroupServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CommunitiesItemGroupServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewCommunitiesItemGroupServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *CommunitiesItemGroupServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *CommunitiesItemGroupServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *CommunitiesItemGroupServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *CommunitiesItemGroupServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*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. +func (m *CommunitiesItemGroupServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*CommunitiesItemGroupServiceProvisioningErrorsCountRequestBuilder) { + return NewCommunitiesItemGroupServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/employeeexperience/communities_item_group_service_provisioning_errors_request_builder.go b/employeeexperience/communities_item_group_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..ab3a8ea9d06 --- /dev/null +++ b/employeeexperience/communities_item_group_service_provisioning_errors_request_builder.go @@ -0,0 +1,94 @@ +package employeeexperience + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// CommunitiesItemGroupServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \employeeExperience\communities\{community-id}\group\serviceProvisioningErrors +type CommunitiesItemGroupServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// CommunitiesItemGroupServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object. +type CommunitiesItemGroupServiceProvisioningErrorsRequestBuilderGetQueryParameters 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"` +} +// CommunitiesItemGroupServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CommunitiesItemGroupServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *CommunitiesItemGroupServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewCommunitiesItemGroupServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewCommunitiesItemGroupServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CommunitiesItemGroupServiceProvisioningErrorsRequestBuilder) { + m := &CommunitiesItemGroupServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/employeeExperience/communities/{community%2Did}/group/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewCommunitiesItemGroupServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewCommunitiesItemGroupServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CommunitiesItemGroupServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewCommunitiesItemGroupServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *CommunitiesItemGroupServiceProvisioningErrorsRequestBuilder) Count()(*CommunitiesItemGroupServiceProvisioningErrorsCountRequestBuilder) { + return NewCommunitiesItemGroupServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object. +func (m *CommunitiesItemGroupServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *CommunitiesItemGroupServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a group object. +func (m *CommunitiesItemGroupServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *CommunitiesItemGroupServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *CommunitiesItemGroupServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*CommunitiesItemGroupServiceProvisioningErrorsRequestBuilder) { + return NewCommunitiesItemGroupServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/employeeexperience/communities_item_owners_count_request_builder.go b/employeeexperience/communities_item_owners_count_request_builder.go new file mode 100644 index 00000000000..ff27e9652bc --- /dev/null +++ b/employeeexperience/communities_item_owners_count_request_builder.go @@ -0,0 +1,77 @@ +package employeeexperience + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// CommunitiesItemOwnersCountRequestBuilder provides operations to count the resources in the collection. +type CommunitiesItemOwnersCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// CommunitiesItemOwnersCountRequestBuilderGetQueryParameters get the number of the resource +type CommunitiesItemOwnersCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// CommunitiesItemOwnersCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CommunitiesItemOwnersCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *CommunitiesItemOwnersCountRequestBuilderGetQueryParameters +} +// NewCommunitiesItemOwnersCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewCommunitiesItemOwnersCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CommunitiesItemOwnersCountRequestBuilder) { + m := &CommunitiesItemOwnersCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/employeeExperience/communities/{community%2Did}/owners/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewCommunitiesItemOwnersCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewCommunitiesItemOwnersCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CommunitiesItemOwnersCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewCommunitiesItemOwnersCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *CommunitiesItemOwnersCountRequestBuilder) Get(ctx context.Context, requestConfiguration *CommunitiesItemOwnersCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *CommunitiesItemOwnersCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *CommunitiesItemOwnersCountRequestBuilderGetRequestConfiguration)(*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. +func (m *CommunitiesItemOwnersCountRequestBuilder) WithUrl(rawUrl string)(*CommunitiesItemOwnersCountRequestBuilder) { + return NewCommunitiesItemOwnersCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/employeeexperience/communities_item_owners_item_mailbox_settings_request_builder.go b/employeeexperience/communities_item_owners_item_mailbox_settings_request_builder.go new file mode 100644 index 00000000000..39dcb573c04 --- /dev/null +++ b/employeeexperience/communities_item_owners_item_mailbox_settings_request_builder.go @@ -0,0 +1,118 @@ +package employeeexperience + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// CommunitiesItemOwnersItemMailboxSettingsRequestBuilder builds and executes requests for operations under \employeeExperience\communities\{community-id}\owners\{user-id}\mailboxSettings +type CommunitiesItemOwnersItemMailboxSettingsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// CommunitiesItemOwnersItemMailboxSettingsRequestBuilderGetQueryParameters settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale, and time zone. For more information, see User preferences for languages and regional formats. Returned only on $select. +type CommunitiesItemOwnersItemMailboxSettingsRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// CommunitiesItemOwnersItemMailboxSettingsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CommunitiesItemOwnersItemMailboxSettingsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *CommunitiesItemOwnersItemMailboxSettingsRequestBuilderGetQueryParameters +} +// CommunitiesItemOwnersItemMailboxSettingsRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CommunitiesItemOwnersItemMailboxSettingsRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewCommunitiesItemOwnersItemMailboxSettingsRequestBuilderInternal instantiates a new MailboxSettingsRequestBuilder and sets the default values. +func NewCommunitiesItemOwnersItemMailboxSettingsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CommunitiesItemOwnersItemMailboxSettingsRequestBuilder) { + m := &CommunitiesItemOwnersItemMailboxSettingsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/employeeExperience/communities/{community%2Did}/owners/{user%2Did}/mailboxSettings{?%24select,%24expand}", pathParameters), + } + return m +} +// NewCommunitiesItemOwnersItemMailboxSettingsRequestBuilder instantiates a new MailboxSettingsRequestBuilder and sets the default values. +func NewCommunitiesItemOwnersItemMailboxSettingsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CommunitiesItemOwnersItemMailboxSettingsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewCommunitiesItemOwnersItemMailboxSettingsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale, and time zone. For more information, see User preferences for languages and regional formats. Returned only on $select. +func (m *CommunitiesItemOwnersItemMailboxSettingsRequestBuilder) Get(ctx context.Context, requestConfiguration *CommunitiesItemOwnersItemMailboxSettingsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MailboxSettingsable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMailboxSettingsFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MailboxSettingsable), nil +} +// Patch update property mailboxSettings value. +func (m *CommunitiesItemOwnersItemMailboxSettingsRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MailboxSettingsable, requestConfiguration *CommunitiesItemOwnersItemMailboxSettingsRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MailboxSettingsable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateMailboxSettingsFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MailboxSettingsable), nil +} +// ToGetRequestInformation settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale, and time zone. For more information, see User preferences for languages and regional formats. Returned only on $select. +func (m *CommunitiesItemOwnersItemMailboxSettingsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *CommunitiesItemOwnersItemMailboxSettingsRequestBuilderGetRequestConfiguration)(*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 property mailboxSettings value. +func (m *CommunitiesItemOwnersItemMailboxSettingsRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MailboxSettingsable, requestConfiguration *CommunitiesItemOwnersItemMailboxSettingsRequestBuilderPatchRequestConfiguration)(*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. +func (m *CommunitiesItemOwnersItemMailboxSettingsRequestBuilder) WithUrl(rawUrl string)(*CommunitiesItemOwnersItemMailboxSettingsRequestBuilder) { + return NewCommunitiesItemOwnersItemMailboxSettingsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/employeeexperience/communities_item_owners_item_service_provisioning_errors_count_request_builder.go b/employeeexperience/communities_item_owners_item_service_provisioning_errors_count_request_builder.go new file mode 100644 index 00000000000..8245578f731 --- /dev/null +++ b/employeeexperience/communities_item_owners_item_service_provisioning_errors_count_request_builder.go @@ -0,0 +1,77 @@ +package employeeexperience + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// CommunitiesItemOwnersItemServiceProvisioningErrorsCountRequestBuilder provides operations to count the resources in the collection. +type CommunitiesItemOwnersItemServiceProvisioningErrorsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// CommunitiesItemOwnersItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters get the number of the resource +type CommunitiesItemOwnersItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// CommunitiesItemOwnersItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CommunitiesItemOwnersItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *CommunitiesItemOwnersItemServiceProvisioningErrorsCountRequestBuilderGetQueryParameters +} +// NewCommunitiesItemOwnersItemServiceProvisioningErrorsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewCommunitiesItemOwnersItemServiceProvisioningErrorsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CommunitiesItemOwnersItemServiceProvisioningErrorsCountRequestBuilder) { + m := &CommunitiesItemOwnersItemServiceProvisioningErrorsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/employeeExperience/communities/{community%2Did}/owners/{user%2Did}/serviceProvisioningErrors/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewCommunitiesItemOwnersItemServiceProvisioningErrorsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewCommunitiesItemOwnersItemServiceProvisioningErrorsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CommunitiesItemOwnersItemServiceProvisioningErrorsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewCommunitiesItemOwnersItemServiceProvisioningErrorsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *CommunitiesItemOwnersItemServiceProvisioningErrorsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *CommunitiesItemOwnersItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *CommunitiesItemOwnersItemServiceProvisioningErrorsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *CommunitiesItemOwnersItemServiceProvisioningErrorsCountRequestBuilderGetRequestConfiguration)(*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. +func (m *CommunitiesItemOwnersItemServiceProvisioningErrorsCountRequestBuilder) WithUrl(rawUrl string)(*CommunitiesItemOwnersItemServiceProvisioningErrorsCountRequestBuilder) { + return NewCommunitiesItemOwnersItemServiceProvisioningErrorsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/employeeexperience/communities_item_owners_item_service_provisioning_errors_request_builder.go b/employeeexperience/communities_item_owners_item_service_provisioning_errors_request_builder.go new file mode 100644 index 00000000000..270b1dbe18d --- /dev/null +++ b/employeeexperience/communities_item_owners_item_service_provisioning_errors_request_builder.go @@ -0,0 +1,94 @@ +package employeeexperience + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// CommunitiesItemOwnersItemServiceProvisioningErrorsRequestBuilder builds and executes requests for operations under \employeeExperience\communities\{community-id}\owners\{user-id}\serviceProvisioningErrors +type CommunitiesItemOwnersItemServiceProvisioningErrorsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// CommunitiesItemOwnersItemServiceProvisioningErrorsRequestBuilderGetQueryParameters errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. +type CommunitiesItemOwnersItemServiceProvisioningErrorsRequestBuilderGetQueryParameters 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"` +} +// CommunitiesItemOwnersItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CommunitiesItemOwnersItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *CommunitiesItemOwnersItemServiceProvisioningErrorsRequestBuilderGetQueryParameters +} +// NewCommunitiesItemOwnersItemServiceProvisioningErrorsRequestBuilderInternal instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewCommunitiesItemOwnersItemServiceProvisioningErrorsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CommunitiesItemOwnersItemServiceProvisioningErrorsRequestBuilder) { + m := &CommunitiesItemOwnersItemServiceProvisioningErrorsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/employeeExperience/communities/{community%2Did}/owners/{user%2Did}/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewCommunitiesItemOwnersItemServiceProvisioningErrorsRequestBuilder instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. +func NewCommunitiesItemOwnersItemServiceProvisioningErrorsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CommunitiesItemOwnersItemServiceProvisioningErrorsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewCommunitiesItemOwnersItemServiceProvisioningErrorsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *CommunitiesItemOwnersItemServiceProvisioningErrorsRequestBuilder) Count()(*CommunitiesItemOwnersItemServiceProvisioningErrorsCountRequestBuilder) { + return NewCommunitiesItemOwnersItemServiceProvisioningErrorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. +func (m *CommunitiesItemOwnersItemServiceProvisioningErrorsRequestBuilder) Get(ctx context.Context, requestConfiguration *CommunitiesItemOwnersItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ServiceProvisioningErrorCollectionResponseable), nil +} +// ToGetRequestInformation errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. +func (m *CommunitiesItemOwnersItemServiceProvisioningErrorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *CommunitiesItemOwnersItemServiceProvisioningErrorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *CommunitiesItemOwnersItemServiceProvisioningErrorsRequestBuilder) WithUrl(rawUrl string)(*CommunitiesItemOwnersItemServiceProvisioningErrorsRequestBuilder) { + return NewCommunitiesItemOwnersItemServiceProvisioningErrorsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/employeeexperience/communities_item_owners_request_builder.go b/employeeexperience/communities_item_owners_request_builder.go new file mode 100644 index 00000000000..ef81db9c374 --- /dev/null +++ b/employeeexperience/communities_item_owners_request_builder.go @@ -0,0 +1,105 @@ +package employeeexperience + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// CommunitiesItemOwnersRequestBuilder provides operations to manage the owners property of the microsoft.graph.community entity. +type CommunitiesItemOwnersRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// CommunitiesItemOwnersRequestBuilderGetQueryParameters the admins of the community. Limited to 100 users. If this property isn't specified when you create the community, the calling user is automatically assigned as the community owner. +type CommunitiesItemOwnersRequestBuilderGetQueryParameters 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"` +} +// CommunitiesItemOwnersRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CommunitiesItemOwnersRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *CommunitiesItemOwnersRequestBuilderGetQueryParameters +} +// ByUserId provides operations to manage the owners property of the microsoft.graph.community entity. +func (m *CommunitiesItemOwnersRequestBuilder) ByUserId(userId string)(*CommunitiesItemOwnersUserItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if userId != "" { + urlTplParams["user%2Did"] = userId + } + return NewCommunitiesItemOwnersUserItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewCommunitiesItemOwnersRequestBuilderInternal instantiates a new OwnersRequestBuilder and sets the default values. +func NewCommunitiesItemOwnersRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CommunitiesItemOwnersRequestBuilder) { + m := &CommunitiesItemOwnersRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/employeeExperience/communities/{community%2Did}/owners{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewCommunitiesItemOwnersRequestBuilder instantiates a new OwnersRequestBuilder and sets the default values. +func NewCommunitiesItemOwnersRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CommunitiesItemOwnersRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewCommunitiesItemOwnersRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *CommunitiesItemOwnersRequestBuilder) Count()(*CommunitiesItemOwnersCountRequestBuilder) { + return NewCommunitiesItemOwnersCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the admins of the community. Limited to 100 users. If this property isn't specified when you create the community, the calling user is automatically assigned as the community owner. +func (m *CommunitiesItemOwnersRequestBuilder) Get(ctx context.Context, requestConfiguration *CommunitiesItemOwnersRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.UserCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateUserCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.UserCollectionResponseable), nil +} +// ToGetRequestInformation the admins of the community. Limited to 100 users. If this property isn't specified when you create the community, the calling user is automatically assigned as the community owner. +func (m *CommunitiesItemOwnersRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *CommunitiesItemOwnersRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *CommunitiesItemOwnersRequestBuilder) WithUrl(rawUrl string)(*CommunitiesItemOwnersRequestBuilder) { + return NewCommunitiesItemOwnersRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/employeeexperience/communities_item_owners_user_item_request_builder.go b/employeeexperience/communities_item_owners_user_item_request_builder.go new file mode 100644 index 00000000000..fd2170c8b93 --- /dev/null +++ b/employeeexperience/communities_item_owners_user_item_request_builder.go @@ -0,0 +1,86 @@ +package employeeexperience + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// CommunitiesItemOwnersUserItemRequestBuilder provides operations to manage the owners property of the microsoft.graph.community entity. +type CommunitiesItemOwnersUserItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// CommunitiesItemOwnersUserItemRequestBuilderGetQueryParameters the admins of the community. Limited to 100 users. If this property isn't specified when you create the community, the calling user is automatically assigned as the community owner. +type CommunitiesItemOwnersUserItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// CommunitiesItemOwnersUserItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CommunitiesItemOwnersUserItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *CommunitiesItemOwnersUserItemRequestBuilderGetQueryParameters +} +// NewCommunitiesItemOwnersUserItemRequestBuilderInternal instantiates a new UserItemRequestBuilder and sets the default values. +func NewCommunitiesItemOwnersUserItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CommunitiesItemOwnersUserItemRequestBuilder) { + m := &CommunitiesItemOwnersUserItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/employeeExperience/communities/{community%2Did}/owners/{user%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewCommunitiesItemOwnersUserItemRequestBuilder instantiates a new UserItemRequestBuilder and sets the default values. +func NewCommunitiesItemOwnersUserItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CommunitiesItemOwnersUserItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewCommunitiesItemOwnersUserItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get the admins of the community. Limited to 100 users. If this property isn't specified when you create the community, the calling user is automatically assigned as the community owner. +func (m *CommunitiesItemOwnersUserItemRequestBuilder) Get(ctx context.Context, requestConfiguration *CommunitiesItemOwnersUserItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Userable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateUserFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Userable), nil +} +// MailboxSettings the mailboxSettings property +func (m *CommunitiesItemOwnersUserItemRequestBuilder) MailboxSettings()(*CommunitiesItemOwnersItemMailboxSettingsRequestBuilder) { + return NewCommunitiesItemOwnersItemMailboxSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ServiceProvisioningErrors the serviceProvisioningErrors property +func (m *CommunitiesItemOwnersUserItemRequestBuilder) ServiceProvisioningErrors()(*CommunitiesItemOwnersItemServiceProvisioningErrorsRequestBuilder) { + return NewCommunitiesItemOwnersItemServiceProvisioningErrorsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToGetRequestInformation the admins of the community. Limited to 100 users. If this property isn't specified when you create the community, the calling user is automatically assigned as the community owner. +func (m *CommunitiesItemOwnersUserItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *CommunitiesItemOwnersUserItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *CommunitiesItemOwnersUserItemRequestBuilder) WithUrl(rawUrl string)(*CommunitiesItemOwnersUserItemRequestBuilder) { + return NewCommunitiesItemOwnersUserItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/employeeexperience/communities_request_builder.go b/employeeexperience/communities_request_builder.go new file mode 100644 index 00000000000..d33de8d0338 --- /dev/null +++ b/employeeexperience/communities_request_builder.go @@ -0,0 +1,148 @@ +package employeeexperience + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// CommunitiesRequestBuilder provides operations to manage the communities property of the microsoft.graph.employeeExperience entity. +type CommunitiesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// CommunitiesRequestBuilderGetQueryParameters read the properties and relationships of a community object. +type CommunitiesRequestBuilderGetQueryParameters 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"` +} +// CommunitiesRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CommunitiesRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *CommunitiesRequestBuilderGetQueryParameters +} +// CommunitiesRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type CommunitiesRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByCommunityId provides operations to manage the communities property of the microsoft.graph.employeeExperience entity. +func (m *CommunitiesRequestBuilder) ByCommunityId(communityId string)(*CommunitiesCommunityItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if communityId != "" { + urlTplParams["community%2Did"] = communityId + } + return NewCommunitiesCommunityItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewCommunitiesRequestBuilderInternal instantiates a new CommunitiesRequestBuilder and sets the default values. +func NewCommunitiesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CommunitiesRequestBuilder) { + m := &CommunitiesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/employeeExperience/communities{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewCommunitiesRequestBuilder instantiates a new CommunitiesRequestBuilder and sets the default values. +func NewCommunitiesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*CommunitiesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewCommunitiesRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *CommunitiesRequestBuilder) Count()(*CommunitiesCountRequestBuilder) { + return NewCommunitiesCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get read the properties and relationships of a community object. +func (m *CommunitiesRequestBuilder) Get(ctx context.Context, requestConfiguration *CommunitiesRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CommunityCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateCommunityCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CommunityCollectionResponseable), nil +} +// Post create a new community in Viva Engage. +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/employeeexperience-post-communities?view=graph-rest-1.0 +func (m *CommunitiesRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Communityable, requestConfiguration *CommunitiesRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Communityable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateCommunityFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Communityable), nil +} +// ToGetRequestInformation read the properties and relationships of a community object. +func (m *CommunitiesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *CommunitiesRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation create a new community in Viva Engage. +func (m *CommunitiesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Communityable, requestConfiguration *CommunitiesRequestBuilderPostRequestConfiguration)(*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. +func (m *CommunitiesRequestBuilder) WithUrl(rawUrl string)(*CommunitiesRequestBuilder) { + return NewCommunitiesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/employeeexperience/employee_experience_request_builder.go b/employeeexperience/employee_experience_request_builder.go index 838146e36eb..3578871ce54 100644 --- a/employeeexperience/employee_experience_request_builder.go +++ b/employeeexperience/employee_experience_request_builder.go @@ -32,6 +32,10 @@ type EmployeeExperienceRequestBuilderPatchRequestConfiguration struct { // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } +// Communities provides operations to manage the communities property of the microsoft.graph.employeeExperience entity. +func (m *EmployeeExperienceRequestBuilder) Communities()(*CommunitiesRequestBuilder) { + return NewCommunitiesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // NewEmployeeExperienceRequestBuilderInternal instantiates a new EmployeeExperienceRequestBuilder and sets the default values. func NewEmployeeExperienceRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*EmployeeExperienceRequestBuilder) { m := &EmployeeExperienceRequestBuilder{ @@ -45,6 +49,10 @@ func NewEmployeeExperienceRequestBuilder(rawUrl string, requestAdapter i2ae4187f urlParams["request-raw-url"] = rawUrl return NewEmployeeExperienceRequestBuilderInternal(urlParams, requestAdapter) } +// EngagementAsyncOperations provides operations to manage the engagementAsyncOperations property of the microsoft.graph.employeeExperience entity. +func (m *EmployeeExperienceRequestBuilder) EngagementAsyncOperations()(*EngagementAsyncOperationsRequestBuilder) { + return NewEngagementAsyncOperationsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // Get get employeeExperience func (m *EmployeeExperienceRequestBuilder) Get(ctx context.Context, requestConfiguration *EmployeeExperienceRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.EmployeeExperienceable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); diff --git a/employeeexperience/engagement_async_operations_count_request_builder.go b/employeeexperience/engagement_async_operations_count_request_builder.go new file mode 100644 index 00000000000..a19d84f570d --- /dev/null +++ b/employeeexperience/engagement_async_operations_count_request_builder.go @@ -0,0 +1,77 @@ +package employeeexperience + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// EngagementAsyncOperationsCountRequestBuilder provides operations to count the resources in the collection. +type EngagementAsyncOperationsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// EngagementAsyncOperationsCountRequestBuilderGetQueryParameters get the number of the resource +type EngagementAsyncOperationsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// EngagementAsyncOperationsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type EngagementAsyncOperationsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *EngagementAsyncOperationsCountRequestBuilderGetQueryParameters +} +// NewEngagementAsyncOperationsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewEngagementAsyncOperationsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*EngagementAsyncOperationsCountRequestBuilder) { + m := &EngagementAsyncOperationsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/employeeExperience/engagementAsyncOperations/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewEngagementAsyncOperationsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewEngagementAsyncOperationsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*EngagementAsyncOperationsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewEngagementAsyncOperationsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *EngagementAsyncOperationsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *EngagementAsyncOperationsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *EngagementAsyncOperationsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *EngagementAsyncOperationsCountRequestBuilderGetRequestConfiguration)(*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. +func (m *EngagementAsyncOperationsCountRequestBuilder) WithUrl(rawUrl string)(*EngagementAsyncOperationsCountRequestBuilder) { + return NewEngagementAsyncOperationsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/employeeexperience/engagement_async_operations_engagement_async_operation_item_request_builder.go b/employeeexperience/engagement_async_operations_engagement_async_operation_item_request_builder.go new file mode 100644 index 00000000000..59c32eb4b5c --- /dev/null +++ b/employeeexperience/engagement_async_operations_engagement_async_operation_item_request_builder.go @@ -0,0 +1,154 @@ +package employeeexperience + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// EngagementAsyncOperationsEngagementAsyncOperationItemRequestBuilder provides operations to manage the engagementAsyncOperations property of the microsoft.graph.employeeExperience entity. +type EngagementAsyncOperationsEngagementAsyncOperationItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// EngagementAsyncOperationsEngagementAsyncOperationItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type EngagementAsyncOperationsEngagementAsyncOperationItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// EngagementAsyncOperationsEngagementAsyncOperationItemRequestBuilderGetQueryParameters get an engagementAsyncOperation to track a long-running operation request. +type EngagementAsyncOperationsEngagementAsyncOperationItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// EngagementAsyncOperationsEngagementAsyncOperationItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type EngagementAsyncOperationsEngagementAsyncOperationItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *EngagementAsyncOperationsEngagementAsyncOperationItemRequestBuilderGetQueryParameters +} +// EngagementAsyncOperationsEngagementAsyncOperationItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type EngagementAsyncOperationsEngagementAsyncOperationItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewEngagementAsyncOperationsEngagementAsyncOperationItemRequestBuilderInternal instantiates a new EngagementAsyncOperationItemRequestBuilder and sets the default values. +func NewEngagementAsyncOperationsEngagementAsyncOperationItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*EngagementAsyncOperationsEngagementAsyncOperationItemRequestBuilder) { + m := &EngagementAsyncOperationsEngagementAsyncOperationItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/employeeExperience/engagementAsyncOperations/{engagementAsyncOperation%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewEngagementAsyncOperationsEngagementAsyncOperationItemRequestBuilder instantiates a new EngagementAsyncOperationItemRequestBuilder and sets the default values. +func NewEngagementAsyncOperationsEngagementAsyncOperationItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*EngagementAsyncOperationsEngagementAsyncOperationItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewEngagementAsyncOperationsEngagementAsyncOperationItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property engagementAsyncOperations for employeeExperience +func (m *EngagementAsyncOperationsEngagementAsyncOperationItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *EngagementAsyncOperationsEngagementAsyncOperationItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get get an engagementAsyncOperation to track a long-running operation request. +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/engagementasyncoperation-get?view=graph-rest-1.0 +func (m *EngagementAsyncOperationsEngagementAsyncOperationItemRequestBuilder) Get(ctx context.Context, requestConfiguration *EngagementAsyncOperationsEngagementAsyncOperationItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.EngagementAsyncOperationable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateEngagementAsyncOperationFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.EngagementAsyncOperationable), nil +} +// Patch update the navigation property engagementAsyncOperations in employeeExperience +func (m *EngagementAsyncOperationsEngagementAsyncOperationItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.EngagementAsyncOperationable, requestConfiguration *EngagementAsyncOperationsEngagementAsyncOperationItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.EngagementAsyncOperationable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateEngagementAsyncOperationFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.EngagementAsyncOperationable), nil +} +// ToDeleteRequestInformation delete navigation property engagementAsyncOperations for employeeExperience +func (m *EngagementAsyncOperationsEngagementAsyncOperationItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *EngagementAsyncOperationsEngagementAsyncOperationItemRequestBuilderDeleteRequestConfiguration)(*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 an engagementAsyncOperation to track a long-running operation request. +func (m *EngagementAsyncOperationsEngagementAsyncOperationItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *EngagementAsyncOperationsEngagementAsyncOperationItemRequestBuilderGetRequestConfiguration)(*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 engagementAsyncOperations in employeeExperience +func (m *EngagementAsyncOperationsEngagementAsyncOperationItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.EngagementAsyncOperationable, requestConfiguration *EngagementAsyncOperationsEngagementAsyncOperationItemRequestBuilderPatchRequestConfiguration)(*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. +func (m *EngagementAsyncOperationsEngagementAsyncOperationItemRequestBuilder) WithUrl(rawUrl string)(*EngagementAsyncOperationsEngagementAsyncOperationItemRequestBuilder) { + return NewEngagementAsyncOperationsEngagementAsyncOperationItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/employeeexperience/engagement_async_operations_request_builder.go b/employeeexperience/engagement_async_operations_request_builder.go new file mode 100644 index 00000000000..44cc1f0e399 --- /dev/null +++ b/employeeexperience/engagement_async_operations_request_builder.go @@ -0,0 +1,145 @@ +package employeeexperience + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// EngagementAsyncOperationsRequestBuilder provides operations to manage the engagementAsyncOperations property of the microsoft.graph.employeeExperience entity. +type EngagementAsyncOperationsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// EngagementAsyncOperationsRequestBuilderGetQueryParameters get an engagementAsyncOperation to track a long-running operation request. +type EngagementAsyncOperationsRequestBuilderGetQueryParameters 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"` +} +// EngagementAsyncOperationsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type EngagementAsyncOperationsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *EngagementAsyncOperationsRequestBuilderGetQueryParameters +} +// EngagementAsyncOperationsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type EngagementAsyncOperationsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByEngagementAsyncOperationId provides operations to manage the engagementAsyncOperations property of the microsoft.graph.employeeExperience entity. +func (m *EngagementAsyncOperationsRequestBuilder) ByEngagementAsyncOperationId(engagementAsyncOperationId string)(*EngagementAsyncOperationsEngagementAsyncOperationItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if engagementAsyncOperationId != "" { + urlTplParams["engagementAsyncOperation%2Did"] = engagementAsyncOperationId + } + return NewEngagementAsyncOperationsEngagementAsyncOperationItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewEngagementAsyncOperationsRequestBuilderInternal instantiates a new EngagementAsyncOperationsRequestBuilder and sets the default values. +func NewEngagementAsyncOperationsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*EngagementAsyncOperationsRequestBuilder) { + m := &EngagementAsyncOperationsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/employeeExperience/engagementAsyncOperations{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewEngagementAsyncOperationsRequestBuilder instantiates a new EngagementAsyncOperationsRequestBuilder and sets the default values. +func NewEngagementAsyncOperationsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*EngagementAsyncOperationsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewEngagementAsyncOperationsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *EngagementAsyncOperationsRequestBuilder) Count()(*EngagementAsyncOperationsCountRequestBuilder) { + return NewEngagementAsyncOperationsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get get an engagementAsyncOperation to track a long-running operation request. +func (m *EngagementAsyncOperationsRequestBuilder) Get(ctx context.Context, requestConfiguration *EngagementAsyncOperationsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.EngagementAsyncOperationCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateEngagementAsyncOperationCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.EngagementAsyncOperationCollectionResponseable), nil +} +// Post create new navigation property to engagementAsyncOperations for employeeExperience +func (m *EngagementAsyncOperationsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.EngagementAsyncOperationable, requestConfiguration *EngagementAsyncOperationsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.EngagementAsyncOperationable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateEngagementAsyncOperationFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.EngagementAsyncOperationable), nil +} +// ToGetRequestInformation get an engagementAsyncOperation to track a long-running operation request. +func (m *EngagementAsyncOperationsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *EngagementAsyncOperationsRequestBuilderGetRequestConfiguration)(*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 engagementAsyncOperations for employeeExperience +func (m *EngagementAsyncOperationsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.EngagementAsyncOperationable, requestConfiguration *EngagementAsyncOperationsRequestBuilderPostRequestConfiguration)(*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. +func (m *EngagementAsyncOperationsRequestBuilder) WithUrl(rawUrl string)(*EngagementAsyncOperationsRequestBuilder) { + return NewEngagementAsyncOperationsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/external/industry_data_data_connectors_industry_data_connector_item_request_builder.go b/external/industry_data_data_connectors_industry_data_connector_item_request_builder.go index 127b622ad7b..c370db11f50 100644 --- a/external/industry_data_data_connectors_industry_data_connector_item_request_builder.go +++ b/external/industry_data_data_connectors_industry_data_connector_item_request_builder.go @@ -54,10 +54,10 @@ func NewIndustryDataDataConnectorsIndustryDataConnectorItemRequestBuilder(rawUrl urlParams["request-raw-url"] = rawUrl return NewIndustryDataDataConnectorsIndustryDataConnectorItemRequestBuilderInternal(urlParams, requestAdapter) } -// Delete delete an industryDataConnector object. +// Delete delete an azureDataLakeConnector object. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/industrydata-industrydataconnector-delete?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/industrydata-azuredatalakeconnector-delete?view=graph-rest-1.0 func (m *IndustryDataDataConnectorsIndustryDataConnectorItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *IndustryDataDataConnectorsIndustryDataConnectorItemRequestBuilderDeleteRequestConfiguration)(error) { requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); if err != nil { @@ -99,10 +99,10 @@ func (m *IndustryDataDataConnectorsIndustryDataConnectorItemRequestBuilder) Get( func (m *IndustryDataDataConnectorsIndustryDataConnectorItemRequestBuilder) MicrosoftGraphIndustryDataValidate()(*IndustryDataDataConnectorsItemMicrosoftGraphIndustryDataValidateRequestBuilder) { return NewIndustryDataDataConnectorsItemMicrosoftGraphIndustryDataValidateRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Patch update the properties of an industryDataConnector object. +// Patch update the properties of an azureDataLakeConnector object. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/industrydata-industrydataconnector-update?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/industrydata-azuredatalakeconnector-update?view=graph-rest-1.0 func (m *IndustryDataDataConnectorsIndustryDataConnectorItemRequestBuilder) Patch(ctx context.Context, body id2b46acaed365d10a0a4cc89e0aa6f2f76ad54e2147428aee709d25e554da66a.IndustryDataConnectorable, requestConfiguration *IndustryDataDataConnectorsIndustryDataConnectorItemRequestBuilderPatchRequestConfiguration)(id2b46acaed365d10a0a4cc89e0aa6f2f76ad54e2147428aee709d25e554da66a.IndustryDataConnectorable, error) { requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -125,7 +125,7 @@ func (m *IndustryDataDataConnectorsIndustryDataConnectorItemRequestBuilder) Patc func (m *IndustryDataDataConnectorsIndustryDataConnectorItemRequestBuilder) SourceSystem()(*IndustryDataDataConnectorsItemSourceSystemRequestBuilder) { return NewIndustryDataDataConnectorsItemSourceSystemRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// ToDeleteRequestInformation delete an industryDataConnector object. +// ToDeleteRequestInformation delete an azureDataLakeConnector object. func (m *IndustryDataDataConnectorsIndustryDataConnectorItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *IndustryDataDataConnectorsIndustryDataConnectorItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { @@ -148,7 +148,7 @@ func (m *IndustryDataDataConnectorsIndustryDataConnectorItemRequestBuilder) ToGe requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPatchRequestInformation update the properties of an industryDataConnector object. +// ToPatchRequestInformation update the properties of an azureDataLakeConnector object. func (m *IndustryDataDataConnectorsIndustryDataConnectorItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body id2b46acaed365d10a0a4cc89e0aa6f2f76ad54e2147428aee709d25e554da66a.IndustryDataConnectorable, requestConfiguration *IndustryDataDataConnectorsIndustryDataConnectorItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/external/industry_data_data_connectors_request_builder.go b/external/industry_data_data_connectors_request_builder.go index 86089bccffe..243dcd1e530 100644 --- a/external/industry_data_data_connectors_request_builder.go +++ b/external/industry_data_data_connectors_request_builder.go @@ -11,7 +11,7 @@ import ( type IndustryDataDataConnectorsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// IndustryDataDataConnectorsRequestBuilderGetQueryParameters get a list of the azureDataLakeConnector objects and their properties. +// IndustryDataDataConnectorsRequestBuilderGetQueryParameters get the industryDataConnector resources from the dataConnector navigation property. type IndustryDataDataConnectorsRequestBuilderGetQueryParameters struct { // Include count of items Count *bool `uriparametername:"%24count"` @@ -74,10 +74,10 @@ func NewIndustryDataDataConnectorsRequestBuilder(rawUrl string, requestAdapter i func (m *IndustryDataDataConnectorsRequestBuilder) Count()(*IndustryDataDataConnectorsCountRequestBuilder) { return NewIndustryDataDataConnectorsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Get get a list of the azureDataLakeConnector objects and their properties. +// Get get the industryDataConnector resources from the dataConnector navigation property. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/industrydata-azuredatalakeconnector-list?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/industrydata-industrydataconnector-list?view=graph-rest-1.0 func (m *IndustryDataDataConnectorsRequestBuilder) Get(ctx context.Context, requestConfiguration *IndustryDataDataConnectorsRequestBuilderGetRequestConfiguration)(id2b46acaed365d10a0a4cc89e0aa6f2f76ad54e2147428aee709d25e554da66a.IndustryDataConnectorCollectionResponseable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -118,7 +118,7 @@ func (m *IndustryDataDataConnectorsRequestBuilder) Post(ctx context.Context, bod } return res.(id2b46acaed365d10a0a4cc89e0aa6f2f76ad54e2147428aee709d25e554da66a.IndustryDataConnectorable), nil } -// ToGetRequestInformation get a list of the azureDataLakeConnector objects and their properties. +// ToGetRequestInformation get the industryDataConnector resources from the dataConnector navigation property. func (m *IndustryDataDataConnectorsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *IndustryDataDataConnectorsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/external/industry_data_inbound_flows_inbound_flow_item_request_builder.go b/external/industry_data_inbound_flows_inbound_flow_item_request_builder.go index 8e8944013f8..1124210ef68 100644 --- a/external/industry_data_inbound_flows_inbound_flow_item_request_builder.go +++ b/external/industry_data_inbound_flows_inbound_flow_item_request_builder.go @@ -18,7 +18,7 @@ type IndustryDataInboundFlowsInboundFlowItemRequestBuilderDeleteRequestConfigura // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// IndustryDataInboundFlowsInboundFlowItemRequestBuilderGetQueryParameters read the properties and relationships of an inboundFlow object. +// IndustryDataInboundFlowsInboundFlowItemRequestBuilderGetQueryParameters read the properties and relationships of an inboundFileFlow object. type IndustryDataInboundFlowsInboundFlowItemRequestBuilderGetQueryParameters struct { // Expand related entities Expand []string `uriparametername:"%24expand"` @@ -77,10 +77,10 @@ func (m *IndustryDataInboundFlowsInboundFlowItemRequestBuilder) Delete(ctx conte } return nil } -// Get read the properties and relationships of an inboundFlow object. +// Get read the properties and relationships of an inboundFileFlow object. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/industrydata-inboundflow-get?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/industrydata-inboundfileflow-get?view=graph-rest-1.0 func (m *IndustryDataInboundFlowsInboundFlowItemRequestBuilder) Get(ctx context.Context, requestConfiguration *IndustryDataInboundFlowsInboundFlowItemRequestBuilderGetRequestConfiguration)(id2b46acaed365d10a0a4cc89e0aa6f2f76ad54e2147428aee709d25e554da66a.InboundFlowable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -131,7 +131,7 @@ func (m *IndustryDataInboundFlowsInboundFlowItemRequestBuilder) ToDeleteRequestI requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToGetRequestInformation read the properties and relationships of an inboundFlow object. +// ToGetRequestInformation read the properties and relationships of an inboundFileFlow object. func (m *IndustryDataInboundFlowsInboundFlowItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *IndustryDataInboundFlowsInboundFlowItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/graph_request_adapter.go b/graph_request_adapter.go index bc79f8fbdd4..97400273594 100644 --- a/graph_request_adapter.go +++ b/graph_request_adapter.go @@ -10,7 +10,7 @@ import ( var clientOptions = core.GraphClientOptions{ GraphServiceVersion: "beta", - GraphServiceLibraryVersion: "0.88.0", + GraphServiceLibraryVersion: "0.89.0", } // GetDefaultClientOptions returns the default client options used by the GraphRequestAdapterBase and the middleware. @@ -76,3 +76,4 @@ func NewGraphRequestAdapterWithParseNodeFactoryAndSerializationWriterFactoryAndH + diff --git a/groups/item_calendar_calendar_view_item_attachments_request_builder.go b/groups/item_calendar_calendar_view_item_attachments_request_builder.go index ba453de6a3f..815ed56ef12 100644 --- a/groups/item_calendar_calendar_view_item_attachments_request_builder.go +++ b/groups/item_calendar_calendar_view_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarCalendarViewItemAttachmentsRequestBuilder) Get(ctx context. } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarCalendarViewItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarCalendarViewItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -133,7 +133,7 @@ func (m *ItemCalendarCalendarViewItemAttachmentsRequestBuilder) ToGetRequestInfo requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemCalendarCalendarViewItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarCalendarViewItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/groups/item_calendar_calendar_view_item_exception_occurrences_item_attachments_request_builder.go b/groups/item_calendar_calendar_view_item_exception_occurrences_item_attachments_request_builder.go index d94c5609458..b297a856df7 100644 --- a/groups/item_calendar_calendar_view_item_exception_occurrences_item_attachments_request_builder.go +++ b/groups/item_calendar_calendar_view_item_exception_occurrences_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarCalendarViewItemExceptionOccurrencesItemAttachmentsRequestB } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarCalendarViewItemExceptionOccurrencesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarCalendarViewItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -133,7 +133,7 @@ func (m *ItemCalendarCalendarViewItemExceptionOccurrencesItemAttachmentsRequestB requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemCalendarCalendarViewItemExceptionOccurrencesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarCalendarViewItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/groups/item_calendar_calendar_view_item_exception_occurrences_item_instances_item_attachments_request_builder.go b/groups/item_calendar_calendar_view_item_exception_occurrences_item_instances_item_attachments_request_builder.go index 2639c69f2a4..b0cbc023d19 100644 --- a/groups/item_calendar_calendar_view_item_exception_occurrences_item_instances_item_attachments_request_builder.go +++ b/groups/item_calendar_calendar_view_item_exception_occurrences_item_instances_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarCalendarViewItemExceptionOccurrencesItemInstancesItemAttach } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarCalendarViewItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarCalendarViewItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -133,7 +133,7 @@ func (m *ItemCalendarCalendarViewItemExceptionOccurrencesItemInstancesItemAttach requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemCalendarCalendarViewItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarCalendarViewItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/groups/item_calendar_calendar_view_item_instances_item_attachments_request_builder.go b/groups/item_calendar_calendar_view_item_instances_item_attachments_request_builder.go index 643e733e981..afe00d29f7e 100644 --- a/groups/item_calendar_calendar_view_item_instances_item_attachments_request_builder.go +++ b/groups/item_calendar_calendar_view_item_instances_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarCalendarViewItemInstancesItemAttachmentsRequestBuilder) Get } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarCalendarViewItemInstancesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarCalendarViewItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -133,7 +133,7 @@ func (m *ItemCalendarCalendarViewItemInstancesItemAttachmentsRequestBuilder) ToG requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemCalendarCalendarViewItemInstancesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarCalendarViewItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/groups/item_calendar_calendar_view_item_instances_item_exception_occurrences_item_attachments_request_builder.go b/groups/item_calendar_calendar_view_item_instances_item_exception_occurrences_item_attachments_request_builder.go index 0743b5abe4f..0f934637379 100644 --- a/groups/item_calendar_calendar_view_item_instances_item_exception_occurrences_item_attachments_request_builder.go +++ b/groups/item_calendar_calendar_view_item_instances_item_exception_occurrences_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarCalendarViewItemInstancesItemExceptionOccurrencesItemAttach } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarCalendarViewItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarCalendarViewItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -133,7 +133,7 @@ func (m *ItemCalendarCalendarViewItemInstancesItemExceptionOccurrencesItemAttach requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemCalendarCalendarViewItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarCalendarViewItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/groups/item_calendar_events_item_attachments_request_builder.go b/groups/item_calendar_events_item_attachments_request_builder.go index 2ed33c50383..d8f9acd4c48 100644 --- a/groups/item_calendar_events_item_attachments_request_builder.go +++ b/groups/item_calendar_events_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarEventsItemAttachmentsRequestBuilder) Get(ctx context.Contex } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarEventsItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarEventsItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -133,7 +133,7 @@ func (m *ItemCalendarEventsItemAttachmentsRequestBuilder) ToGetRequestInformatio requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemCalendarEventsItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarEventsItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/groups/item_calendar_events_item_exception_occurrences_item_attachments_request_builder.go b/groups/item_calendar_events_item_exception_occurrences_item_attachments_request_builder.go index 6a8032baea5..a8bbc686755 100644 --- a/groups/item_calendar_events_item_exception_occurrences_item_attachments_request_builder.go +++ b/groups/item_calendar_events_item_exception_occurrences_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarEventsItemExceptionOccurrencesItemAttachmentsRequestBuilder } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarEventsItemExceptionOccurrencesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarEventsItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -133,7 +133,7 @@ func (m *ItemCalendarEventsItemExceptionOccurrencesItemAttachmentsRequestBuilder requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemCalendarEventsItemExceptionOccurrencesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarEventsItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/groups/item_calendar_events_item_exception_occurrences_item_instances_item_attachments_request_builder.go b/groups/item_calendar_events_item_exception_occurrences_item_instances_item_attachments_request_builder.go index a79ba3b651e..0495aa9919c 100644 --- a/groups/item_calendar_events_item_exception_occurrences_item_instances_item_attachments_request_builder.go +++ b/groups/item_calendar_events_item_exception_occurrences_item_instances_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarEventsItemExceptionOccurrencesItemInstancesItemAttachmentsR } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarEventsItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarEventsItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -133,7 +133,7 @@ func (m *ItemCalendarEventsItemExceptionOccurrencesItemInstancesItemAttachmentsR requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemCalendarEventsItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarEventsItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/groups/item_calendar_events_item_instances_item_attachments_request_builder.go b/groups/item_calendar_events_item_instances_item_attachments_request_builder.go index 7729553a92f..8c40e3efafa 100644 --- a/groups/item_calendar_events_item_instances_item_attachments_request_builder.go +++ b/groups/item_calendar_events_item_instances_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarEventsItemInstancesItemAttachmentsRequestBuilder) Get(ctx c } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarEventsItemInstancesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarEventsItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -133,7 +133,7 @@ func (m *ItemCalendarEventsItemInstancesItemAttachmentsRequestBuilder) ToGetRequ requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemCalendarEventsItemInstancesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarEventsItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/groups/item_calendar_events_item_instances_item_exception_occurrences_item_attachments_request_builder.go b/groups/item_calendar_events_item_instances_item_exception_occurrences_item_attachments_request_builder.go index b5d7180a582..281f2a71cf6 100644 --- a/groups/item_calendar_events_item_instances_item_exception_occurrences_item_attachments_request_builder.go +++ b/groups/item_calendar_events_item_instances_item_exception_occurrences_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarEventsItemInstancesItemExceptionOccurrencesItemAttachmentsR } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarEventsItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarEventsItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -133,7 +133,7 @@ func (m *ItemCalendarEventsItemInstancesItemExceptionOccurrencesItemAttachmentsR requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemCalendarEventsItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarEventsItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/groups/item_calendar_view_item_attachments_request_builder.go b/groups/item_calendar_view_item_attachments_request_builder.go index ba51c365376..c9434122f47 100644 --- a/groups/item_calendar_view_item_attachments_request_builder.go +++ b/groups/item_calendar_view_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarViewItemAttachmentsRequestBuilder) Get(ctx context.Context, } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarViewItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarViewItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -133,7 +133,7 @@ func (m *ItemCalendarViewItemAttachmentsRequestBuilder) ToGetRequestInformation( requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemCalendarViewItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarViewItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/groups/item_calendar_view_item_exception_occurrences_item_attachments_request_builder.go b/groups/item_calendar_view_item_exception_occurrences_item_attachments_request_builder.go index e18a0c3d7fd..a3f56ed4ea5 100644 --- a/groups/item_calendar_view_item_exception_occurrences_item_attachments_request_builder.go +++ b/groups/item_calendar_view_item_exception_occurrences_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarViewItemExceptionOccurrencesItemAttachmentsRequestBuilder) } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarViewItemExceptionOccurrencesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarViewItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -133,7 +133,7 @@ func (m *ItemCalendarViewItemExceptionOccurrencesItemAttachmentsRequestBuilder) requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemCalendarViewItemExceptionOccurrencesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarViewItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/groups/item_calendar_view_item_exception_occurrences_item_instances_item_attachments_request_builder.go b/groups/item_calendar_view_item_exception_occurrences_item_instances_item_attachments_request_builder.go index 21426a46f68..35b39de05a3 100644 --- a/groups/item_calendar_view_item_exception_occurrences_item_instances_item_attachments_request_builder.go +++ b/groups/item_calendar_view_item_exception_occurrences_item_instances_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarViewItemExceptionOccurrencesItemInstancesItemAttachmentsReq } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarViewItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarViewItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -133,7 +133,7 @@ func (m *ItemCalendarViewItemExceptionOccurrencesItemInstancesItemAttachmentsReq requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemCalendarViewItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarViewItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/groups/item_calendar_view_item_instances_item_attachments_request_builder.go b/groups/item_calendar_view_item_instances_item_attachments_request_builder.go index 143f854fc1e..a78a46fd551 100644 --- a/groups/item_calendar_view_item_instances_item_attachments_request_builder.go +++ b/groups/item_calendar_view_item_instances_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarViewItemInstancesItemAttachmentsRequestBuilder) Get(ctx con } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarViewItemInstancesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarViewItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -133,7 +133,7 @@ func (m *ItemCalendarViewItemInstancesItemAttachmentsRequestBuilder) ToGetReques requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemCalendarViewItemInstancesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarViewItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/groups/item_calendar_view_item_instances_item_exception_occurrences_item_attachments_request_builder.go b/groups/item_calendar_view_item_instances_item_exception_occurrences_item_attachments_request_builder.go index b233a206a57..921adc99cfc 100644 --- a/groups/item_calendar_view_item_instances_item_exception_occurrences_item_attachments_request_builder.go +++ b/groups/item_calendar_view_item_instances_item_exception_occurrences_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarViewItemInstancesItemExceptionOccurrencesItemAttachmentsReq } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarViewItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarViewItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -133,7 +133,7 @@ func (m *ItemCalendarViewItemInstancesItemExceptionOccurrencesItemAttachmentsReq requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemCalendarViewItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarViewItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/groups/item_conversations_conversation_item_request_builder.go b/groups/item_conversations_conversation_item_request_builder.go index 1fe42a4ef57..ef14234872d 100644 --- a/groups/item_conversations_conversation_item_request_builder.go +++ b/groups/item_conversations_conversation_item_request_builder.go @@ -18,7 +18,7 @@ type ItemConversationsConversationItemRequestBuilderDeleteRequestConfiguration s // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// ItemConversationsConversationItemRequestBuilderGetQueryParameters get a conversation object. +// ItemConversationsConversationItemRequestBuilderGetQueryParameters retrieve the properties and relationships of conversation object. type ItemConversationsConversationItemRequestBuilderGetQueryParameters struct { // Select properties to be returned Select []string `uriparametername:"%24select"` @@ -64,10 +64,10 @@ func (m *ItemConversationsConversationItemRequestBuilder) Delete(ctx context.Con } return nil } -// Get get a conversation object. +// Get retrieve the properties and relationships of conversation object. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/group-get-conversation?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/conversation-get?view=graph-rest-1.0 func (m *ItemConversationsConversationItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemConversationsConversationItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Conversationable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -100,7 +100,7 @@ func (m *ItemConversationsConversationItemRequestBuilder) ToDeleteRequestInforma requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToGetRequestInformation get a conversation object. +// ToGetRequestInformation retrieve the properties and relationships of conversation object. func (m *ItemConversationsConversationItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemConversationsConversationItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/groups/item_conversations_request_builder.go b/groups/item_conversations_request_builder.go index b0032ede677..e043e40451e 100644 --- a/groups/item_conversations_request_builder.go +++ b/groups/item_conversations_request_builder.go @@ -94,10 +94,10 @@ func (m *ItemConversationsRequestBuilder) Get(ctx context.Context, requestConfig } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationCollectionResponseable), nil } -// Post create 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 create a new conversation by including a thread and a post. Use reply thread or reply post to further post to that conversation. // [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/group-post-conversations?view=graph-rest-1.0 func (m *ItemConversationsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Conversationable, requestConfiguration *ItemConversationsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Conversationable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -129,7 +129,7 @@ func (m *ItemConversationsRequestBuilder) ToGetRequestInformation(ctx context.Co requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, 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 create a new conversation by including a thread and a post. Use reply thread or reply post to further post to that conversation. func (m *ItemConversationsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Conversationable, requestConfiguration *ItemConversationsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/groups/item_events_item_attachments_request_builder.go b/groups/item_events_item_attachments_request_builder.go index d0f9cbd0c3d..27cabfded8f 100644 --- a/groups/item_events_item_attachments_request_builder.go +++ b/groups/item_events_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemEventsItemAttachmentsRequestBuilder) Get(ctx context.Context, reque } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemEventsItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemEventsItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -133,7 +133,7 @@ func (m *ItemEventsItemAttachmentsRequestBuilder) ToGetRequestInformation(ctx co requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemEventsItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemEventsItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/groups/item_events_item_exception_occurrences_item_attachments_request_builder.go b/groups/item_events_item_exception_occurrences_item_attachments_request_builder.go index a0a4d333025..3a3fbb45f52 100644 --- a/groups/item_events_item_exception_occurrences_item_attachments_request_builder.go +++ b/groups/item_events_item_exception_occurrences_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemEventsItemExceptionOccurrencesItemAttachmentsRequestBuilder) Get(ct } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemEventsItemExceptionOccurrencesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemEventsItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -133,7 +133,7 @@ func (m *ItemEventsItemExceptionOccurrencesItemAttachmentsRequestBuilder) ToGetR requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemEventsItemExceptionOccurrencesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemEventsItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/groups/item_events_item_exception_occurrences_item_instances_item_attachments_request_builder.go b/groups/item_events_item_exception_occurrences_item_instances_item_attachments_request_builder.go index 0236da9f5be..9e2c8e30065 100644 --- a/groups/item_events_item_exception_occurrences_item_instances_item_attachments_request_builder.go +++ b/groups/item_events_item_exception_occurrences_item_instances_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemEventsItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBu } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemEventsItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemEventsItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -133,7 +133,7 @@ func (m *ItemEventsItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBu requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemEventsItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemEventsItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/groups/item_events_item_instances_item_attachments_request_builder.go b/groups/item_events_item_instances_item_attachments_request_builder.go index db5898e46d1..b04d075d90c 100644 --- a/groups/item_events_item_instances_item_attachments_request_builder.go +++ b/groups/item_events_item_instances_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemEventsItemInstancesItemAttachmentsRequestBuilder) Get(ctx context.C } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemEventsItemInstancesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemEventsItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -133,7 +133,7 @@ func (m *ItemEventsItemInstancesItemAttachmentsRequestBuilder) ToGetRequestInfor requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemEventsItemInstancesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemEventsItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/groups/item_events_item_instances_item_exception_occurrences_item_attachments_request_builder.go b/groups/item_events_item_instances_item_exception_occurrences_item_attachments_request_builder.go index 82eb65d8f23..4b845a1faab 100644 --- a/groups/item_events_item_instances_item_exception_occurrences_item_attachments_request_builder.go +++ b/groups/item_events_item_instances_item_exception_occurrences_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemEventsItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBu } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemEventsItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemEventsItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -133,7 +133,7 @@ func (m *ItemEventsItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBu requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemEventsItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemEventsItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/groups/item_planner_plans_item_archive_post_request_body.go b/groups/item_planner_plans_item_archive_post_request_body.go new file mode 100644 index 00000000000..fda56dd08f7 --- /dev/null +++ b/groups/item_planner_plans_item_archive_post_request_body.go @@ -0,0 +1,110 @@ +package groups + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +// ItemPlannerPlansItemArchivePostRequestBody +type ItemPlannerPlansItemArchivePostRequestBody struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewItemPlannerPlansItemArchivePostRequestBody instantiates a new ItemPlannerPlansItemArchivePostRequestBody and sets the default values. +func NewItemPlannerPlansItemArchivePostRequestBody()(*ItemPlannerPlansItemArchivePostRequestBody) { + m := &ItemPlannerPlansItemArchivePostRequestBody{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemPlannerPlansItemArchivePostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateItemPlannerPlansItemArchivePostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemPlannerPlansItemArchivePostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemPlannerPlansItemArchivePostRequestBody) GetAdditionalData()(map[string]any) { + val , err := m.backingStore.Get("additionalData") + if err != nil { + panic(err) + } + if val == nil { + var value = make(map[string]any); + m.SetAdditionalData(value); + } + return val.(map[string]any) +} +// GetBackingStore gets the BackingStore property value. Stores model information. +func (m *ItemPlannerPlansItemArchivePostRequestBody) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ItemPlannerPlansItemArchivePostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["justification"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetJustification(val) + } + return nil + } + return res +} +// GetJustification gets the justification property value. The justification property +func (m *ItemPlannerPlansItemArchivePostRequestBody) GetJustification()(*string) { + val, err := m.GetBackingStore().Get("justification") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// Serialize serializes information the current object +func (m *ItemPlannerPlansItemArchivePostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("justification", m.GetJustification()) + 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 *ItemPlannerPlansItemArchivePostRequestBody) 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 *ItemPlannerPlansItemArchivePostRequestBody) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetJustification sets the justification property value. The justification property +func (m *ItemPlannerPlansItemArchivePostRequestBody) SetJustification(value *string)() { + err := m.GetBackingStore().Set("justification", value) + if err != nil { + panic(err) + } +} +// ItemPlannerPlansItemArchivePostRequestBodyable +type ItemPlannerPlansItemArchivePostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetJustification()(*string) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetJustification(value *string)() +} diff --git a/groups/item_planner_plans_item_archive_request_builder.go b/groups/item_planner_plans_item_archive_request_builder.go new file mode 100644 index 00000000000..950b97391c1 --- /dev/null +++ b/groups/item_planner_plans_item_archive_request_builder.go @@ -0,0 +1,66 @@ +package groups + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemPlannerPlansItemArchiveRequestBuilder provides operations to call the archive method. +type ItemPlannerPlansItemArchiveRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemPlannerPlansItemArchiveRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemPlannerPlansItemArchiveRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewItemPlannerPlansItemArchiveRequestBuilderInternal instantiates a new ArchiveRequestBuilder and sets the default values. +func NewItemPlannerPlansItemArchiveRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPlannerPlansItemArchiveRequestBuilder) { + m := &ItemPlannerPlansItemArchiveRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{group%2Did}/planner/plans/{plannerPlan%2Did}/archive", pathParameters), + } + return m +} +// NewItemPlannerPlansItemArchiveRequestBuilder instantiates a new ArchiveRequestBuilder and sets the default values. +func NewItemPlannerPlansItemArchiveRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPlannerPlansItemArchiveRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemPlannerPlansItemArchiveRequestBuilderInternal(urlParams, requestAdapter) +} +// Post invoke action archive +func (m *ItemPlannerPlansItemArchiveRequestBuilder) Post(ctx context.Context, body ItemPlannerPlansItemArchivePostRequestBodyable, requestConfiguration *ItemPlannerPlansItemArchiveRequestBuilderPostRequestConfiguration)(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation invoke action archive +func (m *ItemPlannerPlansItemArchiveRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemPlannerPlansItemArchivePostRequestBodyable, requestConfiguration *ItemPlannerPlansItemArchiveRequestBuilderPostRequestConfiguration)(*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. +func (m *ItemPlannerPlansItemArchiveRequestBuilder) WithUrl(rawUrl string)(*ItemPlannerPlansItemArchiveRequestBuilder) { + return NewItemPlannerPlansItemArchiveRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/groups/item_planner_plans_item_unarchive_post_request_body.go b/groups/item_planner_plans_item_unarchive_post_request_body.go new file mode 100644 index 00000000000..675880fa5e2 --- /dev/null +++ b/groups/item_planner_plans_item_unarchive_post_request_body.go @@ -0,0 +1,110 @@ +package groups + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +// ItemPlannerPlansItemUnarchivePostRequestBody +type ItemPlannerPlansItemUnarchivePostRequestBody struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewItemPlannerPlansItemUnarchivePostRequestBody instantiates a new ItemPlannerPlansItemUnarchivePostRequestBody and sets the default values. +func NewItemPlannerPlansItemUnarchivePostRequestBody()(*ItemPlannerPlansItemUnarchivePostRequestBody) { + m := &ItemPlannerPlansItemUnarchivePostRequestBody{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemPlannerPlansItemUnarchivePostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateItemPlannerPlansItemUnarchivePostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemPlannerPlansItemUnarchivePostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemPlannerPlansItemUnarchivePostRequestBody) GetAdditionalData()(map[string]any) { + val , err := m.backingStore.Get("additionalData") + if err != nil { + panic(err) + } + if val == nil { + var value = make(map[string]any); + m.SetAdditionalData(value); + } + return val.(map[string]any) +} +// GetBackingStore gets the BackingStore property value. Stores model information. +func (m *ItemPlannerPlansItemUnarchivePostRequestBody) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ItemPlannerPlansItemUnarchivePostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["justification"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetJustification(val) + } + return nil + } + return res +} +// GetJustification gets the justification property value. The justification property +func (m *ItemPlannerPlansItemUnarchivePostRequestBody) GetJustification()(*string) { + val, err := m.GetBackingStore().Get("justification") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// Serialize serializes information the current object +func (m *ItemPlannerPlansItemUnarchivePostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("justification", m.GetJustification()) + 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 *ItemPlannerPlansItemUnarchivePostRequestBody) 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 *ItemPlannerPlansItemUnarchivePostRequestBody) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetJustification sets the justification property value. The justification property +func (m *ItemPlannerPlansItemUnarchivePostRequestBody) SetJustification(value *string)() { + err := m.GetBackingStore().Set("justification", value) + if err != nil { + panic(err) + } +} +// ItemPlannerPlansItemUnarchivePostRequestBodyable +type ItemPlannerPlansItemUnarchivePostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetJustification()(*string) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetJustification(value *string)() +} diff --git a/groups/item_planner_plans_item_unarchive_request_builder.go b/groups/item_planner_plans_item_unarchive_request_builder.go new file mode 100644 index 00000000000..f2638d3d608 --- /dev/null +++ b/groups/item_planner_plans_item_unarchive_request_builder.go @@ -0,0 +1,66 @@ +package groups + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemPlannerPlansItemUnarchiveRequestBuilder provides operations to call the unarchive method. +type ItemPlannerPlansItemUnarchiveRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemPlannerPlansItemUnarchiveRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemPlannerPlansItemUnarchiveRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewItemPlannerPlansItemUnarchiveRequestBuilderInternal instantiates a new UnarchiveRequestBuilder and sets the default values. +func NewItemPlannerPlansItemUnarchiveRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPlannerPlansItemUnarchiveRequestBuilder) { + m := &ItemPlannerPlansItemUnarchiveRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{group%2Did}/planner/plans/{plannerPlan%2Did}/unarchive", pathParameters), + } + return m +} +// NewItemPlannerPlansItemUnarchiveRequestBuilder instantiates a new UnarchiveRequestBuilder and sets the default values. +func NewItemPlannerPlansItemUnarchiveRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPlannerPlansItemUnarchiveRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemPlannerPlansItemUnarchiveRequestBuilderInternal(urlParams, requestAdapter) +} +// Post invoke action unarchive +func (m *ItemPlannerPlansItemUnarchiveRequestBuilder) Post(ctx context.Context, body ItemPlannerPlansItemUnarchivePostRequestBodyable, requestConfiguration *ItemPlannerPlansItemUnarchiveRequestBuilderPostRequestConfiguration)(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation invoke action unarchive +func (m *ItemPlannerPlansItemUnarchiveRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemPlannerPlansItemUnarchivePostRequestBodyable, requestConfiguration *ItemPlannerPlansItemUnarchiveRequestBuilderPostRequestConfiguration)(*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. +func (m *ItemPlannerPlansItemUnarchiveRequestBuilder) WithUrl(rawUrl string)(*ItemPlannerPlansItemUnarchiveRequestBuilder) { + return NewItemPlannerPlansItemUnarchiveRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/groups/item_planner_plans_planner_plan_item_request_builder.go b/groups/item_planner_plans_planner_plan_item_request_builder.go index e31fcd87c00..8862222672c 100644 --- a/groups/item_planner_plans_planner_plan_item_request_builder.go +++ b/groups/item_planner_plans_planner_plan_item_request_builder.go @@ -41,6 +41,10 @@ type ItemPlannerPlansPlannerPlanItemRequestBuilderPatchRequestConfiguration stru // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } +// Archive provides operations to call the archive method. +func (m *ItemPlannerPlansPlannerPlanItemRequestBuilder) Archive()(*ItemPlannerPlansItemArchiveRequestBuilder) { + return NewItemPlannerPlansItemArchiveRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // Buckets provides operations to manage the buckets property of the microsoft.graph.plannerPlan entity. func (m *ItemPlannerPlansPlannerPlanItemRequestBuilder) Buckets()(*ItemPlannerPlansItemBucketsRequestBuilder) { return NewItemPlannerPlansItemBucketsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) @@ -161,6 +165,10 @@ func (m *ItemPlannerPlansPlannerPlanItemRequestBuilder) ToPatchRequestInformatio } return requestInfo, nil } +// Unarchive provides operations to call the unarchive method. +func (m *ItemPlannerPlansPlannerPlanItemRequestBuilder) Unarchive()(*ItemPlannerPlansItemUnarchiveRequestBuilder) { + return NewItemPlannerPlansItemUnarchiveRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. func (m *ItemPlannerPlansPlannerPlanItemRequestBuilder) WithUrl(rawUrl string)(*ItemPlannerPlansPlannerPlanItemRequestBuilder) { return NewItemPlannerPlansPlannerPlanItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); diff --git a/groups/item_sites_item_lists_item_items_item_create_link_post_request_body.go b/groups/item_sites_item_lists_item_items_item_create_link_post_request_body.go index c47fad4354a..9c8d6a62e52 100644 --- a/groups/item_sites_item_lists_item_items_item_create_link_post_request_body.go +++ b/groups/item_sites_item_lists_item_items_item_create_link_post_request_body.go @@ -64,6 +64,16 @@ func (m *ItemSitesItemListsItemItemsItemCreateLinkPostRequestBody) GetFieldDeser } return nil } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } res["password"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -132,6 +142,17 @@ func (m *ItemSitesItemListsItemItemsItemCreateLinkPostRequestBody) GetFieldDeser } return res } +// GetMessage gets the message property value. The message property +func (m *ItemSitesItemListsItemItemsItemCreateLinkPostRequestBody) GetMessage()(*string) { + val, err := m.GetBackingStore().Get("message") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} // GetPassword gets the password property value. The password property func (m *ItemSitesItemListsItemItemsItemCreateLinkPostRequestBody) GetPassword()(*string) { val, err := m.GetBackingStore().Get("password") @@ -206,6 +227,12 @@ func (m *ItemSitesItemListsItemItemsItemCreateLinkPostRequestBody) Serialize(wri return err } } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } { err := writer.WriteStringValue("password", m.GetPassword()) if err != nil { @@ -274,6 +301,13 @@ func (m *ItemSitesItemListsItemItemsItemCreateLinkPostRequestBody) SetExpiration panic(err) } } +// SetMessage sets the message property value. The message property +func (m *ItemSitesItemListsItemItemsItemCreateLinkPostRequestBody) SetMessage(value *string)() { + err := m.GetBackingStore().Set("message", value) + if err != nil { + panic(err) + } +} // SetPassword sets the password property value. The password property func (m *ItemSitesItemListsItemItemsItemCreateLinkPostRequestBody) SetPassword(value *string)() { err := m.GetBackingStore().Set("password", value) @@ -323,6 +357,7 @@ type ItemSitesItemListsItemItemsItemCreateLinkPostRequestBodyable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) GetExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetMessage()(*string) GetPassword()(*string) GetRecipients()([]ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DriveRecipientable) GetRetainInheritedPermissions()(*bool) @@ -331,6 +366,7 @@ type ItemSitesItemListsItemItemsItemCreateLinkPostRequestBodyable interface { GetTypeEscaped()(*string) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() SetExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetMessage(value *string)() SetPassword(value *string)() SetRecipients(value []ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DriveRecipientable)() SetRetainInheritedPermissions(value *bool)() diff --git a/groups/item_sites_item_lists_list_item_request_builder.go b/groups/item_sites_item_lists_list_item_request_builder.go index 1a70a0cb846..7de92260972 100644 --- a/groups/item_sites_item_lists_list_item_request_builder.go +++ b/groups/item_sites_item_lists_list_item_request_builder.go @@ -18,7 +18,7 @@ type ItemSitesItemListsListItemRequestBuilderDeleteRequestConfiguration struct { // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// ItemSitesItemListsListItemRequestBuilderGetQueryParameters get the list of richLongRunningOperations associated with a list. +// ItemSitesItemListsListItemRequestBuilderGetQueryParameters return the metadata for a [list][]. type ItemSitesItemListsListItemRequestBuilderGetQueryParameters struct { // Expand related entities Expand []string `uriparametername:"%24expand"` @@ -90,10 +90,10 @@ func (m *ItemSitesItemListsListItemRequestBuilder) Delete(ctx context.Context, r func (m *ItemSitesItemListsListItemRequestBuilder) Drive()(*ItemSitesItemListsItemDriveRequestBuilder) { return NewItemSitesItemListsItemDriveRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Get get the list of richLongRunningOperations associated with a list. +// Get return the metadata for a [list][]. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/list-list-operations?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/list-get?view=graph-rest-1.0 func (m *ItemSitesItemListsListItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemSitesItemListsListItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Listable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -157,7 +157,7 @@ func (m *ItemSitesItemListsListItemRequestBuilder) ToDeleteRequestInformation(ct requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToGetRequestInformation get the list of richLongRunningOperations associated with a list. +// ToGetRequestInformation return the metadata for a [list][]. func (m *ItemSitesItemListsListItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemSitesItemListsListItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/groups/item_team_channels_channel_item_request_builder.go b/groups/item_team_channels_channel_item_request_builder.go index 74aad6f824d..3dc23334635 100644 --- a/groups/item_team_channels_channel_item_request_builder.go +++ b/groups/item_team_channels_channel_item_request_builder.go @@ -41,6 +41,10 @@ type ItemTeamChannelsChannelItemRequestBuilderPatchRequestConfiguration struct { // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } +// Archive provides operations to call the archive method. +func (m *ItemTeamChannelsChannelItemRequestBuilder) Archive()(*ItemTeamChannelsItemArchiveRequestBuilder) { + return NewItemTeamChannelsItemArchiveRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // CompleteMigration provides operations to call the completeMigration method. func (m *ItemTeamChannelsChannelItemRequestBuilder) CompleteMigration()(*ItemTeamChannelsItemCompleteMigrationRequestBuilder) { return NewItemTeamChannelsItemCompleteMigrationRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) @@ -190,6 +194,10 @@ func (m *ItemTeamChannelsChannelItemRequestBuilder) ToPatchRequestInformation(ct } return requestInfo, nil } +// Unarchive provides operations to call the unarchive method. +func (m *ItemTeamChannelsChannelItemRequestBuilder) Unarchive()(*ItemTeamChannelsItemUnarchiveRequestBuilder) { + return NewItemTeamChannelsItemUnarchiveRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. func (m *ItemTeamChannelsChannelItemRequestBuilder) WithUrl(rawUrl string)(*ItemTeamChannelsChannelItemRequestBuilder) { return NewItemTeamChannelsChannelItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); diff --git a/groups/item_team_channels_item_archive_post_request_body.go b/groups/item_team_channels_item_archive_post_request_body.go new file mode 100644 index 00000000000..5fe907dc8fd --- /dev/null +++ b/groups/item_team_channels_item_archive_post_request_body.go @@ -0,0 +1,110 @@ +package groups + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +// ItemTeamChannelsItemArchivePostRequestBody +type ItemTeamChannelsItemArchivePostRequestBody struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewItemTeamChannelsItemArchivePostRequestBody instantiates a new ItemTeamChannelsItemArchivePostRequestBody and sets the default values. +func NewItemTeamChannelsItemArchivePostRequestBody()(*ItemTeamChannelsItemArchivePostRequestBody) { + m := &ItemTeamChannelsItemArchivePostRequestBody{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemTeamChannelsItemArchivePostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateItemTeamChannelsItemArchivePostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemTeamChannelsItemArchivePostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemTeamChannelsItemArchivePostRequestBody) GetAdditionalData()(map[string]any) { + val , err := m.backingStore.Get("additionalData") + if err != nil { + panic(err) + } + if val == nil { + var value = make(map[string]any); + m.SetAdditionalData(value); + } + return val.(map[string]any) +} +// GetBackingStore gets the BackingStore property value. Stores model information. +func (m *ItemTeamChannelsItemArchivePostRequestBody) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ItemTeamChannelsItemArchivePostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["shouldSetSpoSiteReadOnlyForMembers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetShouldSetSpoSiteReadOnlyForMembers(val) + } + return nil + } + return res +} +// GetShouldSetSpoSiteReadOnlyForMembers gets the shouldSetSpoSiteReadOnlyForMembers property value. The shouldSetSpoSiteReadOnlyForMembers property +func (m *ItemTeamChannelsItemArchivePostRequestBody) GetShouldSetSpoSiteReadOnlyForMembers()(*bool) { + val, err := m.GetBackingStore().Get("shouldSetSpoSiteReadOnlyForMembers") + if err != nil { + panic(err) + } + if val != nil { + return val.(*bool) + } + return nil +} +// Serialize serializes information the current object +func (m *ItemTeamChannelsItemArchivePostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("shouldSetSpoSiteReadOnlyForMembers", m.GetShouldSetSpoSiteReadOnlyForMembers()) + 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 *ItemTeamChannelsItemArchivePostRequestBody) 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 *ItemTeamChannelsItemArchivePostRequestBody) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetShouldSetSpoSiteReadOnlyForMembers sets the shouldSetSpoSiteReadOnlyForMembers property value. The shouldSetSpoSiteReadOnlyForMembers property +func (m *ItemTeamChannelsItemArchivePostRequestBody) SetShouldSetSpoSiteReadOnlyForMembers(value *bool)() { + err := m.GetBackingStore().Set("shouldSetSpoSiteReadOnlyForMembers", value) + if err != nil { + panic(err) + } +} +// ItemTeamChannelsItemArchivePostRequestBodyable +type ItemTeamChannelsItemArchivePostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetShouldSetSpoSiteReadOnlyForMembers()(*bool) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetShouldSetSpoSiteReadOnlyForMembers(value *bool)() +} diff --git a/groups/item_team_channels_item_archive_request_builder.go b/groups/item_team_channels_item_archive_request_builder.go new file mode 100644 index 00000000000..934ede2a82a --- /dev/null +++ b/groups/item_team_channels_item_archive_request_builder.go @@ -0,0 +1,66 @@ +package groups + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemTeamChannelsItemArchiveRequestBuilder provides operations to call the archive method. +type ItemTeamChannelsItemArchiveRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemTeamChannelsItemArchiveRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemTeamChannelsItemArchiveRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewItemTeamChannelsItemArchiveRequestBuilderInternal instantiates a new ArchiveRequestBuilder and sets the default values. +func NewItemTeamChannelsItemArchiveRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamChannelsItemArchiveRequestBuilder) { + m := &ItemTeamChannelsItemArchiveRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{group%2Did}/team/channels/{channel%2Did}/archive", pathParameters), + } + return m +} +// NewItemTeamChannelsItemArchiveRequestBuilder instantiates a new ArchiveRequestBuilder and sets the default values. +func NewItemTeamChannelsItemArchiveRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamChannelsItemArchiveRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamChannelsItemArchiveRequestBuilderInternal(urlParams, requestAdapter) +} +// Post invoke action archive +func (m *ItemTeamChannelsItemArchiveRequestBuilder) Post(ctx context.Context, body ItemTeamChannelsItemArchivePostRequestBodyable, requestConfiguration *ItemTeamChannelsItemArchiveRequestBuilderPostRequestConfiguration)(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation invoke action archive +func (m *ItemTeamChannelsItemArchiveRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemTeamChannelsItemArchivePostRequestBodyable, requestConfiguration *ItemTeamChannelsItemArchiveRequestBuilderPostRequestConfiguration)(*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. +func (m *ItemTeamChannelsItemArchiveRequestBuilder) WithUrl(rawUrl string)(*ItemTeamChannelsItemArchiveRequestBuilder) { + return NewItemTeamChannelsItemArchiveRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/groups/item_team_channels_item_members_conversation_member_item_request_builder.go b/groups/item_team_channels_item_members_conversation_member_item_request_builder.go index f7cfefff6c4..588f040ece1 100644 --- a/groups/item_team_channels_item_members_conversation_member_item_request_builder.go +++ b/groups/item_team_channels_item_members_conversation_member_item_request_builder.go @@ -95,10 +95,10 @@ func (m *ItemTeamChannelsItemMembersConversationMemberItemRequestBuilder) Get(ct } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable), nil } -// Patch update the role of a conversationMember in a team.or channel. +// Patch update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/conversationmember-update?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/channel-update-members?view=graph-rest-1.0 func (m *ItemTeamChannelsItemMembersConversationMemberItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable, requestConfiguration *ItemTeamChannelsItemMembersConversationMemberItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable, error) { requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -140,7 +140,7 @@ func (m *ItemTeamChannelsItemMembersConversationMemberItemRequestBuilder) ToGetR requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPatchRequestInformation update the role of a conversationMember in a team.or channel. +// ToPatchRequestInformation update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. func (m *ItemTeamChannelsItemMembersConversationMemberItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable, requestConfiguration *ItemTeamChannelsItemMembersConversationMemberItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/groups/item_team_channels_item_messages_request_builder.go b/groups/item_team_channels_item_messages_request_builder.go index 90888e061f0..eb3f7b9a8d1 100644 --- a/groups/item_team_channels_item_messages_request_builder.go +++ b/groups/item_team_channels_item_messages_request_builder.go @@ -100,10 +100,10 @@ func (m *ItemTeamChannelsItemMessagesRequestBuilder) Get(ctx context.Context, re } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageCollectionResponseable), nil } -// Post send a new chatMessage in the specified channel or a chat. +// Post send a new chatMessage in the specified channel. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/chatmessage-post?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/channel-post-messages?view=graph-rest-1.0 func (m *ItemTeamChannelsItemMessagesRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, requestConfiguration *ItemTeamChannelsItemMessagesRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -135,7 +135,7 @@ func (m *ItemTeamChannelsItemMessagesRequestBuilder) ToGetRequestInformation(ctx requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation send a new chatMessage in the specified channel or a chat. +// ToPostRequestInformation send a new chatMessage in the specified channel. func (m *ItemTeamChannelsItemMessagesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, requestConfiguration *ItemTeamChannelsItemMessagesRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/groups/item_team_channels_item_unarchive_request_builder.go b/groups/item_team_channels_item_unarchive_request_builder.go new file mode 100644 index 00000000000..cc4db02b782 --- /dev/null +++ b/groups/item_team_channels_item_unarchive_request_builder.go @@ -0,0 +1,62 @@ +package groups + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemTeamChannelsItemUnarchiveRequestBuilder provides operations to call the unarchive method. +type ItemTeamChannelsItemUnarchiveRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemTeamChannelsItemUnarchiveRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemTeamChannelsItemUnarchiveRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewItemTeamChannelsItemUnarchiveRequestBuilderInternal instantiates a new UnarchiveRequestBuilder and sets the default values. +func NewItemTeamChannelsItemUnarchiveRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamChannelsItemUnarchiveRequestBuilder) { + m := &ItemTeamChannelsItemUnarchiveRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{group%2Did}/team/channels/{channel%2Did}/unarchive", pathParameters), + } + return m +} +// NewItemTeamChannelsItemUnarchiveRequestBuilder instantiates a new UnarchiveRequestBuilder and sets the default values. +func NewItemTeamChannelsItemUnarchiveRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamChannelsItemUnarchiveRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamChannelsItemUnarchiveRequestBuilderInternal(urlParams, requestAdapter) +} +// Post invoke action unarchive +func (m *ItemTeamChannelsItemUnarchiveRequestBuilder) Post(ctx context.Context, requestConfiguration *ItemTeamChannelsItemUnarchiveRequestBuilderPostRequestConfiguration)(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation invoke action unarchive +func (m *ItemTeamChannelsItemUnarchiveRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *ItemTeamChannelsItemUnarchiveRequestBuilderPostRequestConfiguration)(*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. +func (m *ItemTeamChannelsItemUnarchiveRequestBuilder) WithUrl(rawUrl string)(*ItemTeamChannelsItemUnarchiveRequestBuilder) { + return NewItemTeamChannelsItemUnarchiveRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/groups/item_team_primary_channel_archive_post_request_body.go b/groups/item_team_primary_channel_archive_post_request_body.go new file mode 100644 index 00000000000..86da6552af9 --- /dev/null +++ b/groups/item_team_primary_channel_archive_post_request_body.go @@ -0,0 +1,110 @@ +package groups + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +// ItemTeamPrimaryChannelArchivePostRequestBody +type ItemTeamPrimaryChannelArchivePostRequestBody struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewItemTeamPrimaryChannelArchivePostRequestBody instantiates a new ItemTeamPrimaryChannelArchivePostRequestBody and sets the default values. +func NewItemTeamPrimaryChannelArchivePostRequestBody()(*ItemTeamPrimaryChannelArchivePostRequestBody) { + m := &ItemTeamPrimaryChannelArchivePostRequestBody{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemTeamPrimaryChannelArchivePostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateItemTeamPrimaryChannelArchivePostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemTeamPrimaryChannelArchivePostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemTeamPrimaryChannelArchivePostRequestBody) GetAdditionalData()(map[string]any) { + val , err := m.backingStore.Get("additionalData") + if err != nil { + panic(err) + } + if val == nil { + var value = make(map[string]any); + m.SetAdditionalData(value); + } + return val.(map[string]any) +} +// GetBackingStore gets the BackingStore property value. Stores model information. +func (m *ItemTeamPrimaryChannelArchivePostRequestBody) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ItemTeamPrimaryChannelArchivePostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["shouldSetSpoSiteReadOnlyForMembers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetShouldSetSpoSiteReadOnlyForMembers(val) + } + return nil + } + return res +} +// GetShouldSetSpoSiteReadOnlyForMembers gets the shouldSetSpoSiteReadOnlyForMembers property value. The shouldSetSpoSiteReadOnlyForMembers property +func (m *ItemTeamPrimaryChannelArchivePostRequestBody) GetShouldSetSpoSiteReadOnlyForMembers()(*bool) { + val, err := m.GetBackingStore().Get("shouldSetSpoSiteReadOnlyForMembers") + if err != nil { + panic(err) + } + if val != nil { + return val.(*bool) + } + return nil +} +// Serialize serializes information the current object +func (m *ItemTeamPrimaryChannelArchivePostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("shouldSetSpoSiteReadOnlyForMembers", m.GetShouldSetSpoSiteReadOnlyForMembers()) + 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 *ItemTeamPrimaryChannelArchivePostRequestBody) 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 *ItemTeamPrimaryChannelArchivePostRequestBody) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetShouldSetSpoSiteReadOnlyForMembers sets the shouldSetSpoSiteReadOnlyForMembers property value. The shouldSetSpoSiteReadOnlyForMembers property +func (m *ItemTeamPrimaryChannelArchivePostRequestBody) SetShouldSetSpoSiteReadOnlyForMembers(value *bool)() { + err := m.GetBackingStore().Set("shouldSetSpoSiteReadOnlyForMembers", value) + if err != nil { + panic(err) + } +} +// ItemTeamPrimaryChannelArchivePostRequestBodyable +type ItemTeamPrimaryChannelArchivePostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetShouldSetSpoSiteReadOnlyForMembers()(*bool) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetShouldSetSpoSiteReadOnlyForMembers(value *bool)() +} diff --git a/groups/item_team_primary_channel_archive_request_builder.go b/groups/item_team_primary_channel_archive_request_builder.go new file mode 100644 index 00000000000..44a1037602d --- /dev/null +++ b/groups/item_team_primary_channel_archive_request_builder.go @@ -0,0 +1,66 @@ +package groups + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemTeamPrimaryChannelArchiveRequestBuilder provides operations to call the archive method. +type ItemTeamPrimaryChannelArchiveRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemTeamPrimaryChannelArchiveRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemTeamPrimaryChannelArchiveRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewItemTeamPrimaryChannelArchiveRequestBuilderInternal instantiates a new ArchiveRequestBuilder and sets the default values. +func NewItemTeamPrimaryChannelArchiveRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamPrimaryChannelArchiveRequestBuilder) { + m := &ItemTeamPrimaryChannelArchiveRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{group%2Did}/team/primaryChannel/archive", pathParameters), + } + return m +} +// NewItemTeamPrimaryChannelArchiveRequestBuilder instantiates a new ArchiveRequestBuilder and sets the default values. +func NewItemTeamPrimaryChannelArchiveRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamPrimaryChannelArchiveRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamPrimaryChannelArchiveRequestBuilderInternal(urlParams, requestAdapter) +} +// Post invoke action archive +func (m *ItemTeamPrimaryChannelArchiveRequestBuilder) Post(ctx context.Context, body ItemTeamPrimaryChannelArchivePostRequestBodyable, requestConfiguration *ItemTeamPrimaryChannelArchiveRequestBuilderPostRequestConfiguration)(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation invoke action archive +func (m *ItemTeamPrimaryChannelArchiveRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemTeamPrimaryChannelArchivePostRequestBodyable, requestConfiguration *ItemTeamPrimaryChannelArchiveRequestBuilderPostRequestConfiguration)(*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. +func (m *ItemTeamPrimaryChannelArchiveRequestBuilder) WithUrl(rawUrl string)(*ItemTeamPrimaryChannelArchiveRequestBuilder) { + return NewItemTeamPrimaryChannelArchiveRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/groups/item_team_primary_channel_members_conversation_member_item_request_builder.go b/groups/item_team_primary_channel_members_conversation_member_item_request_builder.go index 74caa25cdef..b39503fed37 100644 --- a/groups/item_team_primary_channel_members_conversation_member_item_request_builder.go +++ b/groups/item_team_primary_channel_members_conversation_member_item_request_builder.go @@ -95,10 +95,10 @@ func (m *ItemTeamPrimaryChannelMembersConversationMemberItemRequestBuilder) Get( } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable), nil } -// Patch update the role of a conversationMember in a team.or channel. +// Patch update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/conversationmember-update?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/channel-update-members?view=graph-rest-1.0 func (m *ItemTeamPrimaryChannelMembersConversationMemberItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable, requestConfiguration *ItemTeamPrimaryChannelMembersConversationMemberItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable, error) { requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -140,7 +140,7 @@ func (m *ItemTeamPrimaryChannelMembersConversationMemberItemRequestBuilder) ToGe requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPatchRequestInformation update the role of a conversationMember in a team.or channel. +// ToPatchRequestInformation update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. func (m *ItemTeamPrimaryChannelMembersConversationMemberItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable, requestConfiguration *ItemTeamPrimaryChannelMembersConversationMemberItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/groups/item_team_primary_channel_messages_request_builder.go b/groups/item_team_primary_channel_messages_request_builder.go index 6abe177e9a1..67da42f75f1 100644 --- a/groups/item_team_primary_channel_messages_request_builder.go +++ b/groups/item_team_primary_channel_messages_request_builder.go @@ -100,10 +100,10 @@ func (m *ItemTeamPrimaryChannelMessagesRequestBuilder) Get(ctx context.Context, } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageCollectionResponseable), nil } -// Post send a new chatMessage in the specified channel or a chat. +// Post send a new chatMessage in the specified channel. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/chatmessage-post?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/channel-post-messages?view=graph-rest-1.0 func (m *ItemTeamPrimaryChannelMessagesRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, requestConfiguration *ItemTeamPrimaryChannelMessagesRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -135,7 +135,7 @@ func (m *ItemTeamPrimaryChannelMessagesRequestBuilder) ToGetRequestInformation(c requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation send a new chatMessage in the specified channel or a chat. +// ToPostRequestInformation send a new chatMessage in the specified channel. func (m *ItemTeamPrimaryChannelMessagesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, requestConfiguration *ItemTeamPrimaryChannelMessagesRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/groups/item_team_primary_channel_request_builder.go b/groups/item_team_primary_channel_request_builder.go index 07961124222..35be7054ab4 100644 --- a/groups/item_team_primary_channel_request_builder.go +++ b/groups/item_team_primary_channel_request_builder.go @@ -41,6 +41,10 @@ type ItemTeamPrimaryChannelRequestBuilderPatchRequestConfiguration struct { // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } +// Archive provides operations to call the archive method. +func (m *ItemTeamPrimaryChannelRequestBuilder) Archive()(*ItemTeamPrimaryChannelArchiveRequestBuilder) { + return NewItemTeamPrimaryChannelArchiveRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // CompleteMigration provides operations to call the completeMigration method. func (m *ItemTeamPrimaryChannelRequestBuilder) CompleteMigration()(*ItemTeamPrimaryChannelCompleteMigrationRequestBuilder) { return NewItemTeamPrimaryChannelCompleteMigrationRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) @@ -184,6 +188,10 @@ func (m *ItemTeamPrimaryChannelRequestBuilder) ToPatchRequestInformation(ctx con } return requestInfo, nil } +// Unarchive provides operations to call the unarchive method. +func (m *ItemTeamPrimaryChannelRequestBuilder) Unarchive()(*ItemTeamPrimaryChannelUnarchiveRequestBuilder) { + return NewItemTeamPrimaryChannelUnarchiveRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. func (m *ItemTeamPrimaryChannelRequestBuilder) WithUrl(rawUrl string)(*ItemTeamPrimaryChannelRequestBuilder) { return NewItemTeamPrimaryChannelRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); diff --git a/groups/item_team_primary_channel_unarchive_request_builder.go b/groups/item_team_primary_channel_unarchive_request_builder.go new file mode 100644 index 00000000000..2320d9e87b1 --- /dev/null +++ b/groups/item_team_primary_channel_unarchive_request_builder.go @@ -0,0 +1,62 @@ +package groups + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemTeamPrimaryChannelUnarchiveRequestBuilder provides operations to call the unarchive method. +type ItemTeamPrimaryChannelUnarchiveRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemTeamPrimaryChannelUnarchiveRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemTeamPrimaryChannelUnarchiveRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewItemTeamPrimaryChannelUnarchiveRequestBuilderInternal instantiates a new UnarchiveRequestBuilder and sets the default values. +func NewItemTeamPrimaryChannelUnarchiveRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamPrimaryChannelUnarchiveRequestBuilder) { + m := &ItemTeamPrimaryChannelUnarchiveRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{group%2Did}/team/primaryChannel/unarchive", pathParameters), + } + return m +} +// NewItemTeamPrimaryChannelUnarchiveRequestBuilder instantiates a new UnarchiveRequestBuilder and sets the default values. +func NewItemTeamPrimaryChannelUnarchiveRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamPrimaryChannelUnarchiveRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamPrimaryChannelUnarchiveRequestBuilderInternal(urlParams, requestAdapter) +} +// Post invoke action unarchive +func (m *ItemTeamPrimaryChannelUnarchiveRequestBuilder) Post(ctx context.Context, requestConfiguration *ItemTeamPrimaryChannelUnarchiveRequestBuilderPostRequestConfiguration)(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation invoke action unarchive +func (m *ItemTeamPrimaryChannelUnarchiveRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *ItemTeamPrimaryChannelUnarchiveRequestBuilderPostRequestConfiguration)(*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. +func (m *ItemTeamPrimaryChannelUnarchiveRequestBuilder) WithUrl(rawUrl string)(*ItemTeamPrimaryChannelUnarchiveRequestBuilder) { + return NewItemTeamPrimaryChannelUnarchiveRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/identity/custom_authentication_extensions_request_builder.go b/identity/custom_authentication_extensions_request_builder.go index 183310eefd0..adfa142a8cd 100644 --- a/identity/custom_authentication_extensions_request_builder.go +++ b/identity/custom_authentication_extensions_request_builder.go @@ -11,7 +11,7 @@ import ( type CustomAuthenticationExtensionsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// CustomAuthenticationExtensionsRequestBuilderGetQueryParameters get a list of the customAuthenticationExtension objects and their properties. Currently, only onTokenIssuanceStartCustomExtension objects are returned. +// CustomAuthenticationExtensionsRequestBuilderGetQueryParameters get a list of the customAuthenticationExtension objects and their properties. The following derived types are supported. type CustomAuthenticationExtensionsRequestBuilderGetQueryParameters struct { // Include count of items Count *bool `uriparametername:"%24count"` @@ -74,7 +74,7 @@ func NewCustomAuthenticationExtensionsRequestBuilder(rawUrl string, requestAdapt func (m *CustomAuthenticationExtensionsRequestBuilder) Count()(*CustomAuthenticationExtensionsCountRequestBuilder) { return NewCustomAuthenticationExtensionsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Get get a list of the customAuthenticationExtension objects and their properties. Currently, only onTokenIssuanceStartCustomExtension objects are returned. +// Get get a list of the customAuthenticationExtension objects and their properties. The following derived types are supported. // [Find more info here] // // [Find more info here]: https://learn.microsoft.com/graph/api/identitycontainer-list-customauthenticationextensions?view=graph-rest-1.0 @@ -96,7 +96,7 @@ func (m *CustomAuthenticationExtensionsRequestBuilder) Get(ctx context.Context, } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CustomAuthenticationExtensionCollectionResponseable), nil } -// Post create a new customAuthenticationExtension object. Only the onTokenIssuanceStartCustomExtension object type is supported. +// Post create a new customAuthenticationExtension object. The following derived types are currently supported. // [Find more info here] // // [Find more info here]: https://learn.microsoft.com/graph/api/identitycontainer-post-customauthenticationextensions?view=graph-rest-1.0 @@ -118,7 +118,7 @@ func (m *CustomAuthenticationExtensionsRequestBuilder) Post(ctx context.Context, } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CustomAuthenticationExtensionable), nil } -// ToGetRequestInformation get a list of the customAuthenticationExtension objects and their properties. Currently, only onTokenIssuanceStartCustomExtension objects are returned. +// ToGetRequestInformation get a list of the customAuthenticationExtension objects and their properties. The following derived types are supported. 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 { @@ -131,7 +131,7 @@ func (m *CustomAuthenticationExtensionsRequestBuilder) ToGetRequestInformation(c requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation create a new customAuthenticationExtension object. Only the onTokenIssuanceStartCustomExtension object type is supported. +// ToPostRequestInformation create a new customAuthenticationExtension object. The following derived types are currently supported. func (m *CustomAuthenticationExtensionsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CustomAuthenticationExtensionable, requestConfiguration *CustomAuthenticationExtensionsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/identitygovernance/entitlement_management_access_package_catalogs_item_access_package_custom_workflow_extensions_custom_callout_extension_item_request_builder.go b/identitygovernance/entitlement_management_access_package_catalogs_item_access_package_custom_workflow_extensions_custom_callout_extension_item_request_builder.go index e693f682bac..4c05b75b769 100644 --- a/identitygovernance/entitlement_management_access_package_catalogs_item_access_package_custom_workflow_extensions_custom_callout_extension_item_request_builder.go +++ b/identitygovernance/entitlement_management_access_package_catalogs_item_access_package_custom_workflow_extensions_custom_callout_extension_item_request_builder.go @@ -94,11 +94,11 @@ func (m *EntitlementManagementAccessPackageCatalogsItemAccessPackageCustomWorkfl } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CustomCalloutExtensionable), nil } -// Patch update the properties of an accessPackageAssignmentRequestWorkflowExtension object. +// Patch update the properties of an accessPackageAssignmentWorkflowExtension object. // Deprecated: as of 2022-10/PrivatePreview:MicrosofEntitlementManagementCustomextensions on 2023-03-01 and will be removed 2023-12-31 // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/accesspackageassignmentrequestworkflowextension-update?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/accesspackageassignmentworkflowextension-update?view=graph-rest-1.0 func (m *EntitlementManagementAccessPackageCatalogsItemAccessPackageCustomWorkflowExtensionsCustomCalloutExtensionItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CustomCalloutExtensionable, requestConfiguration *EntitlementManagementAccessPackageCatalogsItemAccessPackageCustomWorkflowExtensionsCustomCalloutExtensionItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CustomCalloutExtensionable, error) { requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -142,7 +142,7 @@ func (m *EntitlementManagementAccessPackageCatalogsItemAccessPackageCustomWorkfl requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPatchRequestInformation update the properties of an accessPackageAssignmentRequestWorkflowExtension object. +// ToPatchRequestInformation update the properties of an accessPackageAssignmentWorkflowExtension object. // Deprecated: as of 2022-10/PrivatePreview:MicrosofEntitlementManagementCustomextensions on 2023-03-01 and will be removed 2023-12-31 func (m *EntitlementManagementAccessPackageCatalogsItemAccessPackageCustomWorkflowExtensionsCustomCalloutExtensionItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CustomCalloutExtensionable, requestConfiguration *EntitlementManagementAccessPackageCatalogsItemAccessPackageCustomWorkflowExtensionsCustomCalloutExtensionItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/identitygovernance/entitlement_management_access_package_catalogs_item_custom_access_package_workflow_extensions_custom_access_package_workflow_extension_item_request_builder.go b/identitygovernance/entitlement_management_access_package_catalogs_item_custom_access_package_workflow_extensions_custom_access_package_workflow_extension_item_request_builder.go index 5369dc4b1b3..56e202b84ea 100644 --- a/identitygovernance/entitlement_management_access_package_catalogs_item_custom_access_package_workflow_extensions_custom_access_package_workflow_extension_item_request_builder.go +++ b/identitygovernance/entitlement_management_access_package_catalogs_item_custom_access_package_workflow_extensions_custom_access_package_workflow_extension_item_request_builder.go @@ -54,11 +54,11 @@ func NewEntitlementManagementAccessPackageCatalogsItemCustomAccessPackageWorkflo urlParams["request-raw-url"] = rawUrl return NewEntitlementManagementAccessPackageCatalogsItemCustomAccessPackageWorkflowExtensionsCustomAccessPackageWorkflowExtensionItemRequestBuilderInternal(urlParams, requestAdapter) } -// Delete delete an accessPackageAssignmentRequestWorkflowExtension object. The custom workflow extension must first be removed from any associated policies before it can be deleted. Follow these steps to remove the custom workflow extension from any associated policies:1. First retrieve the accessPackageCatalogId by calling the Get accessPackageAssignmentPolicies operation and appending ?$expand=accessPackage($expand=accessPackageCatalog) to the query. For example, https://graph.microsoft.com/beta/identityGovernance/entitlementManagement/accessPackageAssignmentPolicies?$expand=accessPackage($expand=accessPackageCatalog).2. Use the access package catalog ID and retrieve the ID of the accessPackageCustomWorkflowExtension object that you want to delete by running the List accessPackageCustomWorkflowExtensions operation.3. Call the Update accessPackageAssignmentPolicy operation to remove the custom workflow extension object from the policy. For an example, see Example 3: Remove the customExtensionStageSettings from a policy. +// Delete delete a customAccessPackageWorkflowExtension object. The custom workflow extension must first be removed from any associated policies before it can be deleted. Follow these steps to remove the custom workflow extension from any associated policies:1. First retrieve the accessPackageCatalogId by calling the Get accessPackageAssignmentPolicies operation and appending ?$expand=accessPackage($expand=accessPackageCatalog) to the query. For example, https://graph.microsoft.com/beta/identityGovernance/entitlementManagement/accessPackageAssignmentPolicies?$expand=accessPackage($expand=accessPackageCatalog).2. Use the access package catalog ID and retrieve the ID of the customAccessPackageWorkflowExtension object that you want to delete by running the LIST customAccessPackageWorkflowExtensions operation.3. Call the Update accessPackageAssignmentPolicy operation to remove the custom workflow extension object from the policy. For an example, see Example 2: Remove the customExtensionHandlers and verifiableCredentialSettings from a policy. // Deprecated: as of 2022-10/PrivatePreview:MicrosofEntitlementManagementCustomextensions on 2023-03-01 and will be removed 2023-12-31 // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/accesspackageassignmentrequestworkflowextension-delete?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/customaccesspackageworkflowextension-delete?view=graph-rest-1.0 func (m *EntitlementManagementAccessPackageCatalogsItemCustomAccessPackageWorkflowExtensionsCustomAccessPackageWorkflowExtensionItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *EntitlementManagementAccessPackageCatalogsItemCustomAccessPackageWorkflowExtensionsCustomAccessPackageWorkflowExtensionItemRequestBuilderDeleteRequestConfiguration)(error) { requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); if err != nil { @@ -120,7 +120,7 @@ func (m *EntitlementManagementAccessPackageCatalogsItemCustomAccessPackageWorkfl } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CustomAccessPackageWorkflowExtensionable), nil } -// ToDeleteRequestInformation delete an accessPackageAssignmentRequestWorkflowExtension object. The custom workflow extension must first be removed from any associated policies before it can be deleted. Follow these steps to remove the custom workflow extension from any associated policies:1. First retrieve the accessPackageCatalogId by calling the Get accessPackageAssignmentPolicies operation and appending ?$expand=accessPackage($expand=accessPackageCatalog) to the query. For example, https://graph.microsoft.com/beta/identityGovernance/entitlementManagement/accessPackageAssignmentPolicies?$expand=accessPackage($expand=accessPackageCatalog).2. Use the access package catalog ID and retrieve the ID of the accessPackageCustomWorkflowExtension object that you want to delete by running the List accessPackageCustomWorkflowExtensions operation.3. Call the Update accessPackageAssignmentPolicy operation to remove the custom workflow extension object from the policy. For an example, see Example 3: Remove the customExtensionStageSettings from a policy. +// ToDeleteRequestInformation delete a customAccessPackageWorkflowExtension object. The custom workflow extension must first be removed from any associated policies before it can be deleted. Follow these steps to remove the custom workflow extension from any associated policies:1. First retrieve the accessPackageCatalogId by calling the Get accessPackageAssignmentPolicies operation and appending ?$expand=accessPackage($expand=accessPackageCatalog) to the query. For example, https://graph.microsoft.com/beta/identityGovernance/entitlementManagement/accessPackageAssignmentPolicies?$expand=accessPackage($expand=accessPackageCatalog).2. Use the access package catalog ID and retrieve the ID of the customAccessPackageWorkflowExtension object that you want to delete by running the LIST customAccessPackageWorkflowExtensions operation.3. Call the Update accessPackageAssignmentPolicy operation to remove the custom workflow extension object from the policy. For an example, see Example 2: Remove the customExtensionHandlers and verifiableCredentialSettings from a policy. // Deprecated: as of 2022-10/PrivatePreview:MicrosofEntitlementManagementCustomextensions on 2023-03-01 and will be removed 2023-12-31 func (m *EntitlementManagementAccessPackageCatalogsItemCustomAccessPackageWorkflowExtensionsCustomAccessPackageWorkflowExtensionItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *EntitlementManagementAccessPackageCatalogsItemCustomAccessPackageWorkflowExtensionsCustomAccessPackageWorkflowExtensionItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/identitygovernance/entitlement_management_access_packages_access_package_item_request_builder.go b/identitygovernance/entitlement_management_access_packages_access_package_item_request_builder.go index 7f3cb6ed339..defa559ee1a 100644 --- a/identitygovernance/entitlement_management_access_packages_access_package_item_request_builder.go +++ b/identitygovernance/entitlement_management_access_packages_access_package_item_request_builder.go @@ -18,7 +18,7 @@ type EntitlementManagementAccessPackagesAccessPackageItemRequestBuilderDeleteReq // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// EntitlementManagementAccessPackagesAccessPackageItemRequestBuilderGetQueryParameters retrieve the properties and relationships of an accessPackage object. +// EntitlementManagementAccessPackagesAccessPackageItemRequestBuilderGetQueryParameters retrieve an access package with a list of accessPackageResourceRoleScope objects. These objects represent the resource roles that an access package assigns to each subject. Each object links to an accessPackageResourceRole and an accessPackageResourceScope. type EntitlementManagementAccessPackagesAccessPackageItemRequestBuilderGetQueryParameters struct { // Expand related entities Expand []string `uriparametername:"%24expand"` @@ -89,10 +89,10 @@ func (m *EntitlementManagementAccessPackagesAccessPackageItemRequestBuilder) Del } return nil } -// Get retrieve the properties and relationships of an accessPackage object. +// Get retrieve an access package with a list of accessPackageResourceRoleScope objects. These objects represent the resource roles that an access package assigns to each subject. Each object links to an accessPackageResourceRole and an accessPackageResourceScope. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/accesspackage-get?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/accesspackage-list-accesspackageresourcerolescopes?view=graph-rest-1.0 func (m *EntitlementManagementAccessPackagesAccessPackageItemRequestBuilder) Get(ctx context.Context, requestConfiguration *EntitlementManagementAccessPackagesAccessPackageItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AccessPackageable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -159,7 +159,7 @@ func (m *EntitlementManagementAccessPackagesAccessPackageItemRequestBuilder) ToD requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToGetRequestInformation retrieve the properties and relationships of an accessPackage object. +// ToGetRequestInformation retrieve an access package with a list of accessPackageResourceRoleScope objects. These objects represent the resource roles that an access package assigns to each subject. Each object links to an accessPackageResourceRole and an accessPackageResourceScope. func (m *EntitlementManagementAccessPackagesAccessPackageItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *EntitlementManagementAccessPackagesAccessPackageItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/identitygovernance/terms_of_use_agreements_agreement_item_request_builder.go b/identitygovernance/terms_of_use_agreements_agreement_item_request_builder.go index 4676d07ef42..437d11461a8 100644 --- a/identitygovernance/terms_of_use_agreements_agreement_item_request_builder.go +++ b/identitygovernance/terms_of_use_agreements_agreement_item_request_builder.go @@ -18,7 +18,7 @@ type TermsOfUseAgreementsAgreementItemRequestBuilderDeleteRequestConfiguration s // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// TermsOfUseAgreementsAgreementItemRequestBuilderGetQueryParameters retrieve the properties and relationships of an agreement object. +// TermsOfUseAgreementsAgreementItemRequestBuilderGetQueryParameters retrieve all files related to an agreement. This includes the default file and all localized files. type TermsOfUseAgreementsAgreementItemRequestBuilderGetQueryParameters struct { // Expand related entities Expand []string `uriparametername:"%24expand"` @@ -85,10 +85,10 @@ func (m *TermsOfUseAgreementsAgreementItemRequestBuilder) File()(*TermsOfUseAgre func (m *TermsOfUseAgreementsAgreementItemRequestBuilder) Files()(*TermsOfUseAgreementsItemFilesRequestBuilder) { return NewTermsOfUseAgreementsItemFilesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Get retrieve the properties and relationships of an agreement object. +// Get retrieve all files related to an agreement. This includes the default file and all localized files. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/agreement-get?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/agreement-list-files?view=graph-rest-1.0 func (m *TermsOfUseAgreementsAgreementItemRequestBuilder) Get(ctx context.Context, requestConfiguration *TermsOfUseAgreementsAgreementItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Agreementable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -139,7 +139,7 @@ func (m *TermsOfUseAgreementsAgreementItemRequestBuilder) ToDeleteRequestInforma requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToGetRequestInformation retrieve the properties and relationships of an agreement object. +// ToGetRequestInformation retrieve all files related to an agreement. This includes the default file and all localized files. func (m *TermsOfUseAgreementsAgreementItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *TermsOfUseAgreementsAgreementItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/identityprotection/risk_detections_risk_detection_item_request_builder.go b/identityprotection/risk_detections_risk_detection_item_request_builder.go index 9a6c7437a7a..3c55d3e4077 100644 --- a/identityprotection/risk_detections_risk_detection_item_request_builder.go +++ b/identityprotection/risk_detections_risk_detection_item_request_builder.go @@ -18,7 +18,7 @@ type RiskDetectionsRiskDetectionItemRequestBuilderDeleteRequestConfiguration str // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// RiskDetectionsRiskDetectionItemRequestBuilderGetQueryParameters retrieve the properties of a collection of riskDetection objects. +// RiskDetectionsRiskDetectionItemRequestBuilderGetQueryParameters retrieve the properties of a riskDetection object. type RiskDetectionsRiskDetectionItemRequestBuilderGetQueryParameters struct { // Expand related entities Expand []string `uriparametername:"%24expand"` @@ -70,10 +70,10 @@ func (m *RiskDetectionsRiskDetectionItemRequestBuilder) Delete(ctx context.Conte } return nil } -// Get retrieve the properties of a collection of riskDetection objects. +// Get retrieve the properties of a riskDetection object. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/riskdetection-list?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/riskdetection-get?view=graph-rest-1.0 func (m *RiskDetectionsRiskDetectionItemRequestBuilder) Get(ctx context.Context, requestConfiguration *RiskDetectionsRiskDetectionItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.RiskDetectionable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -121,7 +121,7 @@ func (m *RiskDetectionsRiskDetectionItemRequestBuilder) ToDeleteRequestInformati requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToGetRequestInformation retrieve the properties of a collection of riskDetection objects. +// ToGetRequestInformation retrieve the properties of a riskDetection object. func (m *RiskDetectionsRiskDetectionItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *RiskDetectionsRiskDetectionItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/kiota-lock.json b/kiota-lock.json index 03a8fe0b255..13a47960ef6 100644 --- a/kiota-lock.json +++ b/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "DC57A2D50E23FE2A10E02407633A69934DF56EF9CB84F56E4EB061BEF532C865C8A09534F8C367D43F50BB8E2F04F442BEE05C339EAFAAF98BCEB25CAE4C6BF3", + "descriptionHash": "66E6C6C10EA2352E51F75ACF0A0B1CD259E44978FE5A46E7A439A5A6E1B65469EC23F73E76F34F447DEF41A5B3D39436017BE363B4A11C515C59E92D8D5F0F5C", "descriptionLocation": "../../msgraph-metadata/clean_beta_openapi/openapi.yaml", "lockFileVersion": "1.0.0", "kiotaVersion": "1.10.0", diff --git a/models/admin.go b/models/admin.go index eca4f906914..192a5e3238d 100644 --- a/models/admin.go +++ b/models/admin.go @@ -114,6 +114,16 @@ func (m *Admin) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388 } return nil } + res["microsoft365Apps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAdminMicrosoft365AppsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMicrosoft365Apps(val.(AdminMicrosoft365Appsable)) + } + return nil + } res["@odata.type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -197,6 +207,17 @@ func (m *Admin) GetForms()(AdminFormsable) { } return nil } +// GetMicrosoft365Apps gets the microsoft365Apps property value. A container for the Microsoft 365 apps admin functionality. +func (m *Admin) GetMicrosoft365Apps()(AdminMicrosoft365Appsable) { + val, err := m.GetBackingStore().Get("microsoft365Apps") + if err != nil { + panic(err) + } + if val != nil { + return val.(AdminMicrosoft365Appsable) + } + return nil +} // GetOdataType gets the @odata.type property value. The OdataType property func (m *Admin) GetOdataType()(*string) { val, err := m.GetBackingStore().Get("odataType") @@ -300,6 +321,12 @@ func (m *Admin) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c4 return err } } + { + err := writer.WriteObjectValue("microsoft365Apps", m.GetMicrosoft365Apps()) + if err != nil { + return err + } + } { err := writer.WriteStringValue("@odata.type", m.GetOdataType()) if err != nil { @@ -389,6 +416,13 @@ func (m *Admin) SetForms(value AdminFormsable)() { panic(err) } } +// SetMicrosoft365Apps sets the microsoft365Apps property value. A container for the Microsoft 365 apps admin functionality. +func (m *Admin) SetMicrosoft365Apps(value AdminMicrosoft365Appsable)() { + err := m.GetBackingStore().Set("microsoft365Apps", value) + if err != nil { + panic(err) + } +} // SetOdataType sets the @odata.type property value. The OdataType property func (m *Admin) SetOdataType(value *string)() { err := m.GetBackingStore().Set("odataType", value) @@ -448,6 +482,7 @@ type Adminable interface { GetDynamics()(AdminDynamicsable) GetEdge()(Edgeable) GetForms()(AdminFormsable) + GetMicrosoft365Apps()(AdminMicrosoft365Appsable) GetOdataType()(*string) GetPeople()(PeopleAdminSettingsable) GetReportSettings()(AdminReportSettingsable) @@ -460,6 +495,7 @@ type Adminable interface { SetDynamics(value AdminDynamicsable)() SetEdge(value Edgeable)() SetForms(value AdminFormsable)() + SetMicrosoft365Apps(value AdminMicrosoft365Appsable)() SetOdataType(value *string)() SetPeople(value PeopleAdminSettingsable)() SetReportSettings(value AdminReportSettingsable)() @@ -468,73 +504,3 @@ type Adminable interface { SetTodo(value AdminTodoable)() SetWindows(value AdminWindowsable)() } - -// AdminWindows -type AdminWindows struct { - Entity -} -// NewAdminWindows instantiates a new adminWindows and sets the default values. -func NewAdminWindows()(*AdminWindows) { - m := &AdminWindows{ - Entity: *NewEntity(), - } - return m -} -// CreateAdminWindowsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value -func CreateAdminWindowsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewAdminWindows(), nil -} -// GetFieldDeserializers the deserialization information for the current model -func (m *AdminWindows) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - res := m.Entity.GetFieldDeserializers() - res["updates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetObjectValue(CreateAdminWindowsUpdatesFromDiscriminatorValue) - if err != nil { - return err - } - if val != nil { - m.SetUpdates(val.(AdminWindowsUpdatesable)) - } - return nil - } - return res -} -// GetUpdates gets the updates property value. Entity that acts as a container for all Windows Update for Business deployment service functionalities. Read-only. -func (m *AdminWindows) GetUpdates()(AdminWindowsUpdatesable) { - val, err := m.GetBackingStore().Get("updates") - if err != nil { - panic(err) - } - if val != nil { - return val.(AdminWindowsUpdatesable) - } - return nil -} -// Serialize serializes information the current object -func (m *AdminWindows) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - err := m.Entity.Serialize(writer) - if err != nil { - return err - } - { - err = writer.WriteObjectValue("updates", m.GetUpdates()) - if err != nil { - return err - } - } - return nil -} -// SetUpdates sets the updates property value. Entity that acts as a container for all Windows Update for Business deployment service functionalities. Read-only. -func (m *AdminWindows) SetUpdates(value AdminWindowsUpdatesable)() { - err := m.GetBackingStore().Set("updates", value) - if err != nil { - panic(err) - } -} -// AdminWindowsable -type AdminWindowsable interface { - Entityable - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetUpdates()(AdminWindowsUpdatesable) - SetUpdates(value AdminWindowsUpdatesable)() -} diff --git a/models/admin_microsoft365_apps.go b/models/admin_microsoft365_apps.go new file mode 100644 index 00000000000..469c64c2f9d --- /dev/null +++ b/models/admin_microsoft365_apps.go @@ -0,0 +1,75 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AdminMicrosoft365Apps +type AdminMicrosoft365Apps struct { + Entity +} +// NewAdminMicrosoft365Apps instantiates a new adminMicrosoft365Apps and sets the default values. +func NewAdminMicrosoft365Apps()(*AdminMicrosoft365Apps) { + m := &AdminMicrosoft365Apps{ + Entity: *NewEntity(), + } + return m +} +// CreateAdminMicrosoft365AppsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAdminMicrosoft365AppsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAdminMicrosoft365Apps(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AdminMicrosoft365Apps) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["installationOptions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateM365AppsInstallationOptionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInstallationOptions(val.(M365AppsInstallationOptionsable)) + } + return nil + } + return res +} +// GetInstallationOptions gets the installationOptions property value. A container for tenant-level settings for Microsoft 365 applications. +func (m *AdminMicrosoft365Apps) GetInstallationOptions()(M365AppsInstallationOptionsable) { + val, err := m.GetBackingStore().Get("installationOptions") + if err != nil { + panic(err) + } + if val != nil { + return val.(M365AppsInstallationOptionsable) + } + return nil +} +// Serialize serializes information the current object +func (m *AdminMicrosoft365Apps) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("installationOptions", m.GetInstallationOptions()) + if err != nil { + return err + } + } + return nil +} +// SetInstallationOptions sets the installationOptions property value. A container for tenant-level settings for Microsoft 365 applications. +func (m *AdminMicrosoft365Apps) SetInstallationOptions(value M365AppsInstallationOptionsable)() { + err := m.GetBackingStore().Set("installationOptions", value) + if err != nil { + panic(err) + } +} +// AdminMicrosoft365Appsable +type AdminMicrosoft365Appsable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetInstallationOptions()(M365AppsInstallationOptionsable) + SetInstallationOptions(value M365AppsInstallationOptionsable)() +} diff --git a/models/admin_windows.go b/models/admin_windows.go new file mode 100644 index 00000000000..cdd938a9b06 --- /dev/null +++ b/models/admin_windows.go @@ -0,0 +1,75 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AdminWindows +type AdminWindows struct { + Entity +} +// NewAdminWindows instantiates a new adminWindows and sets the default values. +func NewAdminWindows()(*AdminWindows) { + m := &AdminWindows{ + Entity: *NewEntity(), + } + return m +} +// CreateAdminWindowsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAdminWindowsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAdminWindows(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AdminWindows) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["updates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAdminWindowsUpdatesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUpdates(val.(AdminWindowsUpdatesable)) + } + return nil + } + return res +} +// GetUpdates gets the updates property value. Entity that acts as a container for all Windows Update for Business deployment service functionalities. Read-only. +func (m *AdminWindows) GetUpdates()(AdminWindowsUpdatesable) { + val, err := m.GetBackingStore().Get("updates") + if err != nil { + panic(err) + } + if val != nil { + return val.(AdminWindowsUpdatesable) + } + return nil +} +// Serialize serializes information the current object +func (m *AdminWindows) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("updates", m.GetUpdates()) + if err != nil { + return err + } + } + return nil +} +// SetUpdates sets the updates property value. Entity that acts as a container for all Windows Update for Business deployment service functionalities. Read-only. +func (m *AdminWindows) SetUpdates(value AdminWindowsUpdatesable)() { + err := m.GetBackingStore().Set("updates", value) + if err != nil { + panic(err) + } +} +// AdminWindowsable +type AdminWindowsable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetUpdates()(AdminWindowsUpdatesable) + SetUpdates(value AdminWindowsUpdatesable)() +} diff --git a/models/apps_installation_options_for_mac.go b/models/apps_installation_options_for_mac.go new file mode 100644 index 00000000000..65a8fb2c39f --- /dev/null +++ b/models/apps_installation_options_for_mac.go @@ -0,0 +1,182 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +// AppsInstallationOptionsForMac +type AppsInstallationOptionsForMac struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewAppsInstallationOptionsForMac instantiates a new appsInstallationOptionsForMac and sets the default values. +func NewAppsInstallationOptionsForMac()(*AppsInstallationOptionsForMac) { + m := &AppsInstallationOptionsForMac{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateAppsInstallationOptionsForMacFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAppsInstallationOptionsForMacFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAppsInstallationOptionsForMac(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *AppsInstallationOptionsForMac) GetAdditionalData()(map[string]any) { + val , err := m.backingStore.Get("additionalData") + if err != nil { + panic(err) + } + if val == nil { + var value = make(map[string]any); + m.SetAdditionalData(value); + } + return val.(map[string]any) +} +// GetBackingStore gets the BackingStore property value. Stores model information. +func (m *AppsInstallationOptionsForMac) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AppsInstallationOptionsForMac) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["isMicrosoft365AppsEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsMicrosoft365AppsEnabled(val) + } + return nil + } + res["isSkypeForBusinessEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsSkypeForBusinessEnabled(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 +} +// GetIsMicrosoft365AppsEnabled gets the isMicrosoft365AppsEnabled property value. Specifies whether users can install Microsoft 365 apps on their MAC devices. The default value is true. +func (m *AppsInstallationOptionsForMac) GetIsMicrosoft365AppsEnabled()(*bool) { + val, err := m.GetBackingStore().Get("isMicrosoft365AppsEnabled") + if err != nil { + panic(err) + } + if val != nil { + return val.(*bool) + } + return nil +} +// GetIsSkypeForBusinessEnabled gets the isSkypeForBusinessEnabled property value. Specifies whether users can install Skype for Business on their MAC devices running OS X El Capitan 10.11 or later. The default value is true. +func (m *AppsInstallationOptionsForMac) GetIsSkypeForBusinessEnabled()(*bool) { + val, err := m.GetBackingStore().Get("isSkypeForBusinessEnabled") + if err != nil { + panic(err) + } + if val != nil { + return val.(*bool) + } + return nil +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AppsInstallationOptionsForMac) 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 *AppsInstallationOptionsForMac) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("isMicrosoft365AppsEnabled", m.GetIsMicrosoft365AppsEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isSkypeForBusinessEnabled", m.GetIsSkypeForBusinessEnabled()) + 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 *AppsInstallationOptionsForMac) 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 *AppsInstallationOptionsForMac) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetIsMicrosoft365AppsEnabled sets the isMicrosoft365AppsEnabled property value. Specifies whether users can install Microsoft 365 apps on their MAC devices. The default value is true. +func (m *AppsInstallationOptionsForMac) SetIsMicrosoft365AppsEnabled(value *bool)() { + err := m.GetBackingStore().Set("isMicrosoft365AppsEnabled", value) + if err != nil { + panic(err) + } +} +// SetIsSkypeForBusinessEnabled sets the isSkypeForBusinessEnabled property value. Specifies whether users can install Skype for Business on their MAC devices running OS X El Capitan 10.11 or later. The default value is true. +func (m *AppsInstallationOptionsForMac) SetIsSkypeForBusinessEnabled(value *bool)() { + err := m.GetBackingStore().Set("isSkypeForBusinessEnabled", value) + if err != nil { + panic(err) + } +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AppsInstallationOptionsForMac) SetOdataType(value *string)() { + err := m.GetBackingStore().Set("odataType", value) + if err != nil { + panic(err) + } +} +// AppsInstallationOptionsForMacable +type AppsInstallationOptionsForMacable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetIsMicrosoft365AppsEnabled()(*bool) + GetIsSkypeForBusinessEnabled()(*bool) + GetOdataType()(*string) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetIsMicrosoft365AppsEnabled(value *bool)() + SetIsSkypeForBusinessEnabled(value *bool)() + SetOdataType(value *string)() +} diff --git a/models/apps_installation_options_for_windows.go b/models/apps_installation_options_for_windows.go new file mode 100644 index 00000000000..914471a6d7c --- /dev/null +++ b/models/apps_installation_options_for_windows.go @@ -0,0 +1,254 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +// AppsInstallationOptionsForWindows +type AppsInstallationOptionsForWindows struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewAppsInstallationOptionsForWindows instantiates a new appsInstallationOptionsForWindows and sets the default values. +func NewAppsInstallationOptionsForWindows()(*AppsInstallationOptionsForWindows) { + m := &AppsInstallationOptionsForWindows{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateAppsInstallationOptionsForWindowsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAppsInstallationOptionsForWindowsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAppsInstallationOptionsForWindows(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *AppsInstallationOptionsForWindows) GetAdditionalData()(map[string]any) { + val , err := m.backingStore.Get("additionalData") + if err != nil { + panic(err) + } + if val == nil { + var value = make(map[string]any); + m.SetAdditionalData(value); + } + return val.(map[string]any) +} +// GetBackingStore gets the BackingStore property value. Stores model information. +func (m *AppsInstallationOptionsForWindows) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AppsInstallationOptionsForWindows) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["isMicrosoft365AppsEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsMicrosoft365AppsEnabled(val) + } + return nil + } + res["isProjectEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsProjectEnabled(val) + } + return nil + } + res["isSkypeForBusinessEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsSkypeForBusinessEnabled(val) + } + return nil + } + res["isVisioEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsVisioEnabled(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 +} +// GetIsMicrosoft365AppsEnabled gets the isMicrosoft365AppsEnabled property value. Specifies whether users can install Microsoft 365 apps, including Skype for Business, on their Windows devices. The default value is true. +func (m *AppsInstallationOptionsForWindows) GetIsMicrosoft365AppsEnabled()(*bool) { + val, err := m.GetBackingStore().Get("isMicrosoft365AppsEnabled") + if err != nil { + panic(err) + } + if val != nil { + return val.(*bool) + } + return nil +} +// GetIsProjectEnabled gets the isProjectEnabled property value. Specifies whether users can install Microsoft Project on their Windows devices. The default value is true. +func (m *AppsInstallationOptionsForWindows) GetIsProjectEnabled()(*bool) { + val, err := m.GetBackingStore().Get("isProjectEnabled") + if err != nil { + panic(err) + } + if val != nil { + return val.(*bool) + } + return nil +} +// GetIsSkypeForBusinessEnabled gets the isSkypeForBusinessEnabled property value. Specifies whether users can install Skype for Business (standalone) on their Windows devices. The default value is true. +func (m *AppsInstallationOptionsForWindows) GetIsSkypeForBusinessEnabled()(*bool) { + val, err := m.GetBackingStore().Get("isSkypeForBusinessEnabled") + if err != nil { + panic(err) + } + if val != nil { + return val.(*bool) + } + return nil +} +// GetIsVisioEnabled gets the isVisioEnabled property value. Specifies whether users can install Visio on their Windows devices. The default value is true. +func (m *AppsInstallationOptionsForWindows) GetIsVisioEnabled()(*bool) { + val, err := m.GetBackingStore().Get("isVisioEnabled") + if err != nil { + panic(err) + } + if val != nil { + return val.(*bool) + } + return nil +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AppsInstallationOptionsForWindows) 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 *AppsInstallationOptionsForWindows) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("isMicrosoft365AppsEnabled", m.GetIsMicrosoft365AppsEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isProjectEnabled", m.GetIsProjectEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isSkypeForBusinessEnabled", m.GetIsSkypeForBusinessEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isVisioEnabled", m.GetIsVisioEnabled()) + 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 *AppsInstallationOptionsForWindows) 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 *AppsInstallationOptionsForWindows) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetIsMicrosoft365AppsEnabled sets the isMicrosoft365AppsEnabled property value. Specifies whether users can install Microsoft 365 apps, including Skype for Business, on their Windows devices. The default value is true. +func (m *AppsInstallationOptionsForWindows) SetIsMicrosoft365AppsEnabled(value *bool)() { + err := m.GetBackingStore().Set("isMicrosoft365AppsEnabled", value) + if err != nil { + panic(err) + } +} +// SetIsProjectEnabled sets the isProjectEnabled property value. Specifies whether users can install Microsoft Project on their Windows devices. The default value is true. +func (m *AppsInstallationOptionsForWindows) SetIsProjectEnabled(value *bool)() { + err := m.GetBackingStore().Set("isProjectEnabled", value) + if err != nil { + panic(err) + } +} +// SetIsSkypeForBusinessEnabled sets the isSkypeForBusinessEnabled property value. Specifies whether users can install Skype for Business (standalone) on their Windows devices. The default value is true. +func (m *AppsInstallationOptionsForWindows) SetIsSkypeForBusinessEnabled(value *bool)() { + err := m.GetBackingStore().Set("isSkypeForBusinessEnabled", value) + if err != nil { + panic(err) + } +} +// SetIsVisioEnabled sets the isVisioEnabled property value. Specifies whether users can install Visio on their Windows devices. The default value is true. +func (m *AppsInstallationOptionsForWindows) SetIsVisioEnabled(value *bool)() { + err := m.GetBackingStore().Set("isVisioEnabled", value) + if err != nil { + panic(err) + } +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AppsInstallationOptionsForWindows) SetOdataType(value *string)() { + err := m.GetBackingStore().Set("odataType", value) + if err != nil { + panic(err) + } +} +// AppsInstallationOptionsForWindowsable +type AppsInstallationOptionsForWindowsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetIsMicrosoft365AppsEnabled()(*bool) + GetIsProjectEnabled()(*bool) + GetIsSkypeForBusinessEnabled()(*bool) + GetIsVisioEnabled()(*bool) + GetOdataType()(*string) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetIsMicrosoft365AppsEnabled(value *bool)() + SetIsProjectEnabled(value *bool)() + SetIsSkypeForBusinessEnabled(value *bool)() + SetIsVisioEnabled(value *bool)() + SetOdataType(value *string)() +} diff --git a/models/apps_update_channel_type.go b/models/apps_update_channel_type.go new file mode 100644 index 00000000000..495c9088536 --- /dev/null +++ b/models/apps_update_channel_type.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// +type AppsUpdateChannelType int + +const ( + CURRENT_APPSUPDATECHANNELTYPE AppsUpdateChannelType = iota + MONTHLYENTERPRISE_APPSUPDATECHANNELTYPE + SEMIANNUAL_APPSUPDATECHANNELTYPE + UNKNOWNFUTUREVALUE_APPSUPDATECHANNELTYPE +) + +func (i AppsUpdateChannelType) String() string { + return []string{"current", "monthlyEnterprise", "semiAnnual", "unknownFutureValue"}[i] +} +func ParseAppsUpdateChannelType(v string) (any, error) { + result := CURRENT_APPSUPDATECHANNELTYPE + switch v { + case "current": + result = CURRENT_APPSUPDATECHANNELTYPE + case "monthlyEnterprise": + result = MONTHLYENTERPRISE_APPSUPDATECHANNELTYPE + case "semiAnnual": + result = SEMIANNUAL_APPSUPDATECHANNELTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_APPSUPDATECHANNELTYPE + default: + return 0, errors.New("Unknown AppsUpdateChannelType value: " + v) + } + return &result, nil +} +func SerializeAppsUpdateChannelType(values []AppsUpdateChannelType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i AppsUpdateChannelType) isMultiValue() bool { + return false +} diff --git a/models/attendee_notification_info.go b/models/attendee_notification_info.go new file mode 100644 index 00000000000..3ea933a81fc --- /dev/null +++ b/models/attendee_notification_info.go @@ -0,0 +1,182 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +// AttendeeNotificationInfo +type AttendeeNotificationInfo struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewAttendeeNotificationInfo instantiates a new attendeeNotificationInfo and sets the default values. +func NewAttendeeNotificationInfo()(*AttendeeNotificationInfo) { + m := &AttendeeNotificationInfo{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateAttendeeNotificationInfoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAttendeeNotificationInfoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAttendeeNotificationInfo(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *AttendeeNotificationInfo) GetAdditionalData()(map[string]any) { + val , err := m.backingStore.Get("additionalData") + if err != nil { + panic(err) + } + if val == nil { + var value = make(map[string]any); + m.SetAdditionalData(value); + } + return val.(map[string]any) +} +// GetBackingStore gets the BackingStore property value. Stores model information. +func (m *AttendeeNotificationInfo) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AttendeeNotificationInfo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["@odata.type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOdataType(val) + } + return nil + } + res["phoneNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPhoneNumber(val) + } + return nil + } + res["timeZone"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTimeZone(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AttendeeNotificationInfo) GetOdataType()(*string) { + val, err := m.GetBackingStore().Get("odataType") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetPhoneNumber gets the phoneNumber property value. The phoneNumber property +func (m *AttendeeNotificationInfo) GetPhoneNumber()(*string) { + val, err := m.GetBackingStore().Get("phoneNumber") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetTimeZone gets the timeZone property value. The timeZone property +func (m *AttendeeNotificationInfo) GetTimeZone()(*string) { + val, err := m.GetBackingStore().Get("timeZone") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// Serialize serializes information the current object +func (m *AttendeeNotificationInfo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("phoneNumber", m.GetPhoneNumber()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("timeZone", m.GetTimeZone()) + 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 *AttendeeNotificationInfo) 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 *AttendeeNotificationInfo) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AttendeeNotificationInfo) SetOdataType(value *string)() { + err := m.GetBackingStore().Set("odataType", value) + if err != nil { + panic(err) + } +} +// SetPhoneNumber sets the phoneNumber property value. The phoneNumber property +func (m *AttendeeNotificationInfo) SetPhoneNumber(value *string)() { + err := m.GetBackingStore().Set("phoneNumber", value) + if err != nil { + panic(err) + } +} +// SetTimeZone sets the timeZone property value. The timeZone property +func (m *AttendeeNotificationInfo) SetTimeZone(value *string)() { + err := m.GetBackingStore().Set("timeZone", value) + if err != nil { + panic(err) + } +} +// AttendeeNotificationInfoable +type AttendeeNotificationInfoable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetOdataType()(*string) + GetPhoneNumber()(*string) + GetTimeZone()(*string) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetOdataType(value *string)() + SetPhoneNumber(value *string)() + SetTimeZone(value *string)() +} diff --git a/models/authentication_event_listener.go b/models/authentication_event_listener.go index 4bf684ff7db..96788030737 100644 --- a/models/authentication_event_listener.go +++ b/models/authentication_event_listener.go @@ -31,6 +31,10 @@ func CreateAuthenticationEventListenerFromDiscriminatorValue(parseNode i878a80d2 switch *mappingValue { case "#microsoft.graph.onAttributeCollectionListener": return NewOnAttributeCollectionListener(), nil + case "#microsoft.graph.onAttributeCollectionStartListener": + return NewOnAttributeCollectionStartListener(), nil + case "#microsoft.graph.onAttributeCollectionSubmitListener": + return NewOnAttributeCollectionSubmitListener(), nil case "#microsoft.graph.onAuthenticationMethodLoadStartListener": return NewOnAuthenticationMethodLoadStartListener(), nil case "#microsoft.graph.onInteractiveAuthFlowStartListener": diff --git a/models/azure_a_d_join_policy.go b/models/azure_a_d_join_policy.go index f2e6ac51b29..c8d644860a3 100644 --- a/models/azure_a_d_join_policy.go +++ b/models/azure_a_d_join_policy.go @@ -34,7 +34,7 @@ func (m *AzureADJoinPolicy) GetAdditionalData()(map[string]any) { } return val.(map[string]any) } -// GetAllowedToJoin gets the allowedToJoin property value. The allowedToJoin property +// GetAllowedToJoin gets the allowedToJoin property value. Determines if Microsoft Entra join is allowed. func (m *AzureADJoinPolicy) GetAllowedToJoin()(DeviceRegistrationMembershipable) { val, err := m.GetBackingStore().Get("allowedToJoin") if err != nil { @@ -84,7 +84,7 @@ func (m *AzureADJoinPolicy) GetFieldDeserializers()(map[string]func(i878a80d2330 } return res } -// GetIsAdminConfigurable gets the isAdminConfigurable property value. Specifies whether this policy scope is configurable by the admin. The default value is false. When an admin has enabled Intune (MEM) to manage devices, this property is set to false and appliesTo defaults to 1 (meaning all). +// GetIsAdminConfigurable gets the isAdminConfigurable property value. Determines if administrators can modify this policy. func (m *AzureADJoinPolicy) GetIsAdminConfigurable()(*bool) { val, err := m.GetBackingStore().Get("isAdminConfigurable") if err != nil { @@ -141,7 +141,7 @@ func (m *AzureADJoinPolicy) SetAdditionalData(value map[string]any)() { panic(err) } } -// SetAllowedToJoin sets the allowedToJoin property value. The allowedToJoin property +// SetAllowedToJoin sets the allowedToJoin property value. Determines if Microsoft Entra join is allowed. func (m *AzureADJoinPolicy) SetAllowedToJoin(value DeviceRegistrationMembershipable)() { err := m.GetBackingStore().Set("allowedToJoin", value) if err != nil { @@ -152,7 +152,7 @@ func (m *AzureADJoinPolicy) SetAllowedToJoin(value DeviceRegistrationMembershipa func (m *AzureADJoinPolicy) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { m.backingStore = value } -// SetIsAdminConfigurable sets the isAdminConfigurable property value. Specifies whether this policy scope is configurable by the admin. The default value is false. When an admin has enabled Intune (MEM) to manage devices, this property is set to false and appliesTo defaults to 1 (meaning all). +// SetIsAdminConfigurable sets the isAdminConfigurable property value. Determines if administrators can modify this policy. func (m *AzureADJoinPolicy) SetIsAdminConfigurable(value *bool)() { err := m.GetBackingStore().Set("isAdminConfigurable", value) if err != nil { diff --git a/models/azure_a_d_registration_policy.go b/models/azure_a_d_registration_policy.go index e2c6b67e3eb..a08c63b2185 100644 --- a/models/azure_a_d_registration_policy.go +++ b/models/azure_a_d_registration_policy.go @@ -34,7 +34,7 @@ func (m *AzureADRegistrationPolicy) GetAdditionalData()(map[string]any) { } return val.(map[string]any) } -// GetAllowedToRegister gets the allowedToRegister property value. The allowedToRegister property +// GetAllowedToRegister gets the allowedToRegister property value. Determines if Microsoft Entra registered is allowed. func (m *AzureADRegistrationPolicy) GetAllowedToRegister()(DeviceRegistrationMembershipable) { val, err := m.GetBackingStore().Get("allowedToRegister") if err != nil { @@ -84,7 +84,7 @@ func (m *AzureADRegistrationPolicy) GetFieldDeserializers()(map[string]func(i878 } return res } -// GetIsAdminConfigurable gets the isAdminConfigurable property value. Specifies whether this policy scope is configurable by the admin. The default value is false. When an admin has enabled Intune (MEM) to manage devices, this property is set to false and appliesTo defaults to 1 (meaning all). +// GetIsAdminConfigurable gets the isAdminConfigurable property value. Determines if administrators can modify this policy. func (m *AzureADRegistrationPolicy) GetIsAdminConfigurable()(*bool) { val, err := m.GetBackingStore().Get("isAdminConfigurable") if err != nil { @@ -141,7 +141,7 @@ func (m *AzureADRegistrationPolicy) SetAdditionalData(value map[string]any)() { panic(err) } } -// SetAllowedToRegister sets the allowedToRegister property value. The allowedToRegister property +// SetAllowedToRegister sets the allowedToRegister property value. Determines if Microsoft Entra registered is allowed. func (m *AzureADRegistrationPolicy) SetAllowedToRegister(value DeviceRegistrationMembershipable)() { err := m.GetBackingStore().Set("allowedToRegister", value) if err != nil { @@ -152,7 +152,7 @@ func (m *AzureADRegistrationPolicy) SetAllowedToRegister(value DeviceRegistratio func (m *AzureADRegistrationPolicy) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { m.backingStore = value } -// SetIsAdminConfigurable sets the isAdminConfigurable property value. Specifies whether this policy scope is configurable by the admin. The default value is false. When an admin has enabled Intune (MEM) to manage devices, this property is set to false and appliesTo defaults to 1 (meaning all). +// SetIsAdminConfigurable sets the isAdminConfigurable property value. Determines if administrators can modify this policy. func (m *AzureADRegistrationPolicy) SetIsAdminConfigurable(value *bool)() { err := m.GetBackingStore().Set("isAdminConfigurable", value) if err != nil { diff --git a/models/booking_appointment.go b/models/booking_appointment.go index a240cdc700f..e9a4342174b 100644 --- a/models/booking_appointment.go +++ b/models/booking_appointment.go @@ -1,6 +1,7 @@ package models import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) @@ -41,6 +42,28 @@ func (m *BookingAppointment) GetAnonymousJoinWebUrl()(*string) { } return nil } +// GetAppointmentLabel gets the appointmentLabel property value. Custom label that can be stamped on this appointment by users. +func (m *BookingAppointment) GetAppointmentLabel()(*string) { + val, err := m.GetBackingStore().Get("appointmentLabel") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetCreatedDateTime gets the createdDateTime property value. The createdDateTime property +func (m *BookingAppointment) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + val, err := m.GetBackingStore().Get("createdDateTime") + if err != nil { + panic(err) + } + if val != nil { + return val.(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + } + return nil +} // GetCustomerEmailAddress gets the customerEmailAddress property value. The SMTP address of the bookingCustomer who is booking the appointment. func (m *BookingAppointment) GetCustomerEmailAddress()(*string) { val, err := m.GetBackingStore().Get("customerEmailAddress") @@ -174,6 +197,26 @@ func (m *BookingAppointment) GetFieldDeserializers()(map[string]func(i878a80d233 } return nil } + res["appointmentLabel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAppointmentLabel(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["customerEmailAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -360,6 +403,16 @@ func (m *BookingAppointment) GetFieldDeserializers()(map[string]func(i878a80d233 } return nil } + res["lastUpdatedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastUpdatedDateTime(val) + } + return nil + } res["maximumAttendeesCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetInt32Value() if err != nil { @@ -622,6 +675,17 @@ func (m *BookingAppointment) GetJoinWebUrl()(*string) { } return nil } +// GetLastUpdatedDateTime gets the lastUpdatedDateTime property value. The lastUpdatedDateTime property +func (m *BookingAppointment) GetLastUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + val, err := m.GetBackingStore().Get("lastUpdatedDateTime") + if err != nil { + panic(err) + } + if val != nil { + return val.(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + } + return nil +} // GetMaximumAttendeesCount gets the maximumAttendeesCount property value. The maximum number of customers allowed in an appointment. If maximumAttendeesCount of the service is greater than 1, pass valid customer IDs while creating or updating an appointment. To create a customer, use the Create bookingCustomer operation. func (m *BookingAppointment) GetMaximumAttendeesCount()(*int32) { val, err := m.GetBackingStore().Get("maximumAttendeesCount") @@ -816,6 +880,18 @@ func (m *BookingAppointment) Serialize(writer i878a80d2330e89d26896388a3f487eef2 return err } } + { + err = writer.WriteStringValue("appointmentLabel", m.GetAppointmentLabel()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } { err = writer.WriteStringValue("customerEmailAddress", m.GetCustomerEmailAddress()) if err != nil { @@ -919,6 +995,12 @@ func (m *BookingAppointment) Serialize(writer i878a80d2330e89d26896388a3f487eef2 return err } } + { + err = writer.WriteTimeValue("lastUpdatedDateTime", m.GetLastUpdatedDateTime()) + if err != nil { + return err + } + } { err = writer.WriteInt32Value("maximumAttendeesCount", m.GetMaximumAttendeesCount()) if err != nil { @@ -1038,6 +1120,20 @@ func (m *BookingAppointment) SetAnonymousJoinWebUrl(value *string)() { panic(err) } } +// SetAppointmentLabel sets the appointmentLabel property value. Custom label that can be stamped on this appointment by users. +func (m *BookingAppointment) SetAppointmentLabel(value *string)() { + err := m.GetBackingStore().Set("appointmentLabel", value) + if err != nil { + panic(err) + } +} +// SetCreatedDateTime sets the createdDateTime property value. The createdDateTime property +func (m *BookingAppointment) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + err := m.GetBackingStore().Set("createdDateTime", value) + if err != nil { + panic(err) + } +} // SetCustomerEmailAddress sets the customerEmailAddress property value. The SMTP address of the bookingCustomer who is booking the appointment. func (m *BookingAppointment) SetCustomerEmailAddress(value *string)() { err := m.GetBackingStore().Set("customerEmailAddress", value) @@ -1164,6 +1260,13 @@ func (m *BookingAppointment) SetJoinWebUrl(value *string)() { panic(err) } } +// SetLastUpdatedDateTime sets the lastUpdatedDateTime property value. The lastUpdatedDateTime property +func (m *BookingAppointment) SetLastUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + err := m.GetBackingStore().Set("lastUpdatedDateTime", value) + if err != nil { + panic(err) + } +} // SetMaximumAttendeesCount sets the maximumAttendeesCount property value. The maximum number of customers allowed in an appointment. If maximumAttendeesCount of the service is greater than 1, pass valid customer IDs while creating or updating an appointment. To create a customer, use the Create bookingCustomer operation. func (m *BookingAppointment) SetMaximumAttendeesCount(value *int32)() { err := m.GetBackingStore().Set("maximumAttendeesCount", value) @@ -1282,6 +1385,8 @@ type BookingAppointmentable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetAdditionalInformation()(*string) GetAnonymousJoinWebUrl()(*string) + GetAppointmentLabel()(*string) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) GetCustomerEmailAddress()(*string) GetCustomerId()(*string) GetCustomerLocation()(Locationable) @@ -1300,6 +1405,7 @@ type BookingAppointmentable interface { GetInvoiceUrl()(*string) GetIsLocationOnline()(*bool) GetJoinWebUrl()(*string) + GetLastUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) GetMaximumAttendeesCount()(*int32) GetOnlineMeetingUrl()(*string) GetOptOutOfCustomerEmail()(*bool) @@ -1318,6 +1424,8 @@ type BookingAppointmentable interface { GetStart()(DateTimeTimeZoneable) SetAdditionalInformation(value *string)() SetAnonymousJoinWebUrl(value *string)() + SetAppointmentLabel(value *string)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() SetCustomerEmailAddress(value *string)() SetCustomerId(value *string)() SetCustomerLocation(value Locationable)() @@ -1336,6 +1444,7 @@ type BookingAppointmentable interface { SetInvoiceUrl(value *string)() SetIsLocationOnline(value *bool)() SetJoinWebUrl(value *string)() + SetLastUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() SetMaximumAttendeesCount(value *int32)() SetOnlineMeetingUrl(value *string)() SetOptOutOfCustomerEmail(value *bool)() diff --git a/models/booking_business.go b/models/booking_business.go index 5152ba2326e..ab445fe56a0 100644 --- a/models/booking_business.go +++ b/models/booking_business.go @@ -1,6 +1,7 @@ package models import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) @@ -43,6 +44,17 @@ func (m *BookingBusiness) GetAppointments()([]BookingAppointmentable) { } return nil } +// GetBookingPageSettings gets the bookingPageSettings property value. The bookingPageSettings property +func (m *BookingBusiness) GetBookingPageSettings()(BookingPageSettingsable) { + val, err := m.GetBackingStore().Get("bookingPageSettings") + if err != nil { + panic(err) + } + if val != nil { + return val.(BookingPageSettingsable) + } + return nil +} // GetBusinessHours gets the businessHours property value. The hours of operation for the business. func (m *BookingBusiness) GetBusinessHours()([]BookingWorkHoursable) { val, err := m.GetBackingStore().Get("businessHours") @@ -76,6 +88,17 @@ func (m *BookingBusiness) GetCalendarView()([]BookingAppointmentable) { } return nil } +// GetCreatedDateTime gets the createdDateTime property value. The createdDateTime property +func (m *BookingBusiness) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + val, err := m.GetBackingStore().Get("createdDateTime") + if err != nil { + panic(err) + } + if val != nil { + return val.(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + } + return nil +} // GetCustomers gets the customers property value. All the customers of this business. Read-only. Nullable. func (m *BookingBusiness) GetCustomers()([]BookingCustomerable) { val, err := m.GetBackingStore().Get("customers") @@ -149,6 +172,16 @@ func (m *BookingBusiness) GetFieldDeserializers()(map[string]func(i878a80d2330e8 } return nil } + res["bookingPageSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateBookingPageSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetBookingPageSettings(val.(BookingPageSettingsable)) + } + return nil + } res["businessHours"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetCollectionOfObjectValues(CreateBookingWorkHoursFromDiscriminatorValue) if err != nil { @@ -191,6 +224,16 @@ func (m *BookingBusiness) GetFieldDeserializers()(map[string]func(i878a80d2330e8 } 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["customers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetCollectionOfObjectValues(CreateBookingCustomerFromDiscriminatorValue) if err != nil { @@ -263,6 +306,16 @@ func (m *BookingBusiness) GetFieldDeserializers()(map[string]func(i878a80d2330e8 } return nil } + res["lastUpdatedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastUpdatedDateTime(val) + } + return nil + } res["phone"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -359,6 +412,17 @@ func (m *BookingBusiness) GetLanguageTag()(*string) { } return nil } +// GetLastUpdatedDateTime gets the lastUpdatedDateTime property value. The lastUpdatedDateTime property +func (m *BookingBusiness) GetLastUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + val, err := m.GetBackingStore().Get("lastUpdatedDateTime") + if err != nil { + panic(err) + } + if val != nil { + return val.(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + } + return nil +} // GetPhone gets the phone property value. The telephone number for the business. The phone property, together with address and webSiteUrl, appear in the footer of a business scheduling page. func (m *BookingBusiness) GetPhone()(*string) { val, err := m.GetBackingStore().Get("phone") @@ -449,6 +513,12 @@ func (m *BookingBusiness) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0 return err } } + { + err = writer.WriteObjectValue("bookingPageSettings", m.GetBookingPageSettings()) + if err != nil { + return err + } + } if m.GetBusinessHours() != nil { cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetBusinessHours())) for i, v := range m.GetBusinessHours() { @@ -479,6 +549,12 @@ func (m *BookingBusiness) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0 return err } } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } if m.GetCustomers() != nil { cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCustomers())) for i, v := range m.GetCustomers() { @@ -521,6 +597,12 @@ func (m *BookingBusiness) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0 return err } } + { + err = writer.WriteTimeValue("lastUpdatedDateTime", m.GetLastUpdatedDateTime()) + if err != nil { + return err + } + } { err = writer.WriteStringValue("phone", m.GetPhone()) if err != nil { @@ -579,6 +661,13 @@ func (m *BookingBusiness) SetAppointments(value []BookingAppointmentable)() { panic(err) } } +// SetBookingPageSettings sets the bookingPageSettings property value. The bookingPageSettings property +func (m *BookingBusiness) SetBookingPageSettings(value BookingPageSettingsable)() { + err := m.GetBackingStore().Set("bookingPageSettings", value) + if err != nil { + panic(err) + } +} // SetBusinessHours sets the businessHours property value. The hours of operation for the business. func (m *BookingBusiness) SetBusinessHours(value []BookingWorkHoursable)() { err := m.GetBackingStore().Set("businessHours", value) @@ -600,6 +689,13 @@ func (m *BookingBusiness) SetCalendarView(value []BookingAppointmentable)() { panic(err) } } +// SetCreatedDateTime sets the createdDateTime property value. The createdDateTime property +func (m *BookingBusiness) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + err := m.GetBackingStore().Set("createdDateTime", value) + if err != nil { + panic(err) + } +} // SetCustomers sets the customers property value. All the customers of this business. Read-only. Nullable. func (m *BookingBusiness) SetCustomers(value []BookingCustomerable)() { err := m.GetBackingStore().Set("customers", value) @@ -642,6 +738,13 @@ func (m *BookingBusiness) SetLanguageTag(value *string)() { panic(err) } } +// SetLastUpdatedDateTime sets the lastUpdatedDateTime property value. The lastUpdatedDateTime property +func (m *BookingBusiness) SetLastUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + err := m.GetBackingStore().Set("lastUpdatedDateTime", value) + if err != nil { + panic(err) + } +} // SetPhone sets the phone property value. The telephone number for the business. The phone property, together with address and webSiteUrl, appear in the footer of a business scheduling page. func (m *BookingBusiness) SetPhone(value *string)() { err := m.GetBackingStore().Set("phone", value) @@ -690,15 +793,18 @@ type BookingBusinessable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetAddress()(PhysicalAddressable) GetAppointments()([]BookingAppointmentable) + GetBookingPageSettings()(BookingPageSettingsable) GetBusinessHours()([]BookingWorkHoursable) GetBusinessType()(*string) GetCalendarView()([]BookingAppointmentable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) GetCustomers()([]BookingCustomerable) GetCustomQuestions()([]BookingCustomQuestionable) GetDefaultCurrencyIso()(*string) GetEmail()(*string) GetIsPublished()(*bool) GetLanguageTag()(*string) + GetLastUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) GetPhone()(*string) GetPublicUrl()(*string) GetSchedulingPolicy()(BookingSchedulingPolicyable) @@ -707,15 +813,18 @@ type BookingBusinessable interface { GetWebSiteUrl()(*string) SetAddress(value PhysicalAddressable)() SetAppointments(value []BookingAppointmentable)() + SetBookingPageSettings(value BookingPageSettingsable)() SetBusinessHours(value []BookingWorkHoursable)() SetBusinessType(value *string)() SetCalendarView(value []BookingAppointmentable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() SetCustomers(value []BookingCustomerable)() SetCustomQuestions(value []BookingCustomQuestionable)() SetDefaultCurrencyIso(value *string)() SetEmail(value *string)() SetIsPublished(value *bool)() SetLanguageTag(value *string)() + SetLastUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() SetPhone(value *string)() SetPublicUrl(value *string)() SetSchedulingPolicy(value BookingSchedulingPolicyable)() diff --git a/models/booking_custom_question.go b/models/booking_custom_question.go index df02ae7d002..143ce0ce51a 100644 --- a/models/booking_custom_question.go +++ b/models/booking_custom_question.go @@ -1,6 +1,7 @@ package models import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) @@ -41,6 +42,17 @@ func (m *BookingCustomQuestion) GetAnswerOptions()([]string) { } return nil } +// GetCreatedDateTime gets the createdDateTime property value. The createdDateTime property +func (m *BookingCustomQuestion) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + val, err := m.GetBackingStore().Get("createdDateTime") + if err != nil { + panic(err) + } + if val != nil { + return val.(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + } + return nil +} // GetDisplayName gets the displayName property value. Display name of this entity. func (m *BookingCustomQuestion) GetDisplayName()(*string) { val, err := m.GetBackingStore().Get("displayName") @@ -81,6 +93,16 @@ func (m *BookingCustomQuestion) GetFieldDeserializers()(map[string]func(i878a80d } 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["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -91,8 +113,29 @@ func (m *BookingCustomQuestion) GetFieldDeserializers()(map[string]func(i878a80d } return nil } + res["lastUpdatedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastUpdatedDateTime(val) + } + return nil + } return res } +// GetLastUpdatedDateTime gets the lastUpdatedDateTime property value. The lastUpdatedDateTime property +func (m *BookingCustomQuestion) GetLastUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + val, err := m.GetBackingStore().Get("lastUpdatedDateTime") + if err != nil { + panic(err) + } + if val != nil { + return val.(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + } + return nil +} // Serialize serializes information the current object func (m *BookingCustomQuestion) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { err := m.Entity.Serialize(writer) @@ -112,12 +155,24 @@ func (m *BookingCustomQuestion) Serialize(writer i878a80d2330e89d26896388a3f487e return err } } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } { err = writer.WriteStringValue("displayName", m.GetDisplayName()) if err != nil { return err } } + { + err = writer.WriteTimeValue("lastUpdatedDateTime", m.GetLastUpdatedDateTime()) + if err != nil { + return err + } + } return nil } // SetAnswerInputType sets the answerInputType property value. The expected answer type. The possible values are: text, radioButton, unknownFutureValue. @@ -134,6 +189,13 @@ func (m *BookingCustomQuestion) SetAnswerOptions(value []string)() { panic(err) } } +// SetCreatedDateTime sets the createdDateTime property value. The createdDateTime property +func (m *BookingCustomQuestion) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + err := m.GetBackingStore().Set("createdDateTime", value) + if err != nil { + panic(err) + } +} // SetDisplayName sets the displayName property value. Display name of this entity. func (m *BookingCustomQuestion) SetDisplayName(value *string)() { err := m.GetBackingStore().Set("displayName", value) @@ -141,14 +203,25 @@ func (m *BookingCustomQuestion) SetDisplayName(value *string)() { panic(err) } } +// SetLastUpdatedDateTime sets the lastUpdatedDateTime property value. The lastUpdatedDateTime property +func (m *BookingCustomQuestion) SetLastUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + err := m.GetBackingStore().Set("lastUpdatedDateTime", value) + if err != nil { + panic(err) + } +} // BookingCustomQuestionable type BookingCustomQuestionable interface { Entityable i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetAnswerInputType()(*AnswerInputType) GetAnswerOptions()([]string) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) GetDisplayName()(*string) + GetLastUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) SetAnswerInputType(value *AnswerInputType)() SetAnswerOptions(value []string)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() SetDisplayName(value *string)() + SetLastUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() } diff --git a/models/booking_customer.go b/models/booking_customer.go index 18a9e70ba43..121d93b4a88 100644 --- a/models/booking_customer.go +++ b/models/booking_customer.go @@ -1,6 +1,7 @@ package models import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) @@ -30,6 +31,17 @@ func (m *BookingCustomer) GetAddresses()([]PhysicalAddressable) { } return nil } +// GetCreatedDateTime gets the createdDateTime property value. The createdDateTime property +func (m *BookingCustomer) 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 func (m *BookingCustomer) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := m.BookingPerson.GetFieldDeserializers() @@ -49,6 +61,26 @@ func (m *BookingCustomer) GetFieldDeserializers()(map[string]func(i878a80d2330e8 } 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["lastUpdatedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastUpdatedDateTime(val) + } + return nil + } res["phones"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetCollectionOfObjectValues(CreatePhoneFromDiscriminatorValue) if err != nil { @@ -67,6 +99,17 @@ func (m *BookingCustomer) GetFieldDeserializers()(map[string]func(i878a80d2330e8 } return res } +// GetLastUpdatedDateTime gets the lastUpdatedDateTime property value. The lastUpdatedDateTime property +func (m *BookingCustomer) GetLastUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + val, err := m.GetBackingStore().Get("lastUpdatedDateTime") + if err != nil { + panic(err) + } + if val != nil { + return val.(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + } + return nil +} // GetPhones gets the phones property value. Phone numbers associated with the customer, including home, business and mobile numbers. func (m *BookingCustomer) GetPhones()([]Phoneable) { val, err := m.GetBackingStore().Get("phones") @@ -96,6 +139,18 @@ func (m *BookingCustomer) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0 return err } } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastUpdatedDateTime", m.GetLastUpdatedDateTime()) + if err != nil { + return err + } + } if m.GetPhones() != nil { cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPhones())) for i, v := range m.GetPhones() { @@ -117,6 +172,20 @@ func (m *BookingCustomer) SetAddresses(value []PhysicalAddressable)() { panic(err) } } +// SetCreatedDateTime sets the createdDateTime property value. The createdDateTime property +func (m *BookingCustomer) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + err := m.GetBackingStore().Set("createdDateTime", value) + if err != nil { + panic(err) + } +} +// SetLastUpdatedDateTime sets the lastUpdatedDateTime property value. The lastUpdatedDateTime property +func (m *BookingCustomer) SetLastUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + err := m.GetBackingStore().Set("lastUpdatedDateTime", value) + if err != nil { + panic(err) + } +} // SetPhones sets the phones property value. Phone numbers associated with the customer, including home, business and mobile numbers. func (m *BookingCustomer) SetPhones(value []Phoneable)() { err := m.GetBackingStore().Set("phones", value) @@ -129,7 +198,11 @@ type BookingCustomerable interface { BookingPersonable i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetAddresses()([]PhysicalAddressable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLastUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) GetPhones()([]Phoneable) SetAddresses(value []PhysicalAddressable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLastUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() SetPhones(value []Phoneable)() } diff --git a/models/booking_page_access_control.go b/models/booking_page_access_control.go new file mode 100644 index 00000000000..fabebe3dd59 --- /dev/null +++ b/models/booking_page_access_control.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// +type BookingPageAccessControl int + +const ( + UNRESTRICTED_BOOKINGPAGEACCESSCONTROL BookingPageAccessControl = iota + RESTRICTEDTOORGANIZATION_BOOKINGPAGEACCESSCONTROL + UNKNOWNFUTUREVALUE_BOOKINGPAGEACCESSCONTROL +) + +func (i BookingPageAccessControl) String() string { + return []string{"unrestricted", "restrictedToOrganization", "unknownFutureValue"}[i] +} +func ParseBookingPageAccessControl(v string) (any, error) { + result := UNRESTRICTED_BOOKINGPAGEACCESSCONTROL + switch v { + case "unrestricted": + result = UNRESTRICTED_BOOKINGPAGEACCESSCONTROL + case "restrictedToOrganization": + result = RESTRICTEDTOORGANIZATION_BOOKINGPAGEACCESSCONTROL + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_BOOKINGPAGEACCESSCONTROL + default: + return 0, errors.New("Unknown BookingPageAccessControl value: " + v) + } + return &result, nil +} +func SerializeBookingPageAccessControl(values []BookingPageAccessControl) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i BookingPageAccessControl) isMultiValue() bool { + return false +} diff --git a/models/booking_page_settings.go b/models/booking_page_settings.go new file mode 100644 index 00000000000..6dcc9cb5369 --- /dev/null +++ b/models/booking_page_settings.go @@ -0,0 +1,507 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +// BookingPageSettings +type BookingPageSettings struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewBookingPageSettings instantiates a new bookingPageSettings and sets the default values. +func NewBookingPageSettings()(*BookingPageSettings) { + m := &BookingPageSettings{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateBookingPageSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBookingPageSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBookingPageSettings(), nil +} +// GetAccessControl gets the accessControl property value. The accessControl property +func (m *BookingPageSettings) GetAccessControl()(*BookingPageAccessControl) { + val, err := m.GetBackingStore().Get("accessControl") + if err != nil { + panic(err) + } + if val != nil { + return val.(*BookingPageAccessControl) + } + return nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *BookingPageSettings) GetAdditionalData()(map[string]any) { + val , err := m.backingStore.Get("additionalData") + if err != nil { + panic(err) + } + if val == nil { + var value = make(map[string]any); + m.SetAdditionalData(value); + } + return val.(map[string]any) +} +// GetBackingStore gets the BackingStore property value. Stores model information. +func (m *BookingPageSettings) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetBookingPageColorCode gets the bookingPageColorCode property value. Custom color for bookings page. Value should be in Hex format. Example: `#123456`. +func (m *BookingPageSettings) GetBookingPageColorCode()(*string) { + val, err := m.GetBackingStore().Get("bookingPageColorCode") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetBusinessTimeZone gets the businessTimeZone property value. The time zone of the customer. For a list of possible values, see [dateTimeTimeZone](https://learn.microsoft.com/en-us/graph/api/resources/datetimetimezone?view=graph-rest-beta). +func (m *BookingPageSettings) GetBusinessTimeZone()(*string) { + val, err := m.GetBackingStore().Get("businessTimeZone") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetCustomerConsentMessage gets the customerConsentMessage property value. Customer consent message that is displayed in the Booking page. +func (m *BookingPageSettings) GetCustomerConsentMessage()(*string) { + val, err := m.GetBackingStore().Get("customerConsentMessage") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetEnforceOneTimePassword gets the enforceOneTimePassword property value. Enforcing One Time Password (OTP) during appointment creation. +func (m *BookingPageSettings) GetEnforceOneTimePassword()(*bool) { + val, err := m.GetBackingStore().Get("enforceOneTimePassword") + if err != nil { + panic(err) + } + if val != nil { + return val.(*bool) + } + return nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BookingPageSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["accessControl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseBookingPageAccessControl) + if err != nil { + return err + } + if val != nil { + m.SetAccessControl(val.(*BookingPageAccessControl)) + } + return nil + } + res["bookingPageColorCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBookingPageColorCode(val) + } + return nil + } + res["businessTimeZone"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBusinessTimeZone(val) + } + return nil + } + res["customerConsentMessage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomerConsentMessage(val) + } + return nil + } + res["enforceOneTimePassword"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnforceOneTimePassword(val) + } + return nil + } + res["isBusinessLogoDisplayEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsBusinessLogoDisplayEnabled(val) + } + return nil + } + res["isCustomerConsentEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsCustomerConsentEnabled(val) + } + return nil + } + res["isSearchEngineIndexabilityDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsSearchEngineIndexabilityDisabled(val) + } + return nil + } + res["isTimeSlotTimeZoneSetToBusinessTimeZone"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsTimeSlotTimeZoneSetToBusinessTimeZone(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["privacyPolicyWebUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPrivacyPolicyWebUrl(val) + } + return nil + } + res["termsAndConditionsWebUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTermsAndConditionsWebUrl(val) + } + return nil + } + return res +} +// GetIsBusinessLogoDisplayEnabled gets the isBusinessLogoDisplayEnabled property value. Enable display of business logo display on the Bookings page. +func (m *BookingPageSettings) GetIsBusinessLogoDisplayEnabled()(*bool) { + val, err := m.GetBackingStore().Get("isBusinessLogoDisplayEnabled") + if err != nil { + panic(err) + } + if val != nil { + return val.(*bool) + } + return nil +} +// GetIsCustomerConsentEnabled gets the isCustomerConsentEnabled property value. Enforces customer consent on the customer consent message before appointment is booked. +func (m *BookingPageSettings) GetIsCustomerConsentEnabled()(*bool) { + val, err := m.GetBackingStore().Get("isCustomerConsentEnabled") + if err != nil { + panic(err) + } + if val != nil { + return val.(*bool) + } + return nil +} +// GetIsSearchEngineIndexabilityDisabled gets the isSearchEngineIndexabilityDisabled property value. Disable booking page to be indexed by search engines. False by default. +func (m *BookingPageSettings) GetIsSearchEngineIndexabilityDisabled()(*bool) { + val, err := m.GetBackingStore().Get("isSearchEngineIndexabilityDisabled") + if err != nil { + panic(err) + } + if val != nil { + return val.(*bool) + } + return nil +} +// GetIsTimeSlotTimeZoneSetToBusinessTimeZone gets the isTimeSlotTimeZoneSetToBusinessTimeZone property value. If business time zone the default value for the time slots that we show in the bookings page. False by default. +func (m *BookingPageSettings) GetIsTimeSlotTimeZoneSetToBusinessTimeZone()(*bool) { + val, err := m.GetBackingStore().Get("isTimeSlotTimeZoneSetToBusinessTimeZone") + if err != nil { + panic(err) + } + if val != nil { + return val.(*bool) + } + return nil +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *BookingPageSettings) GetOdataType()(*string) { + val, err := m.GetBackingStore().Get("odataType") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetPrivacyPolicyWebUrl gets the privacyPolicyWebUrl property value. The URL of the business' Privacy Policy. +func (m *BookingPageSettings) GetPrivacyPolicyWebUrl()(*string) { + val, err := m.GetBackingStore().Get("privacyPolicyWebUrl") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetTermsAndConditionsWebUrl gets the termsAndConditionsWebUrl property value. The URL of the business' Terms and Conditions. +func (m *BookingPageSettings) GetTermsAndConditionsWebUrl()(*string) { + val, err := m.GetBackingStore().Get("termsAndConditionsWebUrl") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// Serialize serializes information the current object +func (m *BookingPageSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAccessControl() != nil { + cast := (*m.GetAccessControl()).String() + err := writer.WriteStringValue("accessControl", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("bookingPageColorCode", m.GetBookingPageColorCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("businessTimeZone", m.GetBusinessTimeZone()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("customerConsentMessage", m.GetCustomerConsentMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("enforceOneTimePassword", m.GetEnforceOneTimePassword()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isBusinessLogoDisplayEnabled", m.GetIsBusinessLogoDisplayEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isCustomerConsentEnabled", m.GetIsCustomerConsentEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isSearchEngineIndexabilityDisabled", m.GetIsSearchEngineIndexabilityDisabled()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isTimeSlotTimeZoneSetToBusinessTimeZone", m.GetIsTimeSlotTimeZoneSetToBusinessTimeZone()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("privacyPolicyWebUrl", m.GetPrivacyPolicyWebUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("termsAndConditionsWebUrl", m.GetTermsAndConditionsWebUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAccessControl sets the accessControl property value. The accessControl property +func (m *BookingPageSettings) SetAccessControl(value *BookingPageAccessControl)() { + err := m.GetBackingStore().Set("accessControl", value) + if err != nil { + panic(err) + } +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *BookingPageSettings) 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 *BookingPageSettings) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetBookingPageColorCode sets the bookingPageColorCode property value. Custom color for bookings page. Value should be in Hex format. Example: `#123456`. +func (m *BookingPageSettings) SetBookingPageColorCode(value *string)() { + err := m.GetBackingStore().Set("bookingPageColorCode", value) + if err != nil { + panic(err) + } +} +// SetBusinessTimeZone sets the businessTimeZone property value. The time zone of the customer. For a list of possible values, see [dateTimeTimeZone](https://learn.microsoft.com/en-us/graph/api/resources/datetimetimezone?view=graph-rest-beta). +func (m *BookingPageSettings) SetBusinessTimeZone(value *string)() { + err := m.GetBackingStore().Set("businessTimeZone", value) + if err != nil { + panic(err) + } +} +// SetCustomerConsentMessage sets the customerConsentMessage property value. Customer consent message that is displayed in the Booking page. +func (m *BookingPageSettings) SetCustomerConsentMessage(value *string)() { + err := m.GetBackingStore().Set("customerConsentMessage", value) + if err != nil { + panic(err) + } +} +// SetEnforceOneTimePassword sets the enforceOneTimePassword property value. Enforcing One Time Password (OTP) during appointment creation. +func (m *BookingPageSettings) SetEnforceOneTimePassword(value *bool)() { + err := m.GetBackingStore().Set("enforceOneTimePassword", value) + if err != nil { + panic(err) + } +} +// SetIsBusinessLogoDisplayEnabled sets the isBusinessLogoDisplayEnabled property value. Enable display of business logo display on the Bookings page. +func (m *BookingPageSettings) SetIsBusinessLogoDisplayEnabled(value *bool)() { + err := m.GetBackingStore().Set("isBusinessLogoDisplayEnabled", value) + if err != nil { + panic(err) + } +} +// SetIsCustomerConsentEnabled sets the isCustomerConsentEnabled property value. Enforces customer consent on the customer consent message before appointment is booked. +func (m *BookingPageSettings) SetIsCustomerConsentEnabled(value *bool)() { + err := m.GetBackingStore().Set("isCustomerConsentEnabled", value) + if err != nil { + panic(err) + } +} +// SetIsSearchEngineIndexabilityDisabled sets the isSearchEngineIndexabilityDisabled property value. Disable booking page to be indexed by search engines. False by default. +func (m *BookingPageSettings) SetIsSearchEngineIndexabilityDisabled(value *bool)() { + err := m.GetBackingStore().Set("isSearchEngineIndexabilityDisabled", value) + if err != nil { + panic(err) + } +} +// SetIsTimeSlotTimeZoneSetToBusinessTimeZone sets the isTimeSlotTimeZoneSetToBusinessTimeZone property value. If business time zone the default value for the time slots that we show in the bookings page. False by default. +func (m *BookingPageSettings) SetIsTimeSlotTimeZoneSetToBusinessTimeZone(value *bool)() { + err := m.GetBackingStore().Set("isTimeSlotTimeZoneSetToBusinessTimeZone", value) + if err != nil { + panic(err) + } +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *BookingPageSettings) SetOdataType(value *string)() { + err := m.GetBackingStore().Set("odataType", value) + if err != nil { + panic(err) + } +} +// SetPrivacyPolicyWebUrl sets the privacyPolicyWebUrl property value. The URL of the business' Privacy Policy. +func (m *BookingPageSettings) SetPrivacyPolicyWebUrl(value *string)() { + err := m.GetBackingStore().Set("privacyPolicyWebUrl", value) + if err != nil { + panic(err) + } +} +// SetTermsAndConditionsWebUrl sets the termsAndConditionsWebUrl property value. The URL of the business' Terms and Conditions. +func (m *BookingPageSettings) SetTermsAndConditionsWebUrl(value *string)() { + err := m.GetBackingStore().Set("termsAndConditionsWebUrl", value) + if err != nil { + panic(err) + } +} +// BookingPageSettingsable +type BookingPageSettingsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccessControl()(*BookingPageAccessControl) + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetBookingPageColorCode()(*string) + GetBusinessTimeZone()(*string) + GetCustomerConsentMessage()(*string) + GetEnforceOneTimePassword()(*bool) + GetIsBusinessLogoDisplayEnabled()(*bool) + GetIsCustomerConsentEnabled()(*bool) + GetIsSearchEngineIndexabilityDisabled()(*bool) + GetIsTimeSlotTimeZoneSetToBusinessTimeZone()(*bool) + GetOdataType()(*string) + GetPrivacyPolicyWebUrl()(*string) + GetTermsAndConditionsWebUrl()(*string) + SetAccessControl(value *BookingPageAccessControl)() + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetBookingPageColorCode(value *string)() + SetBusinessTimeZone(value *string)() + SetCustomerConsentMessage(value *string)() + SetEnforceOneTimePassword(value *bool)() + SetIsBusinessLogoDisplayEnabled(value *bool)() + SetIsCustomerConsentEnabled(value *bool)() + SetIsSearchEngineIndexabilityDisabled(value *bool)() + SetIsTimeSlotTimeZoneSetToBusinessTimeZone(value *bool)() + SetOdataType(value *string)() + SetPrivacyPolicyWebUrl(value *string)() + SetTermsAndConditionsWebUrl(value *string)() +} diff --git a/models/booking_scheduling_policy.go b/models/booking_scheduling_policy.go index dd67dbc3945..3fd004d9a3c 100644 --- a/models/booking_scheduling_policy.go +++ b/models/booking_scheduling_policy.go @@ -62,6 +62,16 @@ func (m *BookingSchedulingPolicy) GetFieldDeserializers()(map[string]func(i878a8 } return nil } + res["isMeetingInviteToCustomersEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsMeetingInviteToCustomersEnabled(val) + } + return nil + } res["maximumAdvance"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetISODurationValue() if err != nil { @@ -114,6 +124,17 @@ func (m *BookingSchedulingPolicy) GetFieldDeserializers()(map[string]func(i878a8 } return res } +// GetIsMeetingInviteToCustomersEnabled gets the isMeetingInviteToCustomersEnabled property value. Enable sending meeting invite to customers. +func (m *BookingSchedulingPolicy) GetIsMeetingInviteToCustomersEnabled()(*bool) { + val, err := m.GetBackingStore().Get("isMeetingInviteToCustomersEnabled") + if err != nil { + panic(err) + } + if val != nil { + return val.(*bool) + } + return nil +} // GetMaximumAdvance gets the maximumAdvance property value. Maximum number of days in advance that a booking can be made. It follows the ISO 8601 format. func (m *BookingSchedulingPolicy) GetMaximumAdvance()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { val, err := m.GetBackingStore().Get("maximumAdvance") @@ -177,6 +198,12 @@ func (m *BookingSchedulingPolicy) Serialize(writer i878a80d2330e89d26896388a3f48 return err } } + { + err := writer.WriteBoolValue("isMeetingInviteToCustomersEnabled", m.GetIsMeetingInviteToCustomersEnabled()) + if err != nil { + return err + } + } { err := writer.WriteISODurationValue("maximumAdvance", m.GetMaximumAdvance()) if err != nil { @@ -233,6 +260,13 @@ func (m *BookingSchedulingPolicy) SetAllowStaffSelection(value *bool)() { func (m *BookingSchedulingPolicy) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { m.backingStore = value } +// SetIsMeetingInviteToCustomersEnabled sets the isMeetingInviteToCustomersEnabled property value. Enable sending meeting invite to customers. +func (m *BookingSchedulingPolicy) SetIsMeetingInviteToCustomersEnabled(value *bool)() { + err := m.GetBackingStore().Set("isMeetingInviteToCustomersEnabled", value) + if err != nil { + panic(err) + } +} // SetMaximumAdvance sets the maximumAdvance property value. Maximum number of days in advance that a booking can be made. It follows the ISO 8601 format. func (m *BookingSchedulingPolicy) SetMaximumAdvance(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { err := m.GetBackingStore().Set("maximumAdvance", value) @@ -275,6 +309,7 @@ type BookingSchedulingPolicyable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetAllowStaffSelection()(*bool) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetIsMeetingInviteToCustomersEnabled()(*bool) GetMaximumAdvance()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) GetMinimumLeadTime()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) GetOdataType()(*string) @@ -282,6 +317,7 @@ type BookingSchedulingPolicyable interface { GetTimeSlotInterval()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) SetAllowStaffSelection(value *bool)() SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetIsMeetingInviteToCustomersEnabled(value *bool)() SetMaximumAdvance(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() SetMinimumLeadTime(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() SetOdataType(value *string)() diff --git a/models/booking_service.go b/models/booking_service.go index 82aaa7abdf3..2b0a821e26f 100644 --- a/models/booking_service.go +++ b/models/booking_service.go @@ -1,6 +1,7 @@ package models import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) @@ -32,6 +33,17 @@ func (m *BookingService) GetAdditionalInformation()(*string) { } return nil } +// GetCreatedDateTime gets the createdDateTime property value. The createdDateTime property +func (m *BookingService) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + val, err := m.GetBackingStore().Get("createdDateTime") + if err != nil { + panic(err) + } + if val != nil { + return val.(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + } + return nil +} // GetCustomQuestions gets the customQuestions property value. Contains the set of custom questions associated with a particular service. func (m *BookingService) GetCustomQuestions()([]BookingQuestionAssignmentable) { val, err := m.GetBackingStore().Get("customQuestions") @@ -122,6 +134,16 @@ func (m *BookingService) GetFieldDeserializers()(map[string]func(i878a80d2330e89 } 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["customQuestions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetCollectionOfObjectValues(CreateBookingQuestionAssignmentFromDiscriminatorValue) if err != nil { @@ -244,6 +266,16 @@ func (m *BookingService) GetFieldDeserializers()(map[string]func(i878a80d2330e89 } return nil } + res["lastUpdatedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastUpdatedDateTime(val) + } + return nil + } res["maximumAttendeesCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetInt32Value() if err != nil { @@ -376,6 +408,17 @@ func (m *BookingService) GetLanguageTag()(*string) { } return nil } +// GetLastUpdatedDateTime gets the lastUpdatedDateTime property value. The lastUpdatedDateTime property +func (m *BookingService) GetLastUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + val, err := m.GetBackingStore().Get("lastUpdatedDateTime") + if err != nil { + panic(err) + } + if val != nil { + return val.(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + } + return nil +} // GetMaximumAttendeesCount gets the maximumAttendeesCount property value. The maximum number of customers allowed in a service. If maximumAttendeesCount of the service is greater than 1, pass valid customer IDs while creating or updating an appointment. To create a customer, use the Create bookingCustomer operation. func (m *BookingService) GetMaximumAttendeesCount()(*int32) { val, err := m.GetBackingStore().Get("maximumAttendeesCount") @@ -476,6 +519,12 @@ func (m *BookingService) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a return err } } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } if m.GetCustomQuestions() != nil { cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCustomQuestions())) for i, v := range m.GetCustomQuestions() { @@ -555,6 +604,12 @@ func (m *BookingService) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a return err } } + { + err = writer.WriteTimeValue("lastUpdatedDateTime", m.GetLastUpdatedDateTime()) + if err != nil { + return err + } + } { err = writer.WriteInt32Value("maximumAttendeesCount", m.GetMaximumAttendeesCount()) if err != nil { @@ -606,6 +661,13 @@ func (m *BookingService) SetAdditionalInformation(value *string)() { panic(err) } } +// SetCreatedDateTime sets the createdDateTime property value. The createdDateTime property +func (m *BookingService) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + err := m.GetBackingStore().Set("createdDateTime", value) + if err != nil { + panic(err) + } +} // SetCustomQuestions sets the customQuestions property value. Contains the set of custom questions associated with a particular service. func (m *BookingService) SetCustomQuestions(value []BookingQuestionAssignmentable)() { err := m.GetBackingStore().Set("customQuestions", value) @@ -683,6 +745,13 @@ func (m *BookingService) SetLanguageTag(value *string)() { panic(err) } } +// SetLastUpdatedDateTime sets the lastUpdatedDateTime property value. The lastUpdatedDateTime property +func (m *BookingService) SetLastUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + err := m.GetBackingStore().Set("lastUpdatedDateTime", value) + if err != nil { + panic(err) + } +} // SetMaximumAttendeesCount sets the maximumAttendeesCount property value. The maximum number of customers allowed in a service. If maximumAttendeesCount of the service is greater than 1, pass valid customer IDs while creating or updating an appointment. To create a customer, use the Create bookingCustomer operation. func (m *BookingService) SetMaximumAttendeesCount(value *int32)() { err := m.GetBackingStore().Set("maximumAttendeesCount", value) @@ -744,6 +813,7 @@ type BookingServiceable interface { BookingNamedEntityable i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetAdditionalInformation()(*string) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) GetCustomQuestions()([]BookingQuestionAssignmentable) GetDefaultDuration()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) GetDefaultLocation()(Locationable) @@ -755,6 +825,7 @@ type BookingServiceable interface { GetIsHiddenFromCustomers()(*bool) GetIsLocationOnline()(*bool) GetLanguageTag()(*string) + GetLastUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) GetMaximumAttendeesCount()(*int32) GetNotes()(*string) GetPostBuffer()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) @@ -764,6 +835,7 @@ type BookingServiceable interface { GetStaffMemberIds()([]string) GetWebUrl()(*string) SetAdditionalInformation(value *string)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() SetCustomQuestions(value []BookingQuestionAssignmentable)() SetDefaultDuration(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() SetDefaultLocation(value Locationable)() @@ -775,6 +847,7 @@ type BookingServiceable interface { SetIsHiddenFromCustomers(value *bool)() SetIsLocationOnline(value *bool)() SetLanguageTag(value *string)() + SetLastUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() SetMaximumAttendeesCount(value *int32)() SetNotes(value *string)() SetPostBuffer(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() diff --git a/models/booking_staff_member.go b/models/booking_staff_member.go index a092e9e7d30..267d82b390d 100644 --- a/models/booking_staff_member.go +++ b/models/booking_staff_member.go @@ -1,6 +1,7 @@ package models import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) @@ -41,6 +42,17 @@ func (m *BookingStaffMember) GetColorIndex()(*int32) { } return nil } +// GetCreatedDateTime gets the createdDateTime property value. The createdDateTime property +func (m *BookingStaffMember) 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 func (m *BookingStaffMember) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := m.BookingPerson.GetFieldDeserializers() @@ -64,6 +76,16 @@ func (m *BookingStaffMember) GetFieldDeserializers()(map[string]func(i878a80d233 } 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["isEmailNotificationEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetBoolValue() if err != nil { @@ -74,6 +96,16 @@ func (m *BookingStaffMember) GetFieldDeserializers()(map[string]func(i878a80d233 } return nil } + res["lastUpdatedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastUpdatedDateTime(val) + } + return nil + } res["membershipStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetEnumValue(ParseBookingStaffMembershipStatus) if err != nil { @@ -143,6 +175,17 @@ func (m *BookingStaffMember) GetIsEmailNotificationEnabled()(*bool) { } return nil } +// GetLastUpdatedDateTime gets the lastUpdatedDateTime property value. The lastUpdatedDateTime property +func (m *BookingStaffMember) GetLastUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + val, err := m.GetBackingStore().Get("lastUpdatedDateTime") + if err != nil { + panic(err) + } + if val != nil { + return val.(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + } + return nil +} // GetMembershipStatus gets the membershipStatus property value. The membershipStatus property func (m *BookingStaffMember) GetMembershipStatus()(*BookingStaffMembershipStatus) { val, err := m.GetBackingStore().Get("membershipStatus") @@ -216,12 +259,24 @@ func (m *BookingStaffMember) Serialize(writer i878a80d2330e89d26896388a3f487eef2 return err } } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } { err = writer.WriteBoolValue("isEmailNotificationEnabled", m.GetIsEmailNotificationEnabled()) if err != nil { return err } } + { + err = writer.WriteTimeValue("lastUpdatedDateTime", m.GetLastUpdatedDateTime()) + if err != nil { + return err + } + } if m.GetMembershipStatus() != nil { cast := (*m.GetMembershipStatus()).String() err = writer.WriteStringValue("membershipStatus", &cast) @@ -276,6 +331,13 @@ func (m *BookingStaffMember) SetColorIndex(value *int32)() { panic(err) } } +// SetCreatedDateTime sets the createdDateTime property value. The createdDateTime property +func (m *BookingStaffMember) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + err := m.GetBackingStore().Set("createdDateTime", value) + if err != nil { + panic(err) + } +} // SetIsEmailNotificationEnabled sets the isEmailNotificationEnabled property value. True indicates that a staff member will be notified via email when a booking assigned to them is created or changed. func (m *BookingStaffMember) SetIsEmailNotificationEnabled(value *bool)() { err := m.GetBackingStore().Set("isEmailNotificationEnabled", value) @@ -283,6 +345,13 @@ func (m *BookingStaffMember) SetIsEmailNotificationEnabled(value *bool)() { panic(err) } } +// SetLastUpdatedDateTime sets the lastUpdatedDateTime property value. The lastUpdatedDateTime property +func (m *BookingStaffMember) SetLastUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + err := m.GetBackingStore().Set("lastUpdatedDateTime", value) + if err != nil { + panic(err) + } +} // SetMembershipStatus sets the membershipStatus property value. The membershipStatus property func (m *BookingStaffMember) SetMembershipStatus(value *BookingStaffMembershipStatus)() { err := m.GetBackingStore().Set("membershipStatus", value) @@ -324,7 +393,9 @@ type BookingStaffMemberable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetAvailabilityIsAffectedByPersonalCalendar()(*bool) GetColorIndex()(*int32) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) GetIsEmailNotificationEnabled()(*bool) + GetLastUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) GetMembershipStatus()(*BookingStaffMembershipStatus) GetRole()(*BookingStaffRole) GetTimeZone()(*string) @@ -332,7 +403,9 @@ type BookingStaffMemberable interface { GetWorkingHours()([]BookingWorkHoursable) SetAvailabilityIsAffectedByPersonalCalendar(value *bool)() SetColorIndex(value *int32)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() SetIsEmailNotificationEnabled(value *bool)() + SetLastUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() SetMembershipStatus(value *BookingStaffMembershipStatus)() SetRole(value *BookingStaffRole)() SetTimeZone(value *string)() diff --git a/models/change_tracked_entity.go b/models/change_tracked_entity.go index 49b87472fee..d6df029f888 100644 --- a/models/change_tracked_entity.go +++ b/models/change_tracked_entity.go @@ -64,7 +64,7 @@ func CreateChangeTrackedEntityFromDiscriminatorValue(parseNode i878a80d2330e89d2 } return NewChangeTrackedEntity(), nil } -// GetCreatedBy gets the createdBy property value. The createdBy property +// GetCreatedBy gets the createdBy property value. Identity of the user who created the entity. func (m *ChangeTrackedEntity) GetCreatedBy()(IdentitySetable) { val, err := m.GetBackingStore().Get("createdBy") if err != nil { @@ -75,7 +75,7 @@ func (m *ChangeTrackedEntity) GetCreatedBy()(IdentitySetable) { } return nil } -// GetCreatedDateTime gets the createdDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +// GetCreatedDateTime gets the createdDateTime property value. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. func (m *ChangeTrackedEntity) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { val, err := m.GetBackingStore().Get("createdDateTime") if err != nil { @@ -131,7 +131,7 @@ func (m *ChangeTrackedEntity) GetFieldDeserializers()(map[string]func(i878a80d23 } return res } -// GetLastModifiedBy gets the lastModifiedBy property value. Identity of the person who last modified the entity. +// GetLastModifiedBy gets the lastModifiedBy property value. Identity of the user who last modified the entity. func (m *ChangeTrackedEntity) GetLastModifiedBy()(IdentitySetable) { val, err := m.GetBackingStore().Get("lastModifiedBy") if err != nil { @@ -142,7 +142,7 @@ func (m *ChangeTrackedEntity) GetLastModifiedBy()(IdentitySetable) { } return nil } -// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. func (m *ChangeTrackedEntity) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { val, err := m.GetBackingStore().Get("lastModifiedDateTime") if err != nil { @@ -167,28 +167,28 @@ func (m *ChangeTrackedEntity) Serialize(writer i878a80d2330e89d26896388a3f487eef } return nil } -// SetCreatedBy sets the createdBy property value. The createdBy property +// SetCreatedBy sets the createdBy property value. Identity of the user who created the entity. func (m *ChangeTrackedEntity) SetCreatedBy(value IdentitySetable)() { err := m.GetBackingStore().Set("createdBy", value) if err != nil { panic(err) } } -// SetCreatedDateTime sets the createdDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +// SetCreatedDateTime sets the createdDateTime property value. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. func (m *ChangeTrackedEntity) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { err := m.GetBackingStore().Set("createdDateTime", value) if err != nil { panic(err) } } -// SetLastModifiedBy sets the lastModifiedBy property value. Identity of the person who last modified the entity. +// SetLastModifiedBy sets the lastModifiedBy property value. Identity of the user who last modified the entity. func (m *ChangeTrackedEntity) SetLastModifiedBy(value IdentitySetable)() { err := m.GetBackingStore().Set("lastModifiedBy", value) if err != nil { panic(err) } } -// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. func (m *ChangeTrackedEntity) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { err := m.GetBackingStore().Set("lastModifiedDateTime", value) if err != nil { diff --git a/models/channel.go b/models/channel.go index a3ddf5780d1..e41844c91ab 100644 --- a/models/channel.go +++ b/models/channel.go @@ -117,6 +117,16 @@ func (m *Channel) GetFieldDeserializers()(map[string]func(i878a80d2330e89d268963 } return nil } + res["isArchived"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsArchived(val) + } + return nil + } res["isFavoriteByDefault"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetBoolValue() if err != nil { @@ -254,6 +264,17 @@ func (m *Channel) GetFilesFolder()(DriveItemable) { } return nil } +// GetIsArchived gets the isArchived property value. The isArchived property +func (m *Channel) GetIsArchived()(*bool) { + val, err := m.GetBackingStore().Get("isArchived") + if err != nil { + panic(err) + } + if val != nil { + return val.(*bool) + } + return nil +} // GetIsFavoriteByDefault gets the isFavoriteByDefault property value. Indicates whether the channel should automatically be marked 'favorite' for all members of the team. Can only be set programmatically with Create team. Default: false. func (m *Channel) GetIsFavoriteByDefault()(*bool) { val, err := m.GetBackingStore().Get("isFavoriteByDefault") @@ -400,6 +421,12 @@ func (m *Channel) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010 return err } } + { + err = writer.WriteBoolValue("isArchived", m.GetIsArchived()) + if err != nil { + return err + } + } { err = writer.WriteBoolValue("isFavoriteByDefault", m.GetIsFavoriteByDefault()) if err != nil { @@ -522,6 +549,13 @@ func (m *Channel) SetFilesFolder(value DriveItemable)() { panic(err) } } +// SetIsArchived sets the isArchived property value. The isArchived property +func (m *Channel) SetIsArchived(value *bool)() { + err := m.GetBackingStore().Set("isArchived", value) + if err != nil { + panic(err) + } +} // SetIsFavoriteByDefault sets the isFavoriteByDefault property value. Indicates whether the channel should automatically be marked 'favorite' for all members of the team. Can only be set programmatically with Create team. Default: false. func (m *Channel) SetIsFavoriteByDefault(value *bool)() { err := m.GetBackingStore().Set("isFavoriteByDefault", value) @@ -601,6 +635,7 @@ type Channelable interface { GetDisplayName()(*string) GetEmail()(*string) GetFilesFolder()(DriveItemable) + GetIsArchived()(*bool) GetIsFavoriteByDefault()(*bool) GetMembers()([]ConversationMemberable) GetMembershipType()(*ChannelMembershipType) @@ -616,6 +651,7 @@ type Channelable interface { SetDisplayName(value *string)() SetEmail(value *string)() SetFilesFolder(value DriveItemable)() + SetIsArchived(value *bool)() SetIsFavoriteByDefault(value *bool)() SetMembers(value []ConversationMemberable)() SetMembershipType(value *ChannelMembershipType)() diff --git a/models/cloud_p_c.go b/models/cloud_p_c.go index e5e86e8714b..9db56ca6935 100644 --- a/models/cloud_p_c.go +++ b/models/cloud_p_c.go @@ -53,6 +53,17 @@ func (m *CloudPC) GetConnectivityResult()(CloudPcConnectivityResultable) { } return nil } +// GetDisasterRecoveryCapability gets the disasterRecoveryCapability property value. The disasterRecoveryCapability property +func (m *CloudPC) GetDisasterRecoveryCapability()(CloudPcDisasterRecoveryCapabilityable) { + val, err := m.GetBackingStore().Get("disasterRecoveryCapability") + if err != nil { + panic(err) + } + if val != nil { + return val.(CloudPcDisasterRecoveryCapabilityable) + } + return nil +} // GetDiskEncryptionState gets the diskEncryptionState property value. The disk encryption applied to the Cloud PC. Possible values: notAvailable, notEncrypted, encryptedUsingPlatformManagedKey, encryptedUsingCustomerManagedKey, and unknownFutureValue. func (m *CloudPC) GetDiskEncryptionState()(*CloudPcDiskEncryptionState) { val, err := m.GetBackingStore().Get("diskEncryptionState") @@ -108,6 +119,16 @@ func (m *CloudPC) GetFieldDeserializers()(map[string]func(i878a80d2330e89d268963 } return nil } + res["disasterRecoveryCapability"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCloudPcDisasterRecoveryCapabilityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDisasterRecoveryCapability(val.(CloudPcDisasterRecoveryCapabilityable)) + } + return nil + } res["diskEncryptionState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetEnumValue(ParseCloudPcDiskEncryptionState) if err != nil { @@ -628,6 +649,12 @@ func (m *CloudPC) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010 return err } } + { + err = writer.WriteObjectValue("disasterRecoveryCapability", m.GetDisasterRecoveryCapability()) + if err != nil { + return err + } + } if m.GetDiskEncryptionState() != nil { cast := (*m.GetDiskEncryptionState()).String() err = writer.WriteStringValue("diskEncryptionState", &cast) @@ -808,6 +835,13 @@ func (m *CloudPC) SetConnectivityResult(value CloudPcConnectivityResultable)() { panic(err) } } +// SetDisasterRecoveryCapability sets the disasterRecoveryCapability property value. The disasterRecoveryCapability property +func (m *CloudPC) SetDisasterRecoveryCapability(value CloudPcDisasterRecoveryCapabilityable)() { + err := m.GetBackingStore().Set("disasterRecoveryCapability", value) + if err != nil { + panic(err) + } +} // SetDiskEncryptionState sets the diskEncryptionState property value. The disk encryption applied to the Cloud PC. Possible values: notAvailable, notEncrypted, encryptedUsingPlatformManagedKey, encryptedUsingCustomerManagedKey, and unknownFutureValue. func (m *CloudPC) SetDiskEncryptionState(value *CloudPcDiskEncryptionState)() { err := m.GetBackingStore().Set("diskEncryptionState", value) @@ -983,6 +1017,7 @@ type CloudPCable interface { GetAadDeviceId()(*string) GetConnectionSettings()(CloudPcConnectionSettingsable) GetConnectivityResult()(CloudPcConnectivityResultable) + GetDisasterRecoveryCapability()(CloudPcDisasterRecoveryCapabilityable) GetDiskEncryptionState()(*CloudPcDiskEncryptionState) GetDisplayName()(*string) GetGracePeriodEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) @@ -1010,6 +1045,7 @@ type CloudPCable interface { SetAadDeviceId(value *string)() SetConnectionSettings(value CloudPcConnectionSettingsable)() SetConnectivityResult(value CloudPcConnectivityResultable)() + SetDisasterRecoveryCapability(value CloudPcDisasterRecoveryCapabilityable)() SetDiskEncryptionState(value *CloudPcDiskEncryptionState)() SetDisplayName(value *string)() SetGracePeriodEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() diff --git a/models/cloud_p_c_inaccessible_report_name.go b/models/cloud_p_c_inaccessible_report_name.go new file mode 100644 index 00000000000..33345c4280a --- /dev/null +++ b/models/cloud_p_c_inaccessible_report_name.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// +type CloudPCInaccessibleReportName int + +const ( + INACCESSIBLECLOUDPCREPORTS_CLOUDPCINACCESSIBLEREPORTNAME CloudPCInaccessibleReportName = iota + INACCESSIBLECLOUDPCTRENDREPORT_CLOUDPCINACCESSIBLEREPORTNAME + UNKNOWNFUTUREVALUE_CLOUDPCINACCESSIBLEREPORTNAME +) + +func (i CloudPCInaccessibleReportName) String() string { + return []string{"inaccessibleCloudPcReports", "inaccessibleCloudPcTrendReport", "unknownFutureValue"}[i] +} +func ParseCloudPCInaccessibleReportName(v string) (any, error) { + result := INACCESSIBLECLOUDPCREPORTS_CLOUDPCINACCESSIBLEREPORTNAME + switch v { + case "inaccessibleCloudPcReports": + result = INACCESSIBLECLOUDPCREPORTS_CLOUDPCINACCESSIBLEREPORTNAME + case "inaccessibleCloudPcTrendReport": + result = INACCESSIBLECLOUDPCTRENDREPORT_CLOUDPCINACCESSIBLEREPORTNAME + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CLOUDPCINACCESSIBLEREPORTNAME + default: + return 0, errors.New("Unknown CloudPCInaccessibleReportName value: " + v) + } + return &result, nil +} +func SerializeCloudPCInaccessibleReportName(values []CloudPCInaccessibleReportName) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CloudPCInaccessibleReportName) isMultiValue() bool { + return false +} diff --git a/models/cloud_p_c_performance_report_name.go b/models/cloud_p_c_performance_report_name.go new file mode 100644 index 00000000000..5fcbced6422 --- /dev/null +++ b/models/cloud_p_c_performance_report_name.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// +type CloudPCPerformanceReportName int + +const ( + PERFORMANCETRENDREPORT_CLOUDPCPERFORMANCEREPORTNAME CloudPCPerformanceReportName = iota + UNKNOWNFUTUREVALUE_CLOUDPCPERFORMANCEREPORTNAME +) + +func (i CloudPCPerformanceReportName) String() string { + return []string{"performanceTrendReport", "unknownFutureValue"}[i] +} +func ParseCloudPCPerformanceReportName(v string) (any, error) { + result := PERFORMANCETRENDREPORT_CLOUDPCPERFORMANCEREPORTNAME + switch v { + case "performanceTrendReport": + result = PERFORMANCETRENDREPORT_CLOUDPCPERFORMANCEREPORTNAME + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CLOUDPCPERFORMANCEREPORTNAME + default: + return 0, errors.New("Unknown CloudPCPerformanceReportName value: " + v) + } + return &result, nil +} +func SerializeCloudPCPerformanceReportName(values []CloudPCPerformanceReportName) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CloudPCPerformanceReportName) isMultiValue() bool { + return false +} diff --git a/models/cloud_pc_audit_activity_operation_type.go b/models/cloud_pc_audit_activity_operation_type.go index 5519e2563ea..fabddba81e7 100644 --- a/models/cloud_pc_audit_activity_operation_type.go +++ b/models/cloud_pc_audit_activity_operation_type.go @@ -9,11 +9,11 @@ const ( CREATE_CLOUDPCAUDITACTIVITYOPERATIONTYPE CloudPcAuditActivityOperationType = iota DELETE_CLOUDPCAUDITACTIVITYOPERATIONTYPE PATCH_CLOUDPCAUDITACTIVITYOPERATIONTYPE - OTHER_CLOUDPCAUDITACTIVITYOPERATIONTYPE + UNKNOWNFUTUREVALUE_CLOUDPCAUDITACTIVITYOPERATIONTYPE ) func (i CloudPcAuditActivityOperationType) String() string { - return []string{"create", "delete", "patch", "other"}[i] + return []string{"create", "delete", "patch", "unknownFutureValue"}[i] } func ParseCloudPcAuditActivityOperationType(v string) (any, error) { result := CREATE_CLOUDPCAUDITACTIVITYOPERATIONTYPE @@ -24,8 +24,8 @@ func ParseCloudPcAuditActivityOperationType(v string) (any, error) { result = DELETE_CLOUDPCAUDITACTIVITYOPERATIONTYPE case "patch": result = PATCH_CLOUDPCAUDITACTIVITYOPERATIONTYPE - case "other": - result = OTHER_CLOUDPCAUDITACTIVITYOPERATIONTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CLOUDPCAUDITACTIVITYOPERATIONTYPE default: return 0, errors.New("Unknown CloudPcAuditActivityOperationType value: " + v) } diff --git a/models/cloud_pc_audit_activity_result.go b/models/cloud_pc_audit_activity_result.go index 767d3abb742..7f29051b027 100644 --- a/models/cloud_pc_audit_activity_result.go +++ b/models/cloud_pc_audit_activity_result.go @@ -10,11 +10,11 @@ const ( CLIENTERROR_CLOUDPCAUDITACTIVITYRESULT FAILURE_CLOUDPCAUDITACTIVITYRESULT TIMEOUT_CLOUDPCAUDITACTIVITYRESULT - OTHER_CLOUDPCAUDITACTIVITYRESULT + UNKNOWNFUTUREVALUE_CLOUDPCAUDITACTIVITYRESULT ) func (i CloudPcAuditActivityResult) String() string { - return []string{"success", "clientError", "failure", "timeout", "other"}[i] + return []string{"success", "clientError", "failure", "timeout", "unknownFutureValue"}[i] } func ParseCloudPcAuditActivityResult(v string) (any, error) { result := SUCCESS_CLOUDPCAUDITACTIVITYRESULT @@ -27,8 +27,8 @@ func ParseCloudPcAuditActivityResult(v string) (any, error) { result = FAILURE_CLOUDPCAUDITACTIVITYRESULT case "timeout": result = TIMEOUT_CLOUDPCAUDITACTIVITYRESULT - case "other": - result = OTHER_CLOUDPCAUDITACTIVITYRESULT + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CLOUDPCAUDITACTIVITYRESULT default: return 0, errors.New("Unknown CloudPcAuditActivityResult value: " + v) } diff --git a/models/cloud_pc_audit_actor_type.go b/models/cloud_pc_audit_actor_type.go index aef922c2fb9..135b226fecc 100644 --- a/models/cloud_pc_audit_actor_type.go +++ b/models/cloud_pc_audit_actor_type.go @@ -9,11 +9,11 @@ const ( ITPRO_CLOUDPCAUDITACTORTYPE CloudPcAuditActorType = iota APPLICATION_CLOUDPCAUDITACTORTYPE PARTNER_CLOUDPCAUDITACTORTYPE - UNKNOWN_CLOUDPCAUDITACTORTYPE + UNKNOWNFUTUREVALUE_CLOUDPCAUDITACTORTYPE ) func (i CloudPcAuditActorType) String() string { - return []string{"itPro", "application", "partner", "unknown"}[i] + return []string{"itPro", "application", "partner", "unknownFutureValue"}[i] } func ParseCloudPcAuditActorType(v string) (any, error) { result := ITPRO_CLOUDPCAUDITACTORTYPE @@ -24,8 +24,8 @@ func ParseCloudPcAuditActorType(v string) (any, error) { result = APPLICATION_CLOUDPCAUDITACTORTYPE case "partner": result = PARTNER_CLOUDPCAUDITACTORTYPE - case "unknown": - result = UNKNOWN_CLOUDPCAUDITACTORTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CLOUDPCAUDITACTORTYPE default: return 0, errors.New("Unknown CloudPcAuditActorType value: " + v) } diff --git a/models/cloud_pc_audit_category.go b/models/cloud_pc_audit_category.go index 818ca4b5898..a271c8c92ee 100644 --- a/models/cloud_pc_audit_category.go +++ b/models/cloud_pc_audit_category.go @@ -7,19 +7,19 @@ type CloudPcAuditCategory int const ( CLOUDPC_CLOUDPCAUDITCATEGORY CloudPcAuditCategory = iota - OTHER_CLOUDPCAUDITCATEGORY + UNKNOWNFUTUREVALUE_CLOUDPCAUDITCATEGORY ) func (i CloudPcAuditCategory) String() string { - return []string{"cloudPC", "other"}[i] + return []string{"cloudPC", "unknownFutureValue"}[i] } func ParseCloudPcAuditCategory(v string) (any, error) { result := CLOUDPC_CLOUDPCAUDITCATEGORY switch v { case "cloudPC": result = CLOUDPC_CLOUDPCAUDITCATEGORY - case "other": - result = OTHER_CLOUDPCAUDITCATEGORY + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CLOUDPCAUDITCATEGORY default: return 0, errors.New("Unknown CloudPcAuditCategory value: " + v) } diff --git a/models/cloud_pc_bulk_action.go b/models/cloud_pc_bulk_action.go index a9951a59370..d7bebd3e8fc 100644 --- a/models/cloud_pc_bulk_action.go +++ b/models/cloud_pc_bulk_action.go @@ -30,6 +30,12 @@ func CreateCloudPcBulkActionFromDiscriminatorValue(parseNode i878a80d2330e89d268 } if mappingValue != nil { switch *mappingValue { + case "#microsoft.graph.cloudPcBulkDisasterRecoveryFailback": + return NewCloudPcBulkDisasterRecoveryFailback(), nil + case "#microsoft.graph.cloudPcBulkDisasterRecoveryFailover": + return NewCloudPcBulkDisasterRecoveryFailover(), nil + case "#microsoft.graph.cloudPcBulkModifyDiskEncryptionType": + return NewCloudPcBulkModifyDiskEncryptionType(), nil case "#microsoft.graph.cloudPcBulkPowerOff": return NewCloudPcBulkPowerOff(), nil case "#microsoft.graph.cloudPcBulkPowerOn": diff --git a/models/cloud_pc_bulk_disaster_recovery_failback.go b/models/cloud_pc_bulk_disaster_recovery_failback.go new file mode 100644 index 00000000000..a0d2e058f09 --- /dev/null +++ b/models/cloud_pc_bulk_disaster_recovery_failback.go @@ -0,0 +1,41 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcBulkDisasterRecoveryFailback +type CloudPcBulkDisasterRecoveryFailback struct { + CloudPcBulkAction +} +// NewCloudPcBulkDisasterRecoveryFailback instantiates a new cloudPcBulkDisasterRecoveryFailback and sets the default values. +func NewCloudPcBulkDisasterRecoveryFailback()(*CloudPcBulkDisasterRecoveryFailback) { + m := &CloudPcBulkDisasterRecoveryFailback{ + CloudPcBulkAction: *NewCloudPcBulkAction(), + } + odataTypeValue := "#microsoft.graph.cloudPcBulkDisasterRecoveryFailback" + m.SetOdataType(&odataTypeValue) + return m +} +// CreateCloudPcBulkDisasterRecoveryFailbackFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcBulkDisasterRecoveryFailbackFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcBulkDisasterRecoveryFailback(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcBulkDisasterRecoveryFailback) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.CloudPcBulkAction.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *CloudPcBulkDisasterRecoveryFailback) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.CloudPcBulkAction.Serialize(writer) + if err != nil { + return err + } + return nil +} +// CloudPcBulkDisasterRecoveryFailbackable +type CloudPcBulkDisasterRecoveryFailbackable interface { + CloudPcBulkActionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/models/cloud_pc_bulk_disaster_recovery_failover.go b/models/cloud_pc_bulk_disaster_recovery_failover.go new file mode 100644 index 00000000000..eb3c0d43eee --- /dev/null +++ b/models/cloud_pc_bulk_disaster_recovery_failover.go @@ -0,0 +1,41 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcBulkDisasterRecoveryFailover +type CloudPcBulkDisasterRecoveryFailover struct { + CloudPcBulkAction +} +// NewCloudPcBulkDisasterRecoveryFailover instantiates a new cloudPcBulkDisasterRecoveryFailover and sets the default values. +func NewCloudPcBulkDisasterRecoveryFailover()(*CloudPcBulkDisasterRecoveryFailover) { + m := &CloudPcBulkDisasterRecoveryFailover{ + CloudPcBulkAction: *NewCloudPcBulkAction(), + } + odataTypeValue := "#microsoft.graph.cloudPcBulkDisasterRecoveryFailover" + m.SetOdataType(&odataTypeValue) + return m +} +// CreateCloudPcBulkDisasterRecoveryFailoverFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcBulkDisasterRecoveryFailoverFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcBulkDisasterRecoveryFailover(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcBulkDisasterRecoveryFailover) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.CloudPcBulkAction.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *CloudPcBulkDisasterRecoveryFailover) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.CloudPcBulkAction.Serialize(writer) + if err != nil { + return err + } + return nil +} +// CloudPcBulkDisasterRecoveryFailoverable +type CloudPcBulkDisasterRecoveryFailoverable interface { + CloudPcBulkActionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/models/cloud_pc_bulk_modify_disk_encryption_type.go b/models/cloud_pc_bulk_modify_disk_encryption_type.go new file mode 100644 index 00000000000..41d0bd27afb --- /dev/null +++ b/models/cloud_pc_bulk_modify_disk_encryption_type.go @@ -0,0 +1,78 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcBulkModifyDiskEncryptionType +type CloudPcBulkModifyDiskEncryptionType struct { + CloudPcBulkAction +} +// NewCloudPcBulkModifyDiskEncryptionType instantiates a new cloudPcBulkModifyDiskEncryptionType and sets the default values. +func NewCloudPcBulkModifyDiskEncryptionType()(*CloudPcBulkModifyDiskEncryptionType) { + m := &CloudPcBulkModifyDiskEncryptionType{ + CloudPcBulkAction: *NewCloudPcBulkAction(), + } + odataTypeValue := "#microsoft.graph.cloudPcBulkModifyDiskEncryptionType" + m.SetOdataType(&odataTypeValue) + return m +} +// CreateCloudPcBulkModifyDiskEncryptionTypeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcBulkModifyDiskEncryptionTypeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcBulkModifyDiskEncryptionType(), nil +} +// GetDiskEncryptionType gets the diskEncryptionType property value. The diskEncryptionType property +func (m *CloudPcBulkModifyDiskEncryptionType) GetDiskEncryptionType()(*CloudPcDiskEncryptionType) { + val, err := m.GetBackingStore().Get("diskEncryptionType") + if err != nil { + panic(err) + } + if val != nil { + return val.(*CloudPcDiskEncryptionType) + } + return nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcBulkModifyDiskEncryptionType) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.CloudPcBulkAction.GetFieldDeserializers() + res["diskEncryptionType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCloudPcDiskEncryptionType) + if err != nil { + return err + } + if val != nil { + m.SetDiskEncryptionType(val.(*CloudPcDiskEncryptionType)) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *CloudPcBulkModifyDiskEncryptionType) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.CloudPcBulkAction.Serialize(writer) + if err != nil { + return err + } + if m.GetDiskEncryptionType() != nil { + cast := (*m.GetDiskEncryptionType()).String() + err = writer.WriteStringValue("diskEncryptionType", &cast) + if err != nil { + return err + } + } + return nil +} +// SetDiskEncryptionType sets the diskEncryptionType property value. The diskEncryptionType property +func (m *CloudPcBulkModifyDiskEncryptionType) SetDiskEncryptionType(value *CloudPcDiskEncryptionType)() { + err := m.GetBackingStore().Set("diskEncryptionType", value) + if err != nil { + panic(err) + } +} +// CloudPcBulkModifyDiskEncryptionTypeable +type CloudPcBulkModifyDiskEncryptionTypeable interface { + CloudPcBulkActionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDiskEncryptionType()(*CloudPcDiskEncryptionType) + SetDiskEncryptionType(value *CloudPcDiskEncryptionType)() +} diff --git a/models/cloud_pc_cross_region_disaster_recovery_setting.go b/models/cloud_pc_cross_region_disaster_recovery_setting.go new file mode 100644 index 00000000000..e24913dc1b3 --- /dev/null +++ b/models/cloud_pc_cross_region_disaster_recovery_setting.go @@ -0,0 +1,218 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +// CloudPcCrossRegionDisasterRecoverySetting +type CloudPcCrossRegionDisasterRecoverySetting struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewCloudPcCrossRegionDisasterRecoverySetting instantiates a new cloudPcCrossRegionDisasterRecoverySetting and sets the default values. +func NewCloudPcCrossRegionDisasterRecoverySetting()(*CloudPcCrossRegionDisasterRecoverySetting) { + m := &CloudPcCrossRegionDisasterRecoverySetting{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCloudPcCrossRegionDisasterRecoverySettingFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcCrossRegionDisasterRecoverySettingFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcCrossRegionDisasterRecoverySetting(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *CloudPcCrossRegionDisasterRecoverySetting) GetAdditionalData()(map[string]any) { + val , err := m.backingStore.Get("additionalData") + if err != nil { + panic(err) + } + if val == nil { + var value = make(map[string]any); + m.SetAdditionalData(value); + } + return val.(map[string]any) +} +// GetBackingStore gets the BackingStore property value. Stores model information. +func (m *CloudPcCrossRegionDisasterRecoverySetting) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetCrossRegionDisasterRecoveryEnabled gets the crossRegionDisasterRecoveryEnabled property value. The crossRegionDisasterRecoveryEnabled property +func (m *CloudPcCrossRegionDisasterRecoverySetting) GetCrossRegionDisasterRecoveryEnabled()(*bool) { + val, err := m.GetBackingStore().Get("crossRegionDisasterRecoveryEnabled") + if err != nil { + panic(err) + } + if val != nil { + return val.(*bool) + } + return nil +} +// GetDisasterRecoveryNetworkSetting gets the disasterRecoveryNetworkSetting property value. The disasterRecoveryNetworkSetting property +func (m *CloudPcCrossRegionDisasterRecoverySetting) GetDisasterRecoveryNetworkSetting()(CloudPcDisasterRecoveryNetworkSettingable) { + val, err := m.GetBackingStore().Get("disasterRecoveryNetworkSetting") + if err != nil { + panic(err) + } + if val != nil { + return val.(CloudPcDisasterRecoveryNetworkSettingable) + } + return nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcCrossRegionDisasterRecoverySetting) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["crossRegionDisasterRecoveryEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCrossRegionDisasterRecoveryEnabled(val) + } + return nil + } + res["disasterRecoveryNetworkSetting"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCloudPcDisasterRecoveryNetworkSettingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDisasterRecoveryNetworkSetting(val.(CloudPcDisasterRecoveryNetworkSettingable)) + } + return nil + } + res["maintainCrossRegionRestorePointEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMaintainCrossRegionRestorePointEnabled(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 +} +// GetMaintainCrossRegionRestorePointEnabled gets the maintainCrossRegionRestorePointEnabled property value. The maintainCrossRegionRestorePointEnabled property +func (m *CloudPcCrossRegionDisasterRecoverySetting) GetMaintainCrossRegionRestorePointEnabled()(*bool) { + val, err := m.GetBackingStore().Get("maintainCrossRegionRestorePointEnabled") + if err != nil { + panic(err) + } + if val != nil { + return val.(*bool) + } + return nil +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *CloudPcCrossRegionDisasterRecoverySetting) 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 *CloudPcCrossRegionDisasterRecoverySetting) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("crossRegionDisasterRecoveryEnabled", m.GetCrossRegionDisasterRecoveryEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("disasterRecoveryNetworkSetting", m.GetDisasterRecoveryNetworkSetting()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("maintainCrossRegionRestorePointEnabled", m.GetMaintainCrossRegionRestorePointEnabled()) + 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 *CloudPcCrossRegionDisasterRecoverySetting) 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 *CloudPcCrossRegionDisasterRecoverySetting) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetCrossRegionDisasterRecoveryEnabled sets the crossRegionDisasterRecoveryEnabled property value. The crossRegionDisasterRecoveryEnabled property +func (m *CloudPcCrossRegionDisasterRecoverySetting) SetCrossRegionDisasterRecoveryEnabled(value *bool)() { + err := m.GetBackingStore().Set("crossRegionDisasterRecoveryEnabled", value) + if err != nil { + panic(err) + } +} +// SetDisasterRecoveryNetworkSetting sets the disasterRecoveryNetworkSetting property value. The disasterRecoveryNetworkSetting property +func (m *CloudPcCrossRegionDisasterRecoverySetting) SetDisasterRecoveryNetworkSetting(value CloudPcDisasterRecoveryNetworkSettingable)() { + err := m.GetBackingStore().Set("disasterRecoveryNetworkSetting", value) + if err != nil { + panic(err) + } +} +// SetMaintainCrossRegionRestorePointEnabled sets the maintainCrossRegionRestorePointEnabled property value. The maintainCrossRegionRestorePointEnabled property +func (m *CloudPcCrossRegionDisasterRecoverySetting) SetMaintainCrossRegionRestorePointEnabled(value *bool)() { + err := m.GetBackingStore().Set("maintainCrossRegionRestorePointEnabled", value) + if err != nil { + panic(err) + } +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *CloudPcCrossRegionDisasterRecoverySetting) SetOdataType(value *string)() { + err := m.GetBackingStore().Set("odataType", value) + if err != nil { + panic(err) + } +} +// CloudPcCrossRegionDisasterRecoverySettingable +type CloudPcCrossRegionDisasterRecoverySettingable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetCrossRegionDisasterRecoveryEnabled()(*bool) + GetDisasterRecoveryNetworkSetting()(CloudPcDisasterRecoveryNetworkSettingable) + GetMaintainCrossRegionRestorePointEnabled()(*bool) + GetOdataType()(*string) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetCrossRegionDisasterRecoveryEnabled(value *bool)() + SetDisasterRecoveryNetworkSetting(value CloudPcDisasterRecoveryNetworkSettingable)() + SetMaintainCrossRegionRestorePointEnabled(value *bool)() + SetOdataType(value *string)() +} diff --git a/models/cloud_pc_device_image.go b/models/cloud_pc_device_image.go index 2b86b317d9d..b287c3639f2 100644 --- a/models/cloud_pc_device_image.go +++ b/models/cloud_pc_device_image.go @@ -31,6 +31,17 @@ func (m *CloudPcDeviceImage) GetDisplayName()(*string) { } return nil } +// GetErrorCode gets the errorCode property value. The errorCode property +func (m *CloudPcDeviceImage) GetErrorCode()(*CloudPcDeviceImageErrorCode) { + val, err := m.GetBackingStore().Get("errorCode") + if err != nil { + panic(err) + } + if val != nil { + return val.(*CloudPcDeviceImageErrorCode) + } + return nil +} // GetExpirationDate gets the expirationDate property value. The date the image became unavailable. func (m *CloudPcDeviceImage) GetExpirationDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { val, err := m.GetBackingStore().Get("expirationDate") @@ -55,6 +66,16 @@ func (m *CloudPcDeviceImage) GetFieldDeserializers()(map[string]func(i878a80d233 } return nil } + res["errorCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCloudPcDeviceImageErrorCode) + if err != nil { + return err + } + if val != nil { + m.SetErrorCode(val.(*CloudPcDeviceImageErrorCode)) + } + return nil + } res["expirationDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetDateOnlyValue() if err != nil { @@ -274,6 +295,13 @@ func (m *CloudPcDeviceImage) Serialize(writer i878a80d2330e89d26896388a3f487eef2 return err } } + if m.GetErrorCode() != nil { + cast := (*m.GetErrorCode()).String() + err = writer.WriteStringValue("errorCode", &cast) + if err != nil { + return err + } + } { err = writer.WriteDateOnlyValue("expirationDate", m.GetExpirationDate()) if err != nil { @@ -346,6 +374,13 @@ func (m *CloudPcDeviceImage) SetDisplayName(value *string)() { panic(err) } } +// SetErrorCode sets the errorCode property value. The errorCode property +func (m *CloudPcDeviceImage) SetErrorCode(value *CloudPcDeviceImageErrorCode)() { + err := m.GetBackingStore().Set("errorCode", value) + if err != nil { + panic(err) + } +} // SetExpirationDate sets the expirationDate property value. The date the image became unavailable. func (m *CloudPcDeviceImage) SetExpirationDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { err := m.GetBackingStore().Set("expirationDate", value) @@ -421,6 +456,7 @@ type CloudPcDeviceImageable interface { Entityable i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetDisplayName()(*string) + GetErrorCode()(*CloudPcDeviceImageErrorCode) GetExpirationDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) GetOperatingSystem()(*string) @@ -432,6 +468,7 @@ type CloudPcDeviceImageable interface { GetStatusDetails()(*CloudPcDeviceImageStatusDetails) GetVersion()(*string) SetDisplayName(value *string)() + SetErrorCode(value *CloudPcDeviceImageErrorCode)() SetExpirationDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() SetOperatingSystem(value *string)() diff --git a/models/cloud_pc_device_image_error_code.go b/models/cloud_pc_device_image_error_code.go new file mode 100644 index 00000000000..07dea689c50 --- /dev/null +++ b/models/cloud_pc_device_image_error_code.go @@ -0,0 +1,61 @@ +package models +import ( + "errors" +) +// +type CloudPcDeviceImageErrorCode int + +const ( + INTERNALSERVERERROR_CLOUDPCDEVICEIMAGEERRORCODE CloudPcDeviceImageErrorCode = iota + SOURCEIMAGENOTFOUND_CLOUDPCDEVICEIMAGEERRORCODE + OSVERSIONNOTSUPPORTED_CLOUDPCDEVICEIMAGEERRORCODE + SOURCEIMAGEINVALID_CLOUDPCDEVICEIMAGEERRORCODE + SOURCEIMAGENOTGENERALIZED_CLOUDPCDEVICEIMAGEERRORCODE + UNKNOWNFUTUREVALUE_CLOUDPCDEVICEIMAGEERRORCODE + VMALREADYAZUREADJOINED_CLOUDPCDEVICEIMAGEERRORCODE + PAIDSOURCEIMAGENOTSUPPORT_CLOUDPCDEVICEIMAGEERRORCODE + SOURCEIMAGENOTSUPPORTCUSTOMIZEVMNAME_CLOUDPCDEVICEIMAGEERRORCODE + SOURCEIMAGESIZEEXCEEDSLIMITATION_CLOUDPCDEVICEIMAGEERRORCODE +) + +func (i CloudPcDeviceImageErrorCode) String() string { + return []string{"internalServerError", "sourceImageNotFound", "osVersionNotSupported", "sourceImageInvalid", "sourceImageNotGeneralized", "unknownFutureValue", "vmAlreadyAzureAdjoined", "paidSourceImageNotSupport", "sourceImageNotSupportCustomizeVMName", "sourceImageSizeExceedsLimitation"}[i] +} +func ParseCloudPcDeviceImageErrorCode(v string) (any, error) { + result := INTERNALSERVERERROR_CLOUDPCDEVICEIMAGEERRORCODE + switch v { + case "internalServerError": + result = INTERNALSERVERERROR_CLOUDPCDEVICEIMAGEERRORCODE + case "sourceImageNotFound": + result = SOURCEIMAGENOTFOUND_CLOUDPCDEVICEIMAGEERRORCODE + case "osVersionNotSupported": + result = OSVERSIONNOTSUPPORTED_CLOUDPCDEVICEIMAGEERRORCODE + case "sourceImageInvalid": + result = SOURCEIMAGEINVALID_CLOUDPCDEVICEIMAGEERRORCODE + case "sourceImageNotGeneralized": + result = SOURCEIMAGENOTGENERALIZED_CLOUDPCDEVICEIMAGEERRORCODE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CLOUDPCDEVICEIMAGEERRORCODE + case "vmAlreadyAzureAdjoined": + result = VMALREADYAZUREADJOINED_CLOUDPCDEVICEIMAGEERRORCODE + case "paidSourceImageNotSupport": + result = PAIDSOURCEIMAGENOTSUPPORT_CLOUDPCDEVICEIMAGEERRORCODE + case "sourceImageNotSupportCustomizeVMName": + result = SOURCEIMAGENOTSUPPORTCUSTOMIZEVMNAME_CLOUDPCDEVICEIMAGEERRORCODE + case "sourceImageSizeExceedsLimitation": + result = SOURCEIMAGESIZEEXCEEDSLIMITATION_CLOUDPCDEVICEIMAGEERRORCODE + default: + return 0, errors.New("Unknown CloudPcDeviceImageErrorCode value: " + v) + } + return &result, nil +} +func SerializeCloudPcDeviceImageErrorCode(values []CloudPcDeviceImageErrorCode) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CloudPcDeviceImageErrorCode) isMultiValue() bool { + return false +} diff --git a/models/cloud_pc_device_image_os_status.go b/models/cloud_pc_device_image_os_status.go index b860d79361d..4d289e78396 100644 --- a/models/cloud_pc_device_image_os_status.go +++ b/models/cloud_pc_device_image_os_status.go @@ -8,11 +8,12 @@ type CloudPcDeviceImageOsStatus int const ( SUPPORTED_CLOUDPCDEVICEIMAGEOSSTATUS CloudPcDeviceImageOsStatus = iota SUPPORTEDWITHWARNING_CLOUDPCDEVICEIMAGEOSSTATUS + UNKNOWN_CLOUDPCDEVICEIMAGEOSSTATUS UNKNOWNFUTUREVALUE_CLOUDPCDEVICEIMAGEOSSTATUS ) func (i CloudPcDeviceImageOsStatus) String() string { - return []string{"supported", "supportedWithWarning", "unknownFutureValue"}[i] + return []string{"supported", "supportedWithWarning", "unknown", "unknownFutureValue"}[i] } func ParseCloudPcDeviceImageOsStatus(v string) (any, error) { result := SUPPORTED_CLOUDPCDEVICEIMAGEOSSTATUS @@ -21,6 +22,8 @@ func ParseCloudPcDeviceImageOsStatus(v string) (any, error) { result = SUPPORTED_CLOUDPCDEVICEIMAGEOSSTATUS case "supportedWithWarning": result = SUPPORTEDWITHWARNING_CLOUDPCDEVICEIMAGEOSSTATUS + case "unknown": + result = UNKNOWN_CLOUDPCDEVICEIMAGEOSSTATUS case "unknownFutureValue": result = UNKNOWNFUTUREVALUE_CLOUDPCDEVICEIMAGEOSSTATUS default: diff --git a/models/cloud_pc_device_image_status.go b/models/cloud_pc_device_image_status.go index 29c2e9c4dc3..23e4f026931 100644 --- a/models/cloud_pc_device_image_status.go +++ b/models/cloud_pc_device_image_status.go @@ -9,10 +9,11 @@ const ( PENDING_CLOUDPCDEVICEIMAGESTATUS CloudPcDeviceImageStatus = iota READY_CLOUDPCDEVICEIMAGESTATUS FAILED_CLOUDPCDEVICEIMAGESTATUS + UNKNOWNFUTUREVALUE_CLOUDPCDEVICEIMAGESTATUS ) func (i CloudPcDeviceImageStatus) String() string { - return []string{"pending", "ready", "failed"}[i] + return []string{"pending", "ready", "failed", "unknownFutureValue"}[i] } func ParseCloudPcDeviceImageStatus(v string) (any, error) { result := PENDING_CLOUDPCDEVICEIMAGESTATUS @@ -23,6 +24,8 @@ func ParseCloudPcDeviceImageStatus(v string) (any, error) { result = READY_CLOUDPCDEVICEIMAGESTATUS case "failed": result = FAILED_CLOUDPCDEVICEIMAGESTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CLOUDPCDEVICEIMAGESTATUS default: return 0, errors.New("Unknown CloudPcDeviceImageStatus value: " + v) } diff --git a/models/cloud_pc_disaster_recovery_azure_connection_setting.go b/models/cloud_pc_disaster_recovery_azure_connection_setting.go new file mode 100644 index 00000000000..538b1f9b898 --- /dev/null +++ b/models/cloud_pc_disaster_recovery_azure_connection_setting.go @@ -0,0 +1,77 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcDisasterRecoveryAzureConnectionSetting +type CloudPcDisasterRecoveryAzureConnectionSetting struct { + CloudPcDisasterRecoveryNetworkSetting +} +// NewCloudPcDisasterRecoveryAzureConnectionSetting instantiates a new cloudPcDisasterRecoveryAzureConnectionSetting and sets the default values. +func NewCloudPcDisasterRecoveryAzureConnectionSetting()(*CloudPcDisasterRecoveryAzureConnectionSetting) { + m := &CloudPcDisasterRecoveryAzureConnectionSetting{ + CloudPcDisasterRecoveryNetworkSetting: *NewCloudPcDisasterRecoveryNetworkSetting(), + } + odataTypeValue := "#microsoft.graph.cloudPcDisasterRecoveryAzureConnectionSetting" + m.SetOdataType(&odataTypeValue) + return m +} +// CreateCloudPcDisasterRecoveryAzureConnectionSettingFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcDisasterRecoveryAzureConnectionSettingFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcDisasterRecoveryAzureConnectionSetting(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcDisasterRecoveryAzureConnectionSetting) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.CloudPcDisasterRecoveryNetworkSetting.GetFieldDeserializers() + res["onPremisesConnectionId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOnPremisesConnectionId(val) + } + return nil + } + return res +} +// GetOnPremisesConnectionId gets the onPremisesConnectionId property value. The onPremisesConnectionId property +func (m *CloudPcDisasterRecoveryAzureConnectionSetting) GetOnPremisesConnectionId()(*string) { + val, err := m.GetBackingStore().Get("onPremisesConnectionId") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// Serialize serializes information the current object +func (m *CloudPcDisasterRecoveryAzureConnectionSetting) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.CloudPcDisasterRecoveryNetworkSetting.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("onPremisesConnectionId", m.GetOnPremisesConnectionId()) + if err != nil { + return err + } + } + return nil +} +// SetOnPremisesConnectionId sets the onPremisesConnectionId property value. The onPremisesConnectionId property +func (m *CloudPcDisasterRecoveryAzureConnectionSetting) SetOnPremisesConnectionId(value *string)() { + err := m.GetBackingStore().Set("onPremisesConnectionId", value) + if err != nil { + panic(err) + } +} +// CloudPcDisasterRecoveryAzureConnectionSettingable +type CloudPcDisasterRecoveryAzureConnectionSettingable interface { + CloudPcDisasterRecoveryNetworkSettingable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOnPremisesConnectionId()(*string) + SetOnPremisesConnectionId(value *string)() +} diff --git a/models/cloud_pc_disaster_recovery_capability.go b/models/cloud_pc_disaster_recovery_capability.go new file mode 100644 index 00000000000..991ed18e9ab --- /dev/null +++ b/models/cloud_pc_disaster_recovery_capability.go @@ -0,0 +1,219 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +// CloudPcDisasterRecoveryCapability +type CloudPcDisasterRecoveryCapability struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewCloudPcDisasterRecoveryCapability instantiates a new cloudPcDisasterRecoveryCapability and sets the default values. +func NewCloudPcDisasterRecoveryCapability()(*CloudPcDisasterRecoveryCapability) { + m := &CloudPcDisasterRecoveryCapability{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCloudPcDisasterRecoveryCapabilityFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcDisasterRecoveryCapabilityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcDisasterRecoveryCapability(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *CloudPcDisasterRecoveryCapability) GetAdditionalData()(map[string]any) { + val , err := m.backingStore.Get("additionalData") + if err != nil { + panic(err) + } + if val == nil { + var value = make(map[string]any); + m.SetAdditionalData(value); + } + return val.(map[string]any) +} +// GetBackingStore gets the BackingStore property value. Stores model information. +func (m *CloudPcDisasterRecoveryCapability) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetCapabilityType gets the capabilityType property value. The capabilityType property +func (m *CloudPcDisasterRecoveryCapability) GetCapabilityType()(*CloudPcDisasterRecoveryCapabilityType) { + val, err := m.GetBackingStore().Get("capabilityType") + if err != nil { + panic(err) + } + if val != nil { + return val.(*CloudPcDisasterRecoveryCapabilityType) + } + return nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcDisasterRecoveryCapability) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["capabilityType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCloudPcDisasterRecoveryCapabilityType) + if err != nil { + return err + } + if val != nil { + m.SetCapabilityType(val.(*CloudPcDisasterRecoveryCapabilityType)) + } + 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["primaryRegion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPrimaryRegion(val) + } + return nil + } + res["secondaryRegion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSecondaryRegion(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *CloudPcDisasterRecoveryCapability) GetOdataType()(*string) { + val, err := m.GetBackingStore().Get("odataType") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetPrimaryRegion gets the primaryRegion property value. The primaryRegion property +func (m *CloudPcDisasterRecoveryCapability) GetPrimaryRegion()(*string) { + val, err := m.GetBackingStore().Get("primaryRegion") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetSecondaryRegion gets the secondaryRegion property value. The secondaryRegion property +func (m *CloudPcDisasterRecoveryCapability) GetSecondaryRegion()(*string) { + val, err := m.GetBackingStore().Get("secondaryRegion") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// Serialize serializes information the current object +func (m *CloudPcDisasterRecoveryCapability) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetCapabilityType() != nil { + cast := (*m.GetCapabilityType()).String() + err := writer.WriteStringValue("capabilityType", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("primaryRegion", m.GetPrimaryRegion()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("secondaryRegion", m.GetSecondaryRegion()) + 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 *CloudPcDisasterRecoveryCapability) 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 *CloudPcDisasterRecoveryCapability) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetCapabilityType sets the capabilityType property value. The capabilityType property +func (m *CloudPcDisasterRecoveryCapability) SetCapabilityType(value *CloudPcDisasterRecoveryCapabilityType)() { + err := m.GetBackingStore().Set("capabilityType", value) + if err != nil { + panic(err) + } +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *CloudPcDisasterRecoveryCapability) SetOdataType(value *string)() { + err := m.GetBackingStore().Set("odataType", value) + if err != nil { + panic(err) + } +} +// SetPrimaryRegion sets the primaryRegion property value. The primaryRegion property +func (m *CloudPcDisasterRecoveryCapability) SetPrimaryRegion(value *string)() { + err := m.GetBackingStore().Set("primaryRegion", value) + if err != nil { + panic(err) + } +} +// SetSecondaryRegion sets the secondaryRegion property value. The secondaryRegion property +func (m *CloudPcDisasterRecoveryCapability) SetSecondaryRegion(value *string)() { + err := m.GetBackingStore().Set("secondaryRegion", value) + if err != nil { + panic(err) + } +} +// CloudPcDisasterRecoveryCapabilityable +type CloudPcDisasterRecoveryCapabilityable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetCapabilityType()(*CloudPcDisasterRecoveryCapabilityType) + GetOdataType()(*string) + GetPrimaryRegion()(*string) + GetSecondaryRegion()(*string) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetCapabilityType(value *CloudPcDisasterRecoveryCapabilityType)() + SetOdataType(value *string)() + SetPrimaryRegion(value *string)() + SetSecondaryRegion(value *string)() +} diff --git a/models/cloud_pc_disaster_recovery_capability_type.go b/models/cloud_pc_disaster_recovery_capability_type.go new file mode 100644 index 00000000000..6602134be1d --- /dev/null +++ b/models/cloud_pc_disaster_recovery_capability_type.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// +type CloudPcDisasterRecoveryCapabilityType int + +const ( + NONE_CLOUDPCDISASTERRECOVERYCAPABILITYTYPE CloudPcDisasterRecoveryCapabilityType = iota + FAILOVER_CLOUDPCDISASTERRECOVERYCAPABILITYTYPE + FAILBACK_CLOUDPCDISASTERRECOVERYCAPABILITYTYPE + UNKNOWNFUTUREVALUE_CLOUDPCDISASTERRECOVERYCAPABILITYTYPE +) + +func (i CloudPcDisasterRecoveryCapabilityType) String() string { + return []string{"none", "failover", "failback", "unknownFutureValue"}[i] +} +func ParseCloudPcDisasterRecoveryCapabilityType(v string) (any, error) { + result := NONE_CLOUDPCDISASTERRECOVERYCAPABILITYTYPE + switch v { + case "none": + result = NONE_CLOUDPCDISASTERRECOVERYCAPABILITYTYPE + case "failover": + result = FAILOVER_CLOUDPCDISASTERRECOVERYCAPABILITYTYPE + case "failback": + result = FAILBACK_CLOUDPCDISASTERRECOVERYCAPABILITYTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CLOUDPCDISASTERRECOVERYCAPABILITYTYPE + default: + return 0, errors.New("Unknown CloudPcDisasterRecoveryCapabilityType value: " + v) + } + return &result, nil +} +func SerializeCloudPcDisasterRecoveryCapabilityType(values []CloudPcDisasterRecoveryCapabilityType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CloudPcDisasterRecoveryCapabilityType) isMultiValue() bool { + return false +} diff --git a/models/cloud_pc_disaster_recovery_microsoft_hosted_network_setting.go b/models/cloud_pc_disaster_recovery_microsoft_hosted_network_setting.go new file mode 100644 index 00000000000..c098105e09f --- /dev/null +++ b/models/cloud_pc_disaster_recovery_microsoft_hosted_network_setting.go @@ -0,0 +1,114 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcDisasterRecoveryMicrosoftHostedNetworkSetting +type CloudPcDisasterRecoveryMicrosoftHostedNetworkSetting struct { + CloudPcDisasterRecoveryNetworkSetting +} +// NewCloudPcDisasterRecoveryMicrosoftHostedNetworkSetting instantiates a new cloudPcDisasterRecoveryMicrosoftHostedNetworkSetting and sets the default values. +func NewCloudPcDisasterRecoveryMicrosoftHostedNetworkSetting()(*CloudPcDisasterRecoveryMicrosoftHostedNetworkSetting) { + m := &CloudPcDisasterRecoveryMicrosoftHostedNetworkSetting{ + CloudPcDisasterRecoveryNetworkSetting: *NewCloudPcDisasterRecoveryNetworkSetting(), + } + odataTypeValue := "#microsoft.graph.cloudPcDisasterRecoveryMicrosoftHostedNetworkSetting" + m.SetOdataType(&odataTypeValue) + return m +} +// CreateCloudPcDisasterRecoveryMicrosoftHostedNetworkSettingFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcDisasterRecoveryMicrosoftHostedNetworkSettingFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcDisasterRecoveryMicrosoftHostedNetworkSetting(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcDisasterRecoveryMicrosoftHostedNetworkSetting) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.CloudPcDisasterRecoveryNetworkSetting.GetFieldDeserializers() + res["regionGroup"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCloudPcRegionGroup) + if err != nil { + return err + } + if val != nil { + m.SetRegionGroup(val.(*CloudPcRegionGroup)) + } + return nil + } + res["regionName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRegionName(val) + } + return nil + } + return res +} +// GetRegionGroup gets the regionGroup property value. The regionGroup property +func (m *CloudPcDisasterRecoveryMicrosoftHostedNetworkSetting) GetRegionGroup()(*CloudPcRegionGroup) { + val, err := m.GetBackingStore().Get("regionGroup") + if err != nil { + panic(err) + } + if val != nil { + return val.(*CloudPcRegionGroup) + } + return nil +} +// GetRegionName gets the regionName property value. The regionName property +func (m *CloudPcDisasterRecoveryMicrosoftHostedNetworkSetting) GetRegionName()(*string) { + val, err := m.GetBackingStore().Get("regionName") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// Serialize serializes information the current object +func (m *CloudPcDisasterRecoveryMicrosoftHostedNetworkSetting) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.CloudPcDisasterRecoveryNetworkSetting.Serialize(writer) + if err != nil { + return err + } + if m.GetRegionGroup() != nil { + cast := (*m.GetRegionGroup()).String() + err = writer.WriteStringValue("regionGroup", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("regionName", m.GetRegionName()) + if err != nil { + return err + } + } + return nil +} +// SetRegionGroup sets the regionGroup property value. The regionGroup property +func (m *CloudPcDisasterRecoveryMicrosoftHostedNetworkSetting) SetRegionGroup(value *CloudPcRegionGroup)() { + err := m.GetBackingStore().Set("regionGroup", value) + if err != nil { + panic(err) + } +} +// SetRegionName sets the regionName property value. The regionName property +func (m *CloudPcDisasterRecoveryMicrosoftHostedNetworkSetting) SetRegionName(value *string)() { + err := m.GetBackingStore().Set("regionName", value) + if err != nil { + panic(err) + } +} +// CloudPcDisasterRecoveryMicrosoftHostedNetworkSettingable +type CloudPcDisasterRecoveryMicrosoftHostedNetworkSettingable interface { + CloudPcDisasterRecoveryNetworkSettingable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRegionGroup()(*CloudPcRegionGroup) + GetRegionName()(*string) + SetRegionGroup(value *CloudPcRegionGroup)() + SetRegionName(value *string)() +} diff --git a/models/cloud_pc_disaster_recovery_network_setting.go b/models/cloud_pc_disaster_recovery_network_setting.go new file mode 100644 index 00000000000..011dd52504d --- /dev/null +++ b/models/cloud_pc_disaster_recovery_network_setting.go @@ -0,0 +1,130 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +// CloudPcDisasterRecoveryNetworkSetting +type CloudPcDisasterRecoveryNetworkSetting struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewCloudPcDisasterRecoveryNetworkSetting instantiates a new cloudPcDisasterRecoveryNetworkSetting and sets the default values. +func NewCloudPcDisasterRecoveryNetworkSetting()(*CloudPcDisasterRecoveryNetworkSetting) { + m := &CloudPcDisasterRecoveryNetworkSetting{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCloudPcDisasterRecoveryNetworkSettingFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcDisasterRecoveryNetworkSettingFromDiscriminatorValue(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.cloudPcDisasterRecoveryAzureConnectionSetting": + return NewCloudPcDisasterRecoveryAzureConnectionSetting(), nil + case "#microsoft.graph.cloudPcDisasterRecoveryMicrosoftHostedNetworkSetting": + return NewCloudPcDisasterRecoveryMicrosoftHostedNetworkSetting(), nil + } + } + } + } + return NewCloudPcDisasterRecoveryNetworkSetting(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *CloudPcDisasterRecoveryNetworkSetting) GetAdditionalData()(map[string]any) { + val , err := m.backingStore.Get("additionalData") + if err != nil { + panic(err) + } + if val == nil { + var value = make(map[string]any); + m.SetAdditionalData(value); + } + return val.(map[string]any) +} +// GetBackingStore gets the BackingStore property value. Stores model information. +func (m *CloudPcDisasterRecoveryNetworkSetting) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcDisasterRecoveryNetworkSetting) 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 +func (m *CloudPcDisasterRecoveryNetworkSetting) 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 *CloudPcDisasterRecoveryNetworkSetting) 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 *CloudPcDisasterRecoveryNetworkSetting) 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 *CloudPcDisasterRecoveryNetworkSetting) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *CloudPcDisasterRecoveryNetworkSetting) SetOdataType(value *string)() { + err := m.GetBackingStore().Set("odataType", value) + if err != nil { + panic(err) + } +} +// CloudPcDisasterRecoveryNetworkSettingable +type CloudPcDisasterRecoveryNetworkSettingable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetOdataType()(*string) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetOdataType(value *string)() +} diff --git a/models/cloud_pc_domain_join_configuration.go b/models/cloud_pc_domain_join_configuration.go index 17d5e32cdf1..40ef455f8fe 100644 --- a/models/cloud_pc_domain_join_configuration.go +++ b/models/cloud_pc_domain_join_configuration.go @@ -38,9 +38,30 @@ func (m *CloudPcDomainJoinConfiguration) GetAdditionalData()(map[string]any) { func (m *CloudPcDomainJoinConfiguration) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { return m.backingStore } +// GetDomainJoinType gets the domainJoinType property value. The domainJoinType property +func (m *CloudPcDomainJoinConfiguration) GetDomainJoinType()(*CloudPcDomainJoinType) { + val, err := m.GetBackingStore().Get("domainJoinType") + if err != nil { + panic(err) + } + if val != nil { + return val.(*CloudPcDomainJoinType) + } + return nil +} // GetFieldDeserializers the deserialization information for the current model func (m *CloudPcDomainJoinConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["domainJoinType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCloudPcDomainJoinType) + if err != nil { + return err + } + if val != nil { + m.SetDomainJoinType(val.(*CloudPcDomainJoinType)) + } + return nil + } res["@odata.type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -150,6 +171,13 @@ func (m *CloudPcDomainJoinConfiguration) GetTypeEscaped()(*CloudPcDomainJoinType } // Serialize serializes information the current object func (m *CloudPcDomainJoinConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetDomainJoinType() != nil { + cast := (*m.GetDomainJoinType()).String() + err := writer.WriteStringValue("domainJoinType", &cast) + if err != nil { + return err + } + } { err := writer.WriteStringValue("@odata.type", m.GetOdataType()) if err != nil { @@ -201,6 +229,13 @@ func (m *CloudPcDomainJoinConfiguration) SetAdditionalData(value map[string]any) func (m *CloudPcDomainJoinConfiguration) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { m.backingStore = value } +// SetDomainJoinType sets the domainJoinType property value. The domainJoinType property +func (m *CloudPcDomainJoinConfiguration) SetDomainJoinType(value *CloudPcDomainJoinType)() { + err := m.GetBackingStore().Set("domainJoinType", value) + if err != nil { + panic(err) + } +} // SetOdataType sets the @odata.type property value. The OdataType property func (m *CloudPcDomainJoinConfiguration) SetOdataType(value *string)() { err := m.GetBackingStore().Set("odataType", value) @@ -242,12 +277,14 @@ type CloudPcDomainJoinConfigurationable interface { ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetDomainJoinType()(*CloudPcDomainJoinType) GetOdataType()(*string) GetOnPremisesConnectionId()(*string) GetRegionGroup()(*CloudPcRegionGroup) GetRegionName()(*string) GetTypeEscaped()(*CloudPcDomainJoinType) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetDomainJoinType(value *CloudPcDomainJoinType)() SetOdataType(value *string)() SetOnPremisesConnectionId(value *string)() SetRegionGroup(value *CloudPcRegionGroup)() diff --git a/models/cloud_pc_gallery_image.go b/models/cloud_pc_gallery_image.go index d0e6b1564ff..c4155c045c6 100644 --- a/models/cloud_pc_gallery_image.go +++ b/models/cloud_pc_gallery_image.go @@ -105,6 +105,16 @@ func (m *CloudPcGalleryImage) GetFieldDeserializers()(map[string]func(i878a80d23 } return nil } + res["offerName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOfferName(val) + } + return nil + } res["publisher"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -115,6 +125,16 @@ func (m *CloudPcGalleryImage) GetFieldDeserializers()(map[string]func(i878a80d23 } return nil } + res["publisherName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPublisherName(val) + } + return nil + } res["recommendedSku"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -155,6 +175,16 @@ func (m *CloudPcGalleryImage) GetFieldDeserializers()(map[string]func(i878a80d23 } return nil } + res["skuName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSkuName(val) + } + return nil + } res["startDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetDateOnlyValue() if err != nil { @@ -199,6 +229,17 @@ func (m *CloudPcGalleryImage) GetOfferDisplayName()(*string) { } return nil } +// GetOfferName gets the offerName property value. The offerName property +func (m *CloudPcGalleryImage) GetOfferName()(*string) { + val, err := m.GetBackingStore().Get("offerName") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} // GetPublisher gets the publisher property value. The publisher name of the gallery image. This value is passed to Azure to get the image resource. Read-only. func (m *CloudPcGalleryImage) GetPublisher()(*string) { val, err := m.GetBackingStore().Get("publisher") @@ -210,6 +251,17 @@ func (m *CloudPcGalleryImage) GetPublisher()(*string) { } return nil } +// GetPublisherName gets the publisherName property value. The publisherName property +func (m *CloudPcGalleryImage) GetPublisherName()(*string) { + val, err := m.GetBackingStore().Get("publisherName") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} // GetRecommendedSku gets the recommendedSku property value. Recommended Cloud PC SKU for this gallery image. Read-only. func (m *CloudPcGalleryImage) GetRecommendedSku()(*string) { val, err := m.GetBackingStore().Get("recommendedSku") @@ -254,6 +306,17 @@ func (m *CloudPcGalleryImage) GetSkuDisplayName()(*string) { } return nil } +// GetSkuName gets the skuName property value. The skuName property +func (m *CloudPcGalleryImage) GetSkuName()(*string) { + val, err := m.GetBackingStore().Get("skuName") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} // GetStartDate gets the startDate property value. The date when the image becomes available. Read-only. func (m *CloudPcGalleryImage) GetStartDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { val, err := m.GetBackingStore().Get("startDate") @@ -312,12 +375,24 @@ func (m *CloudPcGalleryImage) Serialize(writer i878a80d2330e89d26896388a3f487eef return err } } + { + err = writer.WriteStringValue("offerName", m.GetOfferName()) + if err != nil { + return err + } + } { err = writer.WriteStringValue("publisher", m.GetPublisher()) if err != nil { return err } } + { + err = writer.WriteStringValue("publisherName", m.GetPublisherName()) + if err != nil { + return err + } + } { err = writer.WriteStringValue("recommendedSku", m.GetRecommendedSku()) if err != nil { @@ -342,6 +417,12 @@ func (m *CloudPcGalleryImage) Serialize(writer i878a80d2330e89d26896388a3f487eef return err } } + { + err = writer.WriteStringValue("skuName", m.GetSkuName()) + if err != nil { + return err + } + } { err = writer.WriteDateOnlyValue("startDate", m.GetStartDate()) if err != nil { @@ -392,6 +473,13 @@ func (m *CloudPcGalleryImage) SetOfferDisplayName(value *string)() { panic(err) } } +// SetOfferName sets the offerName property value. The offerName property +func (m *CloudPcGalleryImage) SetOfferName(value *string)() { + err := m.GetBackingStore().Set("offerName", value) + if err != nil { + panic(err) + } +} // SetPublisher sets the publisher property value. The publisher name of the gallery image. This value is passed to Azure to get the image resource. Read-only. func (m *CloudPcGalleryImage) SetPublisher(value *string)() { err := m.GetBackingStore().Set("publisher", value) @@ -399,6 +487,13 @@ func (m *CloudPcGalleryImage) SetPublisher(value *string)() { panic(err) } } +// SetPublisherName sets the publisherName property value. The publisherName property +func (m *CloudPcGalleryImage) SetPublisherName(value *string)() { + err := m.GetBackingStore().Set("publisherName", value) + if err != nil { + panic(err) + } +} // SetRecommendedSku sets the recommendedSku property value. Recommended Cloud PC SKU for this gallery image. Read-only. func (m *CloudPcGalleryImage) SetRecommendedSku(value *string)() { err := m.GetBackingStore().Set("recommendedSku", value) @@ -427,6 +522,13 @@ func (m *CloudPcGalleryImage) SetSkuDisplayName(value *string)() { panic(err) } } +// SetSkuName sets the skuName property value. The skuName property +func (m *CloudPcGalleryImage) SetSkuName(value *string)() { + err := m.GetBackingStore().Set("skuName", value) + if err != nil { + panic(err) + } +} // SetStartDate sets the startDate property value. The date when the image becomes available. Read-only. func (m *CloudPcGalleryImage) SetStartDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { err := m.GetBackingStore().Set("startDate", value) @@ -450,11 +552,14 @@ type CloudPcGalleryImageable interface { GetExpirationDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) GetOffer()(*string) GetOfferDisplayName()(*string) + GetOfferName()(*string) GetPublisher()(*string) + GetPublisherName()(*string) GetRecommendedSku()(*string) GetSizeInGB()(*int32) GetSku()(*string) GetSkuDisplayName()(*string) + GetSkuName()(*string) GetStartDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) GetStatus()(*CloudPcGalleryImageStatus) SetDisplayName(value *string)() @@ -462,11 +567,14 @@ type CloudPcGalleryImageable interface { SetExpirationDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() SetOffer(value *string)() SetOfferDisplayName(value *string)() + SetOfferName(value *string)() SetPublisher(value *string)() + SetPublisherName(value *string)() SetRecommendedSku(value *string)() SetSizeInGB(value *int32)() SetSku(value *string)() SetSkuDisplayName(value *string)() + SetSkuName(value *string)() SetStartDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() SetStatus(value *CloudPcGalleryImageStatus)() } diff --git a/models/cloud_pc_on_premises_connection.go b/models/cloud_pc_on_premises_connection.go index 333f63afec7..1070adc896c 100644 --- a/models/cloud_pc_on_premises_connection.go +++ b/models/cloud_pc_on_premises_connection.go @@ -63,6 +63,17 @@ func (m *CloudPcOnPremisesConnection) GetAlternateResourceUrl()(*string) { } return nil } +// GetConnectionType gets the connectionType property value. The connectionType property +func (m *CloudPcOnPremisesConnection) GetConnectionType()(*CloudPcOnPremisesConnectionType) { + val, err := m.GetBackingStore().Get("connectionType") + if err != nil { + panic(err) + } + if val != nil { + return val.(*CloudPcOnPremisesConnectionType) + } + return nil +} // GetDisplayName gets the displayName property value. The display name for the Azure network connection. func (m *CloudPcOnPremisesConnection) GetDisplayName()(*string) { val, err := m.GetBackingStore().Get("displayName") @@ -117,6 +128,16 @@ func (m *CloudPcOnPremisesConnection) GetFieldDeserializers()(map[string]func(i8 } return nil } + res["connectionType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCloudPcOnPremisesConnectionType) + if err != nil { + return err + } + if val != nil { + m.SetConnectionType(val.(*CloudPcOnPremisesConnectionType)) + } + return nil + } res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -137,6 +158,16 @@ func (m *CloudPcOnPremisesConnection) GetFieldDeserializers()(map[string]func(i8 } return nil } + res["healthCheckStatusDetail"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCloudPcOnPremisesConnectionStatusDetailFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetHealthCheckStatusDetail(val.(CloudPcOnPremisesConnectionStatusDetailable)) + } + return nil + } res["healthCheckStatusDetails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(CreateCloudPcOnPremisesConnectionStatusDetailsFromDiscriminatorValue) if err != nil { @@ -276,6 +307,17 @@ func (m *CloudPcOnPremisesConnection) GetHealthCheckStatus()(*CloudPcOnPremisesC } return nil } +// GetHealthCheckStatusDetail gets the healthCheckStatusDetail property value. The healthCheckStatusDetail property +func (m *CloudPcOnPremisesConnection) GetHealthCheckStatusDetail()(CloudPcOnPremisesConnectionStatusDetailable) { + val, err := m.GetBackingStore().Get("healthCheckStatusDetail") + if err != nil { + panic(err) + } + if val != nil { + return val.(CloudPcOnPremisesConnectionStatusDetailable) + } + return nil +} // GetHealthCheckStatusDetails gets the healthCheckStatusDetails property value. The details of the connection's health checks and the corresponding results. Returned only on $select. For an example that shows how to get the inUse property, see Example 2: Get the selected properties of an Azure network connection, including healthCheckStatusDetails. Read-only. func (m *CloudPcOnPremisesConnection) GetHealthCheckStatusDetails()(CloudPcOnPremisesConnectionStatusDetailsable) { val, err := m.GetBackingStore().Get("healthCheckStatusDetails") @@ -438,6 +480,13 @@ func (m *CloudPcOnPremisesConnection) Serialize(writer i878a80d2330e89d26896388a return err } } + if m.GetConnectionType() != nil { + cast := (*m.GetConnectionType()).String() + err = writer.WriteStringValue("connectionType", &cast) + if err != nil { + return err + } + } { err = writer.WriteStringValue("displayName", m.GetDisplayName()) if err != nil { @@ -451,6 +500,12 @@ func (m *CloudPcOnPremisesConnection) Serialize(writer i878a80d2330e89d26896388a return err } } + { + err = writer.WriteObjectValue("healthCheckStatusDetail", m.GetHealthCheckStatusDetail()) + if err != nil { + return err + } + } { err = writer.WriteObjectValue("healthCheckStatusDetails", m.GetHealthCheckStatusDetails()) if err != nil { @@ -555,6 +610,13 @@ func (m *CloudPcOnPremisesConnection) SetAlternateResourceUrl(value *string)() { panic(err) } } +// SetConnectionType sets the connectionType property value. The connectionType property +func (m *CloudPcOnPremisesConnection) SetConnectionType(value *CloudPcOnPremisesConnectionType)() { + err := m.GetBackingStore().Set("connectionType", value) + if err != nil { + panic(err) + } +} // SetDisplayName sets the displayName property value. The display name for the Azure network connection. func (m *CloudPcOnPremisesConnection) SetDisplayName(value *string)() { err := m.GetBackingStore().Set("displayName", value) @@ -569,6 +631,13 @@ func (m *CloudPcOnPremisesConnection) SetHealthCheckStatus(value *CloudPcOnPremi panic(err) } } +// SetHealthCheckStatusDetail sets the healthCheckStatusDetail property value. The healthCheckStatusDetail property +func (m *CloudPcOnPremisesConnection) SetHealthCheckStatusDetail(value CloudPcOnPremisesConnectionStatusDetailable)() { + err := m.GetBackingStore().Set("healthCheckStatusDetail", value) + if err != nil { + panic(err) + } +} // SetHealthCheckStatusDetails sets the healthCheckStatusDetails property value. The details of the connection's health checks and the corresponding results. Returned only on $select. For an example that shows how to get the inUse property, see Example 2: Get the selected properties of an Azure network connection, including healthCheckStatusDetails. Read-only. func (m *CloudPcOnPremisesConnection) SetHealthCheckStatusDetails(value CloudPcOnPremisesConnectionStatusDetailsable)() { err := m.GetBackingStore().Set("healthCheckStatusDetails", value) @@ -661,8 +730,10 @@ type CloudPcOnPremisesConnectionable interface { GetAdDomainPassword()(*string) GetAdDomainUsername()(*string) GetAlternateResourceUrl()(*string) + GetConnectionType()(*CloudPcOnPremisesConnectionType) GetDisplayName()(*string) GetHealthCheckStatus()(*CloudPcOnPremisesConnectionStatus) + GetHealthCheckStatusDetail()(CloudPcOnPremisesConnectionStatusDetailable) GetHealthCheckStatusDetails()(CloudPcOnPremisesConnectionStatusDetailsable) GetInUse()(*bool) GetManagedBy()(*CloudPcManagementService) @@ -679,8 +750,10 @@ type CloudPcOnPremisesConnectionable interface { SetAdDomainPassword(value *string)() SetAdDomainUsername(value *string)() SetAlternateResourceUrl(value *string)() + SetConnectionType(value *CloudPcOnPremisesConnectionType)() SetDisplayName(value *string)() SetHealthCheckStatus(value *CloudPcOnPremisesConnectionStatus)() + SetHealthCheckStatusDetail(value CloudPcOnPremisesConnectionStatusDetailable)() SetHealthCheckStatusDetails(value CloudPcOnPremisesConnectionStatusDetailsable)() SetInUse(value *bool)() SetManagedBy(value *CloudPcManagementService)() diff --git a/models/cloud_pc_on_premises_connection_health_check.go b/models/cloud_pc_on_premises_connection_health_check.go index 3973eb6bee4..8dfdc999be2 100644 --- a/models/cloud_pc_on_premises_connection_health_check.go +++ b/models/cloud_pc_on_premises_connection_health_check.go @@ -35,6 +35,17 @@ func (m *CloudPcOnPremisesConnectionHealthCheck) GetAdditionalData()(map[string] } return val.(map[string]any) } +// GetAdditionalDetail gets the additionalDetail property value. The additionalDetail property +func (m *CloudPcOnPremisesConnectionHealthCheck) GetAdditionalDetail()(*string) { + val, err := m.GetBackingStore().Get("additionalDetail") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} // GetAdditionalDetails gets the additionalDetails property value. More details about the health check or the recommended action. func (m *CloudPcOnPremisesConnectionHealthCheck) GetAdditionalDetails()(*string) { val, err := m.GetBackingStore().Get("additionalDetails") @@ -97,6 +108,16 @@ func (m *CloudPcOnPremisesConnectionHealthCheck) GetErrorType()(*CloudPcOnPremis // GetFieldDeserializers the deserialization information for the current model func (m *CloudPcOnPremisesConnectionHealthCheck) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["additionalDetail"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAdditionalDetail(val) + } + return nil + } res["additionalDetails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -235,6 +256,12 @@ func (m *CloudPcOnPremisesConnectionHealthCheck) GetStatus()(*CloudPcOnPremisesC } // Serialize serializes information the current object func (m *CloudPcOnPremisesConnectionHealthCheck) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("additionalDetail", m.GetAdditionalDetail()) + if err != nil { + return err + } + } { err := writer.WriteStringValue("additionalDetails", m.GetAdditionalDetails()) if err != nil { @@ -306,6 +333,13 @@ func (m *CloudPcOnPremisesConnectionHealthCheck) SetAdditionalData(value map[str panic(err) } } +// SetAdditionalDetail sets the additionalDetail property value. The additionalDetail property +func (m *CloudPcOnPremisesConnectionHealthCheck) SetAdditionalDetail(value *string)() { + err := m.GetBackingStore().Set("additionalDetail", value) + if err != nil { + panic(err) + } +} // SetAdditionalDetails sets the additionalDetails property value. More details about the health check or the recommended action. func (m *CloudPcOnPremisesConnectionHealthCheck) SetAdditionalDetails(value *string)() { err := m.GetBackingStore().Set("additionalDetails", value) @@ -378,6 +412,7 @@ type CloudPcOnPremisesConnectionHealthCheckable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdditionalDetail()(*string) GetAdditionalDetails()(*string) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) GetCorrelationId()(*string) @@ -388,6 +423,7 @@ type CloudPcOnPremisesConnectionHealthCheckable interface { GetRecommendedAction()(*string) GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) GetStatus()(*CloudPcOnPremisesConnectionStatus) + SetAdditionalDetail(value *string)() SetAdditionalDetails(value *string)() SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() SetCorrelationId(value *string)() diff --git a/models/cloud_pc_on_premises_connection_status_detail.go b/models/cloud_pc_on_premises_connection_status_detail.go new file mode 100644 index 00000000000..234f902e6cc --- /dev/null +++ b/models/cloud_pc_on_premises_connection_status_detail.go @@ -0,0 +1,231 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +// CloudPcOnPremisesConnectionStatusDetail +type CloudPcOnPremisesConnectionStatusDetail struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewCloudPcOnPremisesConnectionStatusDetail instantiates a new cloudPcOnPremisesConnectionStatusDetail and sets the default values. +func NewCloudPcOnPremisesConnectionStatusDetail()(*CloudPcOnPremisesConnectionStatusDetail) { + m := &CloudPcOnPremisesConnectionStatusDetail{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCloudPcOnPremisesConnectionStatusDetailFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcOnPremisesConnectionStatusDetailFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcOnPremisesConnectionStatusDetail(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *CloudPcOnPremisesConnectionStatusDetail) GetAdditionalData()(map[string]any) { + val , err := m.backingStore.Get("additionalData") + if err != nil { + panic(err) + } + if val == nil { + var value = make(map[string]any); + m.SetAdditionalData(value); + } + return val.(map[string]any) +} +// GetBackingStore gets the BackingStore property value. Stores model information. +func (m *CloudPcOnPremisesConnectionStatusDetail) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetEndDateTime gets the endDateTime property value. The endDateTime property +func (m *CloudPcOnPremisesConnectionStatusDetail) GetEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + val, err := m.GetBackingStore().Get("endDateTime") + if err != nil { + panic(err) + } + if val != nil { + return val.(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + } + return nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcOnPremisesConnectionStatusDetail) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["endDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetEndDateTime(val) + } + return nil + } + res["healthChecks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCloudPcOnPremisesConnectionHealthCheckFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CloudPcOnPremisesConnectionHealthCheckable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(CloudPcOnPremisesConnectionHealthCheckable) + } + } + m.SetHealthChecks(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["startDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetStartDateTime(val) + } + return nil + } + return res +} +// GetHealthChecks gets the healthChecks property value. The healthChecks property +func (m *CloudPcOnPremisesConnectionStatusDetail) GetHealthChecks()([]CloudPcOnPremisesConnectionHealthCheckable) { + val, err := m.GetBackingStore().Get("healthChecks") + if err != nil { + panic(err) + } + if val != nil { + return val.([]CloudPcOnPremisesConnectionHealthCheckable) + } + return nil +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *CloudPcOnPremisesConnectionStatusDetail) GetOdataType()(*string) { + val, err := m.GetBackingStore().Get("odataType") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetStartDateTime gets the startDateTime property value. The startDateTime property +func (m *CloudPcOnPremisesConnectionStatusDetail) GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + val, err := m.GetBackingStore().Get("startDateTime") + if err != nil { + panic(err) + } + if val != nil { + return val.(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + } + return nil +} +// Serialize serializes information the current object +func (m *CloudPcOnPremisesConnectionStatusDetail) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("endDateTime", m.GetEndDateTime()) + if err != nil { + return err + } + } + if m.GetHealthChecks() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetHealthChecks())) + for i, v := range m.GetHealthChecks() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("healthChecks", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("startDateTime", m.GetStartDateTime()) + 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 *CloudPcOnPremisesConnectionStatusDetail) 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 *CloudPcOnPremisesConnectionStatusDetail) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetEndDateTime sets the endDateTime property value. The endDateTime property +func (m *CloudPcOnPremisesConnectionStatusDetail) SetEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + err := m.GetBackingStore().Set("endDateTime", value) + if err != nil { + panic(err) + } +} +// SetHealthChecks sets the healthChecks property value. The healthChecks property +func (m *CloudPcOnPremisesConnectionStatusDetail) SetHealthChecks(value []CloudPcOnPremisesConnectionHealthCheckable)() { + err := m.GetBackingStore().Set("healthChecks", value) + if err != nil { + panic(err) + } +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *CloudPcOnPremisesConnectionStatusDetail) SetOdataType(value *string)() { + err := m.GetBackingStore().Set("odataType", value) + if err != nil { + panic(err) + } +} +// SetStartDateTime sets the startDateTime property value. The startDateTime property +func (m *CloudPcOnPremisesConnectionStatusDetail) SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + err := m.GetBackingStore().Set("startDateTime", value) + if err != nil { + panic(err) + } +} +// CloudPcOnPremisesConnectionStatusDetailable +type CloudPcOnPremisesConnectionStatusDetailable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetHealthChecks()([]CloudPcOnPremisesConnectionHealthCheckable) + GetOdataType()(*string) + GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetHealthChecks(value []CloudPcOnPremisesConnectionHealthCheckable)() + SetOdataType(value *string)() + SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/models/cloud_pc_provisioning_policy.go b/models/cloud_pc_provisioning_policy.go index 0188cb8f04f..a4d13dea08e 100644 --- a/models/cloud_pc_provisioning_policy.go +++ b/models/cloud_pc_provisioning_policy.go @@ -329,6 +329,16 @@ func (m *CloudPcProvisioningPolicy) GetFieldDeserializers()(map[string]func(i878 } return nil } + res["windowsSetting"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCloudPcWindowsSettingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetWindowsSetting(val.(CloudPcWindowsSettingable)) + } + return nil + } res["windowsSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(CreateCloudPcWindowsSettingsFromDiscriminatorValue) if err != nil { @@ -451,6 +461,17 @@ func (m *CloudPcProvisioningPolicy) GetScopeIds()([]string) { } return nil } +// GetWindowsSetting gets the windowsSetting property value. The windowsSetting property +func (m *CloudPcProvisioningPolicy) GetWindowsSetting()(CloudPcWindowsSettingable) { + val, err := m.GetBackingStore().Get("windowsSetting") + if err != nil { + panic(err) + } + if val != nil { + return val.(CloudPcWindowsSettingable) + } + return nil +} // GetWindowsSettings gets the windowsSettings property value. Specific Windows settings to configure while creating Cloud PCs for this provisioning policy. func (m *CloudPcProvisioningPolicy) GetWindowsSettings()(CloudPcWindowsSettingsable) { val, err := m.GetBackingStore().Get("windowsSettings") @@ -597,6 +618,12 @@ func (m *CloudPcProvisioningPolicy) Serialize(writer i878a80d2330e89d26896388a3f return err } } + { + err = writer.WriteObjectValue("windowsSetting", m.GetWindowsSetting()) + if err != nil { + return err + } + } { err = writer.WriteObjectValue("windowsSettings", m.GetWindowsSettings()) if err != nil { @@ -738,6 +765,13 @@ func (m *CloudPcProvisioningPolicy) SetScopeIds(value []string)() { panic(err) } } +// SetWindowsSetting sets the windowsSetting property value. The windowsSetting property +func (m *CloudPcProvisioningPolicy) SetWindowsSetting(value CloudPcWindowsSettingable)() { + err := m.GetBackingStore().Set("windowsSetting", value) + if err != nil { + panic(err) + } +} // SetWindowsSettings sets the windowsSettings property value. Specific Windows settings to configure while creating Cloud PCs for this provisioning policy. func (m *CloudPcProvisioningPolicy) SetWindowsSettings(value CloudPcWindowsSettingsable)() { err := m.GetBackingStore().Set("windowsSettings", value) @@ -768,6 +802,7 @@ type CloudPcProvisioningPolicyable interface { GetOnPremisesConnectionId()(*string) GetProvisioningType()(*CloudPcProvisioningType) GetScopeIds()([]string) + GetWindowsSetting()(CloudPcWindowsSettingable) GetWindowsSettings()(CloudPcWindowsSettingsable) SetAlternateResourceUrl(value *string)() SetAssignments(value []CloudPcProvisioningPolicyAssignmentable)() @@ -788,5 +823,6 @@ type CloudPcProvisioningPolicyable interface { SetOnPremisesConnectionId(value *string)() SetProvisioningType(value *CloudPcProvisioningType)() SetScopeIds(value []string)() + SetWindowsSetting(value CloudPcWindowsSettingable)() SetWindowsSettings(value CloudPcWindowsSettingsable)() } diff --git a/models/cloud_pc_provisioning_policy_image_type.go b/models/cloud_pc_provisioning_policy_image_type.go index 3fb3438e259..011c5f0c652 100644 --- a/models/cloud_pc_provisioning_policy_image_type.go +++ b/models/cloud_pc_provisioning_policy_image_type.go @@ -8,10 +8,11 @@ type CloudPcProvisioningPolicyImageType int const ( GALLERY_CLOUDPCPROVISIONINGPOLICYIMAGETYPE CloudPcProvisioningPolicyImageType = iota CUSTOM_CLOUDPCPROVISIONINGPOLICYIMAGETYPE + UNKNOWNFUTUREVALUE_CLOUDPCPROVISIONINGPOLICYIMAGETYPE ) func (i CloudPcProvisioningPolicyImageType) String() string { - return []string{"gallery", "custom"}[i] + return []string{"gallery", "custom", "unknownFutureValue"}[i] } func ParseCloudPcProvisioningPolicyImageType(v string) (any, error) { result := GALLERY_CLOUDPCPROVISIONINGPOLICYIMAGETYPE @@ -20,6 +21,8 @@ func ParseCloudPcProvisioningPolicyImageType(v string) (any, error) { result = GALLERY_CLOUDPCPROVISIONINGPOLICYIMAGETYPE case "custom": result = CUSTOM_CLOUDPCPROVISIONINGPOLICYIMAGETYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CLOUDPCPROVISIONINGPOLICYIMAGETYPE default: return 0, errors.New("Unknown CloudPcProvisioningPolicyImageType value: " + v) } diff --git a/models/cloud_pc_report_name.go b/models/cloud_pc_report_name.go index d5880c0b10e..6a45399e79d 100644 --- a/models/cloud_pc_report_name.go +++ b/models/cloud_pc_report_name.go @@ -19,10 +19,13 @@ const ( INACCESSIBLECLOUDPCREPORTS_CLOUDPCREPORTNAME RAWREMOTECONNECTIONREPORTS_CLOUDPCREPORTNAME CLOUDPCUSAGECATEGORYREPORTS_CLOUDPCREPORTNAME + CROSSREGIONDISASTERRECOVERYREPORT_CLOUDPCREPORTNAME + PERFORMANCETRENDREPORT_CLOUDPCREPORTNAME + INACCESSIBLECLOUDPCTRENDREPORT_CLOUDPCREPORTNAME ) func (i CloudPcReportName) String() string { - return []string{"remoteConnectionHistoricalReports", "dailyAggregatedRemoteConnectionReports", "totalAggregatedRemoteConnectionReports", "sharedUseLicenseUsageReport", "sharedUseLicenseUsageRealTimeReport", "unknownFutureValue", "noLicenseAvailableConnectivityFailureReport", "frontlineLicenseUsageReport", "frontlineLicenseUsageRealTimeReport", "remoteConnectionQualityReports", "inaccessibleCloudPcReports", "rawRemoteConnectionReports", "cloudPcUsageCategoryReports"}[i] + return []string{"remoteConnectionHistoricalReports", "dailyAggregatedRemoteConnectionReports", "totalAggregatedRemoteConnectionReports", "sharedUseLicenseUsageReport", "sharedUseLicenseUsageRealTimeReport", "unknownFutureValue", "noLicenseAvailableConnectivityFailureReport", "frontlineLicenseUsageReport", "frontlineLicenseUsageRealTimeReport", "remoteConnectionQualityReports", "inaccessibleCloudPcReports", "rawRemoteConnectionReports", "cloudPcUsageCategoryReports", "crossRegionDisasterRecoveryReport", "performanceTrendReport", "inaccessibleCloudPcTrendReport"}[i] } func ParseCloudPcReportName(v string) (any, error) { result := REMOTECONNECTIONHISTORICALREPORTS_CLOUDPCREPORTNAME @@ -53,6 +56,12 @@ func ParseCloudPcReportName(v string) (any, error) { result = RAWREMOTECONNECTIONREPORTS_CLOUDPCREPORTNAME case "cloudPcUsageCategoryReports": result = CLOUDPCUSAGECATEGORYREPORTS_CLOUDPCREPORTNAME + case "crossRegionDisasterRecoveryReport": + result = CROSSREGIONDISASTERRECOVERYREPORT_CLOUDPCREPORTNAME + case "performanceTrendReport": + result = PERFORMANCETRENDREPORT_CLOUDPCREPORTNAME + case "inaccessibleCloudPcTrendReport": + result = INACCESSIBLECLOUDPCTRENDREPORT_CLOUDPCREPORTNAME default: return 0, errors.New("Unknown CloudPcReportName value: " + v) } diff --git a/models/cloud_pc_restore_point_frequency_type.go b/models/cloud_pc_restore_point_frequency_type.go new file mode 100644 index 00000000000..789eb90a893 --- /dev/null +++ b/models/cloud_pc_restore_point_frequency_type.go @@ -0,0 +1,52 @@ +package models +import ( + "errors" +) +// +type CloudPcRestorePointFrequencyType int + +const ( + DEFAULTESCAPED_CLOUDPCRESTOREPOINTFREQUENCYTYPE CloudPcRestorePointFrequencyType = iota + FOURHOURS_CLOUDPCRESTOREPOINTFREQUENCYTYPE + SIXHOURS_CLOUDPCRESTOREPOINTFREQUENCYTYPE + TWELVEHOURS_CLOUDPCRESTOREPOINTFREQUENCYTYPE + SIXTEENHOURS_CLOUDPCRESTOREPOINTFREQUENCYTYPE + TWENTYFOURHOURS_CLOUDPCRESTOREPOINTFREQUENCYTYPE + UNKNOWNFUTUREVALUE_CLOUDPCRESTOREPOINTFREQUENCYTYPE +) + +func (i CloudPcRestorePointFrequencyType) String() string { + return []string{"default", "fourHours", "sixHours", "twelveHours", "sixteenHours", "twentyFourHours", "unknownFutureValue"}[i] +} +func ParseCloudPcRestorePointFrequencyType(v string) (any, error) { + result := DEFAULTESCAPED_CLOUDPCRESTOREPOINTFREQUENCYTYPE + switch v { + case "default": + result = DEFAULTESCAPED_CLOUDPCRESTOREPOINTFREQUENCYTYPE + case "fourHours": + result = FOURHOURS_CLOUDPCRESTOREPOINTFREQUENCYTYPE + case "sixHours": + result = SIXHOURS_CLOUDPCRESTOREPOINTFREQUENCYTYPE + case "twelveHours": + result = TWELVEHOURS_CLOUDPCRESTOREPOINTFREQUENCYTYPE + case "sixteenHours": + result = SIXTEENHOURS_CLOUDPCRESTOREPOINTFREQUENCYTYPE + case "twentyFourHours": + result = TWENTYFOURHOURS_CLOUDPCRESTOREPOINTFREQUENCYTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CLOUDPCRESTOREPOINTFREQUENCYTYPE + default: + return 0, errors.New("Unknown CloudPcRestorePointFrequencyType value: " + v) + } + return &result, nil +} +func SerializeCloudPcRestorePointFrequencyType(values []CloudPcRestorePointFrequencyType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CloudPcRestorePointFrequencyType) isMultiValue() bool { + return false +} diff --git a/models/cloud_pc_restore_point_setting.go b/models/cloud_pc_restore_point_setting.go index 0becbd66710..cc22d060c8d 100644 --- a/models/cloud_pc_restore_point_setting.go +++ b/models/cloud_pc_restore_point_setting.go @@ -51,6 +51,16 @@ func (m *CloudPcRestorePointSetting) GetFieldDeserializers()(map[string]func(i87 } return nil } + res["frequencyType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCloudPcRestorePointFrequencyType) + if err != nil { + return err + } + if val != nil { + m.SetFrequencyType(val.(*CloudPcRestorePointFrequencyType)) + } + return nil + } res["@odata.type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -84,6 +94,17 @@ func (m *CloudPcRestorePointSetting) GetFrequencyInHours()(*int32) { } return nil } +// GetFrequencyType gets the frequencyType property value. The frequencyType property +func (m *CloudPcRestorePointSetting) GetFrequencyType()(*CloudPcRestorePointFrequencyType) { + val, err := m.GetBackingStore().Get("frequencyType") + if err != nil { + panic(err) + } + if val != nil { + return val.(*CloudPcRestorePointFrequencyType) + } + return nil +} // GetOdataType gets the @odata.type property value. The OdataType property func (m *CloudPcRestorePointSetting) GetOdataType()(*string) { val, err := m.GetBackingStore().Get("odataType") @@ -114,6 +135,13 @@ func (m *CloudPcRestorePointSetting) Serialize(writer i878a80d2330e89d26896388a3 return err } } + if m.GetFrequencyType() != nil { + cast := (*m.GetFrequencyType()).String() + err := writer.WriteStringValue("frequencyType", &cast) + if err != nil { + return err + } + } { err := writer.WriteStringValue("@odata.type", m.GetOdataType()) if err != nil { @@ -152,6 +180,13 @@ func (m *CloudPcRestorePointSetting) SetFrequencyInHours(value *int32)() { panic(err) } } +// SetFrequencyType sets the frequencyType property value. The frequencyType property +func (m *CloudPcRestorePointSetting) SetFrequencyType(value *CloudPcRestorePointFrequencyType)() { + err := m.GetBackingStore().Set("frequencyType", value) + if err != nil { + panic(err) + } +} // SetOdataType sets the @odata.type property value. The OdataType property func (m *CloudPcRestorePointSetting) SetOdataType(value *string)() { err := m.GetBackingStore().Set("odataType", value) @@ -173,10 +208,12 @@ type CloudPcRestorePointSettingable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) GetFrequencyInHours()(*int32) + GetFrequencyType()(*CloudPcRestorePointFrequencyType) GetOdataType()(*string) GetUserRestoreEnabled()(*bool) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() SetFrequencyInHours(value *int32)() + SetFrequencyType(value *CloudPcRestorePointFrequencyType)() SetOdataType(value *string)() SetUserRestoreEnabled(value *bool)() } diff --git a/models/cloud_pc_source_device_image.go b/models/cloud_pc_source_device_image.go index 5cf645470b1..81b10f48f67 100644 --- a/models/cloud_pc_source_device_image.go +++ b/models/cloud_pc_source_device_image.go @@ -82,6 +82,16 @@ func (m *CloudPcSourceDeviceImage) GetFieldDeserializers()(map[string]func(i878a } return nil } + res["resourceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetResourceId(val) + } + return nil + } res["subscriptionDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -126,6 +136,17 @@ func (m *CloudPcSourceDeviceImage) GetOdataType()(*string) { } return nil } +// GetResourceId gets the resourceId property value. The resourceId property +func (m *CloudPcSourceDeviceImage) GetResourceId()(*string) { + val, err := m.GetBackingStore().Get("resourceId") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} // GetSubscriptionDisplayName gets the subscriptionDisplayName property value. The display name of subscription that hosts the source image. func (m *CloudPcSourceDeviceImage) GetSubscriptionDisplayName()(*string) { val, err := m.GetBackingStore().Get("subscriptionDisplayName") @@ -168,6 +189,12 @@ func (m *CloudPcSourceDeviceImage) Serialize(writer i878a80d2330e89d26896388a3f4 return err } } + { + err := writer.WriteStringValue("resourceId", m.GetResourceId()) + if err != nil { + return err + } + } { err := writer.WriteStringValue("subscriptionDisplayName", m.GetSubscriptionDisplayName()) if err != nil { @@ -220,6 +247,13 @@ func (m *CloudPcSourceDeviceImage) SetOdataType(value *string)() { panic(err) } } +// SetResourceId sets the resourceId property value. The resourceId property +func (m *CloudPcSourceDeviceImage) SetResourceId(value *string)() { + err := m.GetBackingStore().Set("resourceId", value) + if err != nil { + panic(err) + } +} // SetSubscriptionDisplayName sets the subscriptionDisplayName property value. The display name of subscription that hosts the source image. func (m *CloudPcSourceDeviceImage) SetSubscriptionDisplayName(value *string)() { err := m.GetBackingStore().Set("subscriptionDisplayName", value) @@ -243,12 +277,14 @@ type CloudPcSourceDeviceImageable interface { GetDisplayName()(*string) GetId()(*string) GetOdataType()(*string) + GetResourceId()(*string) GetSubscriptionDisplayName()(*string) GetSubscriptionId()(*string) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() SetDisplayName(value *string)() SetId(value *string)() SetOdataType(value *string)() + SetResourceId(value *string)() SetSubscriptionDisplayName(value *string)() SetSubscriptionId(value *string)() } diff --git a/models/cloud_pc_user_setting.go b/models/cloud_pc_user_setting.go index abee2a12419..4d9d8c27168 100644 --- a/models/cloud_pc_user_setting.go +++ b/models/cloud_pc_user_setting.go @@ -42,6 +42,17 @@ func (m *CloudPcUserSetting) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad } return nil } +// GetCrossRegionDisasterRecoverySetting gets the crossRegionDisasterRecoverySetting property value. The crossRegionDisasterRecoverySetting property +func (m *CloudPcUserSetting) GetCrossRegionDisasterRecoverySetting()(CloudPcCrossRegionDisasterRecoverySettingable) { + val, err := m.GetBackingStore().Get("crossRegionDisasterRecoverySetting") + if err != nil { + panic(err) + } + if val != nil { + return val.(CloudPcCrossRegionDisasterRecoverySettingable) + } + return nil +} // GetDisplayName gets the displayName property value. The setting name displayed in the user interface. func (m *CloudPcUserSetting) GetDisplayName()(*string) { val, err := m.GetBackingStore().Get("displayName") @@ -82,6 +93,16 @@ func (m *CloudPcUserSetting) GetFieldDeserializers()(map[string]func(i878a80d233 } return nil } + res["crossRegionDisasterRecoverySetting"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCloudPcCrossRegionDisasterRecoverySettingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCrossRegionDisasterRecoverySetting(val.(CloudPcCrossRegionDisasterRecoverySettingable)) + } + return nil + } res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -223,6 +244,12 @@ func (m *CloudPcUserSetting) Serialize(writer i878a80d2330e89d26896388a3f487eef2 return err } } + { + err = writer.WriteObjectValue("crossRegionDisasterRecoverySetting", m.GetCrossRegionDisasterRecoverySetting()) + if err != nil { + return err + } + } { err = writer.WriteStringValue("displayName", m.GetDisplayName()) if err != nil { @@ -275,6 +302,13 @@ func (m *CloudPcUserSetting) SetCreatedDateTime(value *i336074805fc853987abe6f7f panic(err) } } +// SetCrossRegionDisasterRecoverySetting sets the crossRegionDisasterRecoverySetting property value. The crossRegionDisasterRecoverySetting property +func (m *CloudPcUserSetting) SetCrossRegionDisasterRecoverySetting(value CloudPcCrossRegionDisasterRecoverySettingable)() { + err := m.GetBackingStore().Set("crossRegionDisasterRecoverySetting", value) + if err != nil { + panic(err) + } +} // SetDisplayName sets the displayName property value. The setting name displayed in the user interface. func (m *CloudPcUserSetting) SetDisplayName(value *string)() { err := m.GetBackingStore().Set("displayName", value) @@ -323,6 +357,7 @@ type CloudPcUserSettingable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetAssignments()([]CloudPcUserSettingAssignmentable) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCrossRegionDisasterRecoverySetting()(CloudPcCrossRegionDisasterRecoverySettingable) GetDisplayName()(*string) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) GetLocalAdminEnabled()(*bool) @@ -331,6 +366,7 @@ type CloudPcUserSettingable interface { GetSelfServiceEnabled()(*bool) SetAssignments(value []CloudPcUserSettingAssignmentable)() SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCrossRegionDisasterRecoverySetting(value CloudPcCrossRegionDisasterRecoverySettingable)() SetDisplayName(value *string)() SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() SetLocalAdminEnabled(value *bool)() diff --git a/models/cloud_pc_windows_setting.go b/models/cloud_pc_windows_setting.go new file mode 100644 index 00000000000..834d9466035 --- /dev/null +++ b/models/cloud_pc_windows_setting.go @@ -0,0 +1,146 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +// CloudPcWindowsSetting +type CloudPcWindowsSetting struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewCloudPcWindowsSetting instantiates a new cloudPcWindowsSetting and sets the default values. +func NewCloudPcWindowsSetting()(*CloudPcWindowsSetting) { + m := &CloudPcWindowsSetting{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCloudPcWindowsSettingFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcWindowsSettingFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcWindowsSetting(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *CloudPcWindowsSetting) GetAdditionalData()(map[string]any) { + val , err := m.backingStore.Get("additionalData") + if err != nil { + panic(err) + } + if val == nil { + var value = make(map[string]any); + m.SetAdditionalData(value); + } + return val.(map[string]any) +} +// GetBackingStore gets the BackingStore property value. Stores model information. +func (m *CloudPcWindowsSetting) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcWindowsSetting) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["locale"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLocale(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 +} +// GetLocale gets the locale property value. The locale property +func (m *CloudPcWindowsSetting) GetLocale()(*string) { + val, err := m.GetBackingStore().Get("locale") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *CloudPcWindowsSetting) 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 *CloudPcWindowsSetting) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("locale", m.GetLocale()) + 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 *CloudPcWindowsSetting) 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 *CloudPcWindowsSetting) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetLocale sets the locale property value. The locale property +func (m *CloudPcWindowsSetting) SetLocale(value *string)() { + err := m.GetBackingStore().Set("locale", value) + if err != nil { + panic(err) + } +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *CloudPcWindowsSetting) SetOdataType(value *string)() { + err := m.GetBackingStore().Set("odataType", value) + if err != nil { + panic(err) + } +} +// CloudPcWindowsSettingable +type CloudPcWindowsSettingable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetLocale()(*string) + GetOdataType()(*string) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetLocale(value *string)() + SetOdataType(value *string)() +} diff --git a/models/community.go b/models/community.go new file mode 100644 index 00000000000..d3475e34c28 --- /dev/null +++ b/models/community.go @@ -0,0 +1,268 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Community +type Community struct { + Entity +} +// NewCommunity instantiates a new community and sets the default values. +func NewCommunity()(*Community) { + m := &Community{ + Entity: *NewEntity(), + } + return m +} +// CreateCommunityFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCommunityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCommunity(), nil +} +// GetDescription gets the description property value. The description of the community. The maximum length is 1024 characters. +func (m *Community) GetDescription()(*string) { + val, err := m.GetBackingStore().Get("description") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetDisplayName gets the displayName property value. The name of the community. The maximum length is 255 characters. +func (m *Community) 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 +func (m *Community) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + 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["group"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateGroupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetGroup(val.(Groupable)) + } + return nil + } + res["groupId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGroupId(val) + } + return nil + } + res["owners"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Userable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(Userable) + } + } + m.SetOwners(res) + } + return nil + } + res["privacy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCommunityPrivacy) + if err != nil { + return err + } + if val != nil { + m.SetPrivacy(val.(*CommunityPrivacy)) + } + return nil + } + return res +} +// GetGroup gets the group property value. The Microsoft 365 group that manages the membership of this community. +func (m *Community) GetGroup()(Groupable) { + val, err := m.GetBackingStore().Get("group") + if err != nil { + panic(err) + } + if val != nil { + return val.(Groupable) + } + return nil +} +// GetGroupId gets the groupId property value. The ID of the Microsoft 365 group that manages the membership of this community. +func (m *Community) GetGroupId()(*string) { + val, err := m.GetBackingStore().Get("groupId") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetOwners gets the owners property value. The admins of the community. Limited to 100 users. If this property isn't specified when you create the community, the calling user is automatically assigned as the community owner. +func (m *Community) GetOwners()([]Userable) { + val, err := m.GetBackingStore().Get("owners") + if err != nil { + panic(err) + } + if val != nil { + return val.([]Userable) + } + return nil +} +// GetPrivacy gets the privacy property value. The privacy property +func (m *Community) GetPrivacy()(*CommunityPrivacy) { + val, err := m.GetBackingStore().Get("privacy") + if err != nil { + panic(err) + } + if val != nil { + return val.(*CommunityPrivacy) + } + return nil +} +// Serialize serializes information the current object +func (m *Community) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + 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("group", m.GetGroup()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("groupId", m.GetGroupId()) + if err != nil { + return err + } + } + if m.GetOwners() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetOwners())) + for i, v := range m.GetOwners() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err = writer.WriteCollectionOfObjectValues("owners", cast) + if err != nil { + return err + } + } + if m.GetPrivacy() != nil { + cast := (*m.GetPrivacy()).String() + err = writer.WriteStringValue("privacy", &cast) + if err != nil { + return err + } + } + return nil +} +// SetDescription sets the description property value. The description of the community. The maximum length is 1024 characters. +func (m *Community) SetDescription(value *string)() { + err := m.GetBackingStore().Set("description", value) + if err != nil { + panic(err) + } +} +// SetDisplayName sets the displayName property value. The name of the community. The maximum length is 255 characters. +func (m *Community) SetDisplayName(value *string)() { + err := m.GetBackingStore().Set("displayName", value) + if err != nil { + panic(err) + } +} +// SetGroup sets the group property value. The Microsoft 365 group that manages the membership of this community. +func (m *Community) SetGroup(value Groupable)() { + err := m.GetBackingStore().Set("group", value) + if err != nil { + panic(err) + } +} +// SetGroupId sets the groupId property value. The ID of the Microsoft 365 group that manages the membership of this community. +func (m *Community) SetGroupId(value *string)() { + err := m.GetBackingStore().Set("groupId", value) + if err != nil { + panic(err) + } +} +// SetOwners sets the owners property value. The admins of the community. Limited to 100 users. If this property isn't specified when you create the community, the calling user is automatically assigned as the community owner. +func (m *Community) SetOwners(value []Userable)() { + err := m.GetBackingStore().Set("owners", value) + if err != nil { + panic(err) + } +} +// SetPrivacy sets the privacy property value. The privacy property +func (m *Community) SetPrivacy(value *CommunityPrivacy)() { + err := m.GetBackingStore().Set("privacy", value) + if err != nil { + panic(err) + } +} +// Communityable +type Communityable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetDisplayName()(*string) + GetGroup()(Groupable) + GetGroupId()(*string) + GetOwners()([]Userable) + GetPrivacy()(*CommunityPrivacy) + SetDescription(value *string)() + SetDisplayName(value *string)() + SetGroup(value Groupable)() + SetGroupId(value *string)() + SetOwners(value []Userable)() + SetPrivacy(value *CommunityPrivacy)() +} diff --git a/models/community_collection_response.go b/models/community_collection_response.go new file mode 100644 index 00000000000..4b545c9dec6 --- /dev/null +++ b/models/community_collection_response.go @@ -0,0 +1,87 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CommunityCollectionResponse +type CommunityCollectionResponse struct { + BaseCollectionPaginationCountResponse +} +// NewCommunityCollectionResponse instantiates a new communityCollectionResponse and sets the default values. +func NewCommunityCollectionResponse()(*CommunityCollectionResponse) { + m := &CommunityCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCommunityCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCommunityCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCommunityCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CommunityCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCommunityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Communityable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(Communityable) + } + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CommunityCollectionResponse) GetValue()([]Communityable) { + val, err := m.GetBackingStore().Get("value") + if err != nil { + panic(err) + } + if val != nil { + return val.([]Communityable) + } + return nil +} +// Serialize serializes information the current object +func (m *CommunityCollectionResponse) 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 *CommunityCollectionResponse) SetValue(value []Communityable)() { + err := m.GetBackingStore().Set("value", value) + if err != nil { + panic(err) + } +} +// CommunityCollectionResponseable +type CommunityCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Communityable) + SetValue(value []Communityable)() +} diff --git a/models/community_privacy.go b/models/community_privacy.go new file mode 100644 index 00000000000..f01fc640e14 --- /dev/null +++ b/models/community_privacy.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// +type CommunityPrivacy int + +const ( + PUBLIC_COMMUNITYPRIVACY CommunityPrivacy = iota + PRIVATE_COMMUNITYPRIVACY + UNKNOWNFUTUREVALUE_COMMUNITYPRIVACY +) + +func (i CommunityPrivacy) String() string { + return []string{"public", "private", "unknownFutureValue"}[i] +} +func ParseCommunityPrivacy(v string) (any, error) { + result := PUBLIC_COMMUNITYPRIVACY + switch v { + case "public": + result = PUBLIC_COMMUNITYPRIVACY + case "private": + result = PRIVATE_COMMUNITYPRIVACY + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_COMMUNITYPRIVACY + default: + return 0, errors.New("Unknown CommunityPrivacy value: " + v) + } + return &result, nil +} +func SerializeCommunityPrivacy(values []CommunityPrivacy) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CommunityPrivacy) isMultiValue() bool { + return false +} diff --git a/models/custom_authentication_extension.go b/models/custom_authentication_extension.go index eb35d076e83..f2bfa50491f 100644 --- a/models/custom_authentication_extension.go +++ b/models/custom_authentication_extension.go @@ -31,6 +31,10 @@ func CreateCustomAuthenticationExtensionFromDiscriminatorValue(parseNode i878a80 } if mappingValue != nil { switch *mappingValue { + case "#microsoft.graph.onAttributeCollectionStartCustomExtension": + return NewOnAttributeCollectionStartCustomExtension(), nil + case "#microsoft.graph.onAttributeCollectionSubmitCustomExtension": + return NewOnAttributeCollectionSubmitCustomExtension(), nil case "#microsoft.graph.onTokenIssuanceStartCustomExtension": return NewOnTokenIssuanceStartCustomExtension(), nil } diff --git a/models/custom_callout_extension.go b/models/custom_callout_extension.go index da09fdf1403..8345e30c4e2 100644 --- a/models/custom_callout_extension.go +++ b/models/custom_callout_extension.go @@ -37,6 +37,10 @@ func CreateCustomCalloutExtensionFromDiscriminatorValue(parseNode i878a80d2330e8 return NewCustomAccessPackageWorkflowExtension(), nil case "#microsoft.graph.customAuthenticationExtension": return NewCustomAuthenticationExtension(), nil + case "#microsoft.graph.onAttributeCollectionStartCustomExtension": + return NewOnAttributeCollectionStartCustomExtension(), nil + case "#microsoft.graph.onAttributeCollectionSubmitCustomExtension": + return NewOnAttributeCollectionSubmitCustomExtension(), nil case "#microsoft.graph.onTokenIssuanceStartCustomExtension": return NewOnTokenIssuanceStartCustomExtension(), nil } diff --git a/models/custom_extension_overwrite_configuration.go b/models/custom_extension_overwrite_configuration.go index f78f10a349b..589c50e9a18 100644 --- a/models/custom_extension_overwrite_configuration.go +++ b/models/custom_extension_overwrite_configuration.go @@ -38,7 +38,7 @@ func (m *CustomExtensionOverwriteConfiguration) GetAdditionalData()(map[string]a func (m *CustomExtensionOverwriteConfiguration) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { return m.backingStore } -// GetClientConfiguration gets the clientConfiguration property value. The clientConfiguration property +// GetClientConfiguration gets the clientConfiguration property value. Optional. Configuration of calling external API, such as timeout, retryCount, retriableResponseCodes. func (m *CustomExtensionOverwriteConfiguration) GetClientConfiguration()(CustomExtensionClientConfigurationable) { val, err := m.GetBackingStore().Get("clientConfiguration") if err != nil { @@ -118,7 +118,7 @@ func (m *CustomExtensionOverwriteConfiguration) SetAdditionalData(value map[stri func (m *CustomExtensionOverwriteConfiguration) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { m.backingStore = value } -// SetClientConfiguration sets the clientConfiguration property value. The clientConfiguration property +// SetClientConfiguration sets the clientConfiguration property value. Optional. Configuration of calling external API, such as timeout, retryCount, retriableResponseCodes. func (m *CustomExtensionOverwriteConfiguration) SetClientConfiguration(value CustomExtensionClientConfigurationable)() { err := m.GetBackingStore().Set("clientConfiguration", value) if err != nil { diff --git a/models/device_management_configuration_choice_setting_collection_definition.go b/models/device_management_configuration_choice_setting_collection_definition.go index 6d19e09fb8c..7fbf0c2f4b5 100644 --- a/models/device_management_configuration_choice_setting_collection_definition.go +++ b/models/device_management_configuration_choice_setting_collection_definition.go @@ -44,7 +44,7 @@ func (m *DeviceManagementConfigurationChoiceSettingCollectionDefinition) GetFiel } return res } -// GetMaximumCount gets the maximumCount property value. Maximum number of choices in the collection. Valid values 1 to 100 +// GetMaximumCount gets the maximumCount property value. Maximum number of choices in the collection func (m *DeviceManagementConfigurationChoiceSettingCollectionDefinition) GetMaximumCount()(*int32) { val, err := m.GetBackingStore().Get("maximumCount") if err != nil { @@ -55,7 +55,7 @@ func (m *DeviceManagementConfigurationChoiceSettingCollectionDefinition) GetMaxi } return nil } -// GetMinimumCount gets the minimumCount property value. Minimum number of choices in the collection. Valid values 1 to 100 +// GetMinimumCount gets the minimumCount property value. Minimum number of choices in the collection func (m *DeviceManagementConfigurationChoiceSettingCollectionDefinition) GetMinimumCount()(*int32) { val, err := m.GetBackingStore().Get("minimumCount") if err != nil { @@ -86,14 +86,14 @@ func (m *DeviceManagementConfigurationChoiceSettingCollectionDefinition) Seriali } return nil } -// SetMaximumCount sets the maximumCount property value. Maximum number of choices in the collection. Valid values 1 to 100 +// SetMaximumCount sets the maximumCount property value. Maximum number of choices in the collection func (m *DeviceManagementConfigurationChoiceSettingCollectionDefinition) SetMaximumCount(value *int32)() { err := m.GetBackingStore().Set("maximumCount", value) if err != nil { panic(err) } } -// SetMinimumCount sets the minimumCount property value. Minimum number of choices in the collection. Valid values 1 to 100 +// SetMinimumCount sets the minimumCount property value. Minimum number of choices in the collection func (m *DeviceManagementConfigurationChoiceSettingCollectionDefinition) SetMinimumCount(value *int32)() { err := m.GetBackingStore().Set("minimumCount", value) if err != nil { diff --git a/models/device_management_configuration_referred_setting_information.go b/models/device_management_configuration_referred_setting_information.go index 32aedc01dab..8fddbb0e965 100644 --- a/models/device_management_configuration_referred_setting_information.go +++ b/models/device_management_configuration_referred_setting_information.go @@ -74,7 +74,7 @@ func (m *DeviceManagementConfigurationReferredSettingInformation) GetOdataType() } return nil } -// GetSettingDefinitionId gets the settingDefinitionId property value. Setting definition id that is being referred to a setting. Applicable for reusable setting. +// GetSettingDefinitionId gets the settingDefinitionId property value. Setting definition id that is being referred to a setting. Applicable for reusable setting func (m *DeviceManagementConfigurationReferredSettingInformation) GetSettingDefinitionId()(*string) { val, err := m.GetBackingStore().Get("settingDefinitionId") if err != nil { @@ -125,7 +125,7 @@ func (m *DeviceManagementConfigurationReferredSettingInformation) SetOdataType(v panic(err) } } -// SetSettingDefinitionId sets the settingDefinitionId property value. Setting definition id that is being referred to a setting. Applicable for reusable setting. +// SetSettingDefinitionId sets the settingDefinitionId property value. Setting definition id that is being referred to a setting. Applicable for reusable setting func (m *DeviceManagementConfigurationReferredSettingInformation) SetSettingDefinitionId(value *string)() { err := m.GetBackingStore().Set("settingDefinitionId", value) if err != nil { diff --git a/models/device_management_configuration_setting_group_collection_definition.go b/models/device_management_configuration_setting_group_collection_definition.go index 1b640305b33..7702cbf6faf 100644 --- a/models/device_management_configuration_setting_group_collection_definition.go +++ b/models/device_management_configuration_setting_group_collection_definition.go @@ -44,7 +44,7 @@ func (m *DeviceManagementConfigurationSettingGroupCollectionDefinition) GetField } return res } -// GetMaximumCount gets the maximumCount property value. Maximum number of setting group count in the collection. Valid values 1 to 100 +// GetMaximumCount gets the maximumCount property value. Maximum number of setting group count in the collection func (m *DeviceManagementConfigurationSettingGroupCollectionDefinition) GetMaximumCount()(*int32) { val, err := m.GetBackingStore().Get("maximumCount") if err != nil { @@ -55,7 +55,7 @@ func (m *DeviceManagementConfigurationSettingGroupCollectionDefinition) GetMaxim } return nil } -// GetMinimumCount gets the minimumCount property value. Minimum number of setting group count in the collection. Valid values 1 to 100 +// GetMinimumCount gets the minimumCount property value. Minimum number of setting group count in the collection func (m *DeviceManagementConfigurationSettingGroupCollectionDefinition) GetMinimumCount()(*int32) { val, err := m.GetBackingStore().Get("minimumCount") if err != nil { @@ -86,14 +86,14 @@ func (m *DeviceManagementConfigurationSettingGroupCollectionDefinition) Serializ } return nil } -// SetMaximumCount sets the maximumCount property value. Maximum number of setting group count in the collection. Valid values 1 to 100 +// SetMaximumCount sets the maximumCount property value. Maximum number of setting group count in the collection func (m *DeviceManagementConfigurationSettingGroupCollectionDefinition) SetMaximumCount(value *int32)() { err := m.GetBackingStore().Set("maximumCount", value) if err != nil { panic(err) } } -// SetMinimumCount sets the minimumCount property value. Minimum number of setting group count in the collection. Valid values 1 to 100 +// SetMinimumCount sets the minimumCount property value. Minimum number of setting group count in the collection func (m *DeviceManagementConfigurationSettingGroupCollectionDefinition) SetMinimumCount(value *int32)() { err := m.GetBackingStore().Set("minimumCount", value) if err != nil { diff --git a/models/device_management_configuration_simple_setting_collection_definition.go b/models/device_management_configuration_simple_setting_collection_definition.go index 492062bd79a..85c8cbd8299 100644 --- a/models/device_management_configuration_simple_setting_collection_definition.go +++ b/models/device_management_configuration_simple_setting_collection_definition.go @@ -44,7 +44,7 @@ func (m *DeviceManagementConfigurationSimpleSettingCollectionDefinition) GetFiel } return res } -// GetMaximumCount gets the maximumCount property value. Maximum number of simple settings in the collection +// GetMaximumCount gets the maximumCount property value. Maximum number of simple settings in the collection. Valid values 1 to 100 func (m *DeviceManagementConfigurationSimpleSettingCollectionDefinition) GetMaximumCount()(*int32) { val, err := m.GetBackingStore().Get("maximumCount") if err != nil { @@ -55,7 +55,7 @@ func (m *DeviceManagementConfigurationSimpleSettingCollectionDefinition) GetMaxi } return nil } -// GetMinimumCount gets the minimumCount property value. Minimum number of simple settings in the collection +// GetMinimumCount gets the minimumCount property value. Minimum number of simple settings in the collection. Valid values 1 to 100 func (m *DeviceManagementConfigurationSimpleSettingCollectionDefinition) GetMinimumCount()(*int32) { val, err := m.GetBackingStore().Get("minimumCount") if err != nil { @@ -86,14 +86,14 @@ func (m *DeviceManagementConfigurationSimpleSettingCollectionDefinition) Seriali } return nil } -// SetMaximumCount sets the maximumCount property value. Maximum number of simple settings in the collection +// SetMaximumCount sets the maximumCount property value. Maximum number of simple settings in the collection. Valid values 1 to 100 func (m *DeviceManagementConfigurationSimpleSettingCollectionDefinition) SetMaximumCount(value *int32)() { err := m.GetBackingStore().Set("maximumCount", value) if err != nil { panic(err) } } -// SetMinimumCount sets the minimumCount property value. Minimum number of simple settings in the collection +// SetMinimumCount sets the minimumCount property value. Minimum number of simple settings in the collection. Valid values 1 to 100 func (m *DeviceManagementConfigurationSimpleSettingCollectionDefinition) SetMinimumCount(value *int32)() { err := m.GetBackingStore().Set("minimumCount", value) if err != nil { diff --git a/models/device_management_configuration_simple_setting_definition.go b/models/device_management_configuration_simple_setting_definition.go index 8823bd51d21..7492cbcc736 100644 --- a/models/device_management_configuration_simple_setting_definition.go +++ b/models/device_management_configuration_simple_setting_definition.go @@ -37,7 +37,7 @@ func CreateDeviceManagementConfigurationSimpleSettingDefinitionFromDiscriminator } return NewDeviceManagementConfigurationSimpleSettingDefinition(), nil } -// GetDefaultValue gets the defaultValue property value. Default setting value for this setting. +// GetDefaultValue gets the defaultValue property value. Default setting value for this setting func (m *DeviceManagementConfigurationSimpleSettingDefinition) GetDefaultValue()(DeviceManagementConfigurationSettingValueable) { val, err := m.GetBackingStore().Get("defaultValue") if err != nil { @@ -48,7 +48,7 @@ func (m *DeviceManagementConfigurationSimpleSettingDefinition) GetDefaultValue() } return nil } -// GetDependedOnBy gets the dependedOnBy property value. list of child settings that depend on this setting. +// GetDependedOnBy gets the dependedOnBy property value. list of child settings that depend on this setting func (m *DeviceManagementConfigurationSimpleSettingDefinition) GetDependedOnBy()([]DeviceManagementConfigurationSettingDependedOnByable) { val, err := m.GetBackingStore().Get("dependedOnBy") if err != nil { @@ -59,7 +59,7 @@ func (m *DeviceManagementConfigurationSimpleSettingDefinition) GetDependedOnBy() } return nil } -// GetDependentOn gets the dependentOn property value. list of parent settings this setting is dependent on. +// GetDependentOn gets the dependentOn property value. list of parent settings this setting is dependent on func (m *DeviceManagementConfigurationSimpleSettingDefinition) GetDependentOn()([]DeviceManagementConfigurationDependentOnable) { val, err := m.GetBackingStore().Get("dependentOn") if err != nil { @@ -127,7 +127,7 @@ func (m *DeviceManagementConfigurationSimpleSettingDefinition) GetFieldDeseriali } return res } -// GetValueDefinition gets the valueDefinition property value. Definition of the value for this setting. +// GetValueDefinition gets the valueDefinition property value. Definition of the value for this setting func (m *DeviceManagementConfigurationSimpleSettingDefinition) GetValueDefinition()(DeviceManagementConfigurationSettingValueDefinitionable) { val, err := m.GetBackingStore().Get("valueDefinition") if err != nil { @@ -182,28 +182,28 @@ func (m *DeviceManagementConfigurationSimpleSettingDefinition) Serialize(writer } return nil } -// SetDefaultValue sets the defaultValue property value. Default setting value for this setting. +// SetDefaultValue sets the defaultValue property value. Default setting value for this setting func (m *DeviceManagementConfigurationSimpleSettingDefinition) SetDefaultValue(value DeviceManagementConfigurationSettingValueable)() { err := m.GetBackingStore().Set("defaultValue", value) if err != nil { panic(err) } } -// SetDependedOnBy sets the dependedOnBy property value. list of child settings that depend on this setting. +// SetDependedOnBy sets the dependedOnBy property value. list of child settings that depend on this setting func (m *DeviceManagementConfigurationSimpleSettingDefinition) SetDependedOnBy(value []DeviceManagementConfigurationSettingDependedOnByable)() { err := m.GetBackingStore().Set("dependedOnBy", value) if err != nil { panic(err) } } -// SetDependentOn sets the dependentOn property value. list of parent settings this setting is dependent on. +// SetDependentOn sets the dependentOn property value. list of parent settings this setting is dependent on func (m *DeviceManagementConfigurationSimpleSettingDefinition) SetDependentOn(value []DeviceManagementConfigurationDependentOnable)() { err := m.GetBackingStore().Set("dependentOn", value) if err != nil { panic(err) } } -// SetValueDefinition sets the valueDefinition property value. Definition of the value for this setting. +// SetValueDefinition sets the valueDefinition property value. Definition of the value for this setting func (m *DeviceManagementConfigurationSimpleSettingDefinition) SetValueDefinition(value DeviceManagementConfigurationSettingValueDefinitionable)() { err := m.GetBackingStore().Set("valueDefinition", value) if err != nil { diff --git a/models/device_management_configuration_string_setting_value_definition.go b/models/device_management_configuration_string_setting_value_definition.go index 17139592aa7..93123ee8270 100644 --- a/models/device_management_configuration_string_setting_value_definition.go +++ b/models/device_management_configuration_string_setting_value_definition.go @@ -103,7 +103,7 @@ func (m *DeviceManagementConfigurationStringSettingValueDefinition) GetFileTypes } return nil } -// GetFormat gets the format property value. Pre-defined format of the string. Possible values are: none, email, guid, ip, base64, url, version, xml, date, time, binary, regEx, json, dateTime, surfaceHub, bashScript, unknownFutureValue. +// GetFormat gets the format property value. Pre-defined format of the string. Possible values are: none, email, guid, ip, base64, url, version, xml, date, time, binary, regEx, json, dateTime, surfaceHub. func (m *DeviceManagementConfigurationStringSettingValueDefinition) GetFormat()(*DeviceManagementConfigurationStringFormat) { val, err := m.GetBackingStore().Get("format") if err != nil { @@ -136,7 +136,7 @@ func (m *DeviceManagementConfigurationStringSettingValueDefinition) GetIsSecret( } return nil } -// GetMaximumLength gets the maximumLength property value. Maximum length of string. Valid values 0 to 87516 +// GetMaximumLength gets the maximumLength property value. Maximum length of string func (m *DeviceManagementConfigurationStringSettingValueDefinition) GetMaximumLength()(*int64) { val, err := m.GetBackingStore().Get("maximumLength") if err != nil { @@ -147,7 +147,7 @@ func (m *DeviceManagementConfigurationStringSettingValueDefinition) GetMaximumLe } return nil } -// GetMinimumLength gets the minimumLength property value. Minimum length of string. Valid values 0 to 87516 +// GetMinimumLength gets the minimumLength property value. Minimum length of string func (m *DeviceManagementConfigurationStringSettingValueDefinition) GetMinimumLength()(*int64) { val, err := m.GetBackingStore().Get("minimumLength") if err != nil { @@ -210,7 +210,7 @@ func (m *DeviceManagementConfigurationStringSettingValueDefinition) SetFileTypes panic(err) } } -// SetFormat sets the format property value. Pre-defined format of the string. Possible values are: none, email, guid, ip, base64, url, version, xml, date, time, binary, regEx, json, dateTime, surfaceHub, bashScript, unknownFutureValue. +// SetFormat sets the format property value. Pre-defined format of the string. Possible values are: none, email, guid, ip, base64, url, version, xml, date, time, binary, regEx, json, dateTime, surfaceHub. func (m *DeviceManagementConfigurationStringSettingValueDefinition) SetFormat(value *DeviceManagementConfigurationStringFormat)() { err := m.GetBackingStore().Set("format", value) if err != nil { @@ -231,14 +231,14 @@ func (m *DeviceManagementConfigurationStringSettingValueDefinition) SetIsSecret( panic(err) } } -// SetMaximumLength sets the maximumLength property value. Maximum length of string. Valid values 0 to 87516 +// SetMaximumLength sets the maximumLength property value. Maximum length of string func (m *DeviceManagementConfigurationStringSettingValueDefinition) SetMaximumLength(value *int64)() { err := m.GetBackingStore().Set("maximumLength", value) if err != nil { panic(err) } } -// SetMinimumLength sets the minimumLength property value. Minimum length of string. Valid values 0 to 87516 +// SetMinimumLength sets the minimumLength property value. Minimum length of string func (m *DeviceManagementConfigurationStringSettingValueDefinition) SetMinimumLength(value *int64)() { err := m.GetBackingStore().Set("minimumLength", value) if err != nil { diff --git a/models/devicemanagement/alert_rule.go b/models/devicemanagement/alert_rule.go index c3050a9fede..ad0b8ef3f5f 100644 --- a/models/devicemanagement/alert_rule.go +++ b/models/devicemanagement/alert_rule.go @@ -31,6 +31,17 @@ func (m *AlertRule) GetAlertRuleTemplate()(*AlertRuleTemplate) { } return nil } +// GetConditions gets the conditions property value. The conditions that determine when to send alerts. For example, you can configure a condition to send an alert when provisioning fails for six or more Cloud PCs. +func (m *AlertRule) GetConditions()([]RuleConditionable) { + val, err := m.GetBackingStore().Get("conditions") + if err != nil { + panic(err) + } + if val != nil { + return val.([]RuleConditionable) + } + return nil +} // GetDescription gets the description property value. The rule description. func (m *AlertRule) GetDescription()(*string) { val, err := m.GetBackingStore().Get("description") @@ -77,6 +88,22 @@ func (m *AlertRule) GetFieldDeserializers()(map[string]func(i878a80d2330e89d2689 } return nil } + res["conditions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRuleConditionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RuleConditionable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(RuleConditionable) + } + } + m.SetConditions(res) + } + return nil + } res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -212,6 +239,18 @@ func (m *AlertRule) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c0 return err } } + if m.GetConditions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetConditions())) + for i, v := range m.GetConditions() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err = writer.WriteCollectionOfObjectValues("conditions", cast) + if err != nil { + return err + } + } { err = writer.WriteStringValue("description", m.GetDescription()) if err != nil { @@ -270,6 +309,13 @@ func (m *AlertRule) SetAlertRuleTemplate(value *AlertRuleTemplate)() { panic(err) } } +// SetConditions sets the conditions property value. The conditions that determine when to send alerts. For example, you can configure a condition to send an alert when provisioning fails for six or more Cloud PCs. +func (m *AlertRule) SetConditions(value []RuleConditionable)() { + err := m.GetBackingStore().Set("conditions", value) + if err != nil { + panic(err) + } +} // SetDescription sets the description property value. The rule description. func (m *AlertRule) SetDescription(value *string)() { err := m.GetBackingStore().Set("description", value) @@ -324,6 +370,7 @@ type AlertRuleable interface { ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Entityable i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetAlertRuleTemplate()(*AlertRuleTemplate) + GetConditions()([]RuleConditionable) GetDescription()(*string) GetDisplayName()(*string) GetEnabled()(*bool) @@ -332,6 +379,7 @@ type AlertRuleable interface { GetSeverity()(*RuleSeverityType) GetThreshold()(RuleThresholdable) SetAlertRuleTemplate(value *AlertRuleTemplate)() + SetConditions(value []RuleConditionable)() SetDescription(value *string)() SetDisplayName(value *string)() SetEnabled(value *bool)() diff --git a/models/devicemanagement/alert_rule_template.go b/models/devicemanagement/alert_rule_template.go index 2edc4a73650..34207fc5c3b 100644 --- a/models/devicemanagement/alert_rule_template.go +++ b/models/devicemanagement/alert_rule_template.go @@ -12,10 +12,11 @@ const ( UNKNOWNFUTUREVALUE_ALERTRULETEMPLATE CLOUDPCINGRACEPERIODSCENARIO_ALERTRULETEMPLATE CLOUDPCFRONTLINEINSUFFICIENTLICENSESSCENARIO_ALERTRULETEMPLATE + CLOUDPCINACCESSIBLESCENARIO_ALERTRULETEMPLATE ) func (i AlertRuleTemplate) String() string { - return []string{"cloudPcProvisionScenario", "cloudPcImageUploadScenario", "cloudPcOnPremiseNetworkConnectionCheckScenario", "unknownFutureValue", "cloudPcInGracePeriodScenario", "cloudPcFrontlineInsufficientLicensesScenario"}[i] + return []string{"cloudPcProvisionScenario", "cloudPcImageUploadScenario", "cloudPcOnPremiseNetworkConnectionCheckScenario", "unknownFutureValue", "cloudPcInGracePeriodScenario", "cloudPcFrontlineInsufficientLicensesScenario", "cloudPcInaccessibleScenario"}[i] } func ParseAlertRuleTemplate(v string) (any, error) { result := CLOUDPCPROVISIONSCENARIO_ALERTRULETEMPLATE @@ -32,6 +33,8 @@ func ParseAlertRuleTemplate(v string) (any, error) { result = CLOUDPCINGRACEPERIODSCENARIO_ALERTRULETEMPLATE case "cloudPcFrontlineInsufficientLicensesScenario": result = CLOUDPCFRONTLINEINSUFFICIENTLICENSESSCENARIO_ALERTRULETEMPLATE + case "cloudPcInaccessibleScenario": + result = CLOUDPCINACCESSIBLESCENARIO_ALERTRULETEMPLATE default: return 0, errors.New("Unknown AlertRuleTemplate value: " + v) } diff --git a/models/devicemanagement/condition_category.go b/models/devicemanagement/condition_category.go new file mode 100644 index 00000000000..ab2b3f5a914 --- /dev/null +++ b/models/devicemanagement/condition_category.go @@ -0,0 +1,58 @@ +package devicemanagement +import ( + "errors" +) +// +type ConditionCategory int + +const ( + PROVISIONFAILURES_CONDITIONCATEGORY ConditionCategory = iota + IMAGEUPLOADFAILURES_CONDITIONCATEGORY + AZURENETWORKCONNECTIONCHECKFAILURES_CONDITIONCATEGORY + CLOUDPCINGRACEPERIOD_CONDITIONCATEGORY + FRONTLINEINSUFFICIENTLICENSES_CONDITIONCATEGORY + CLOUDPCCONNECTIONERRORS_CONDITIONCATEGORY + CLOUDPCHOSTHEALTHCHECKFAILURES_CONDITIONCATEGORY + CLOUDPCZONEOUTAGE_CONDITIONCATEGORY + UNKNOWNFUTUREVALUE_CONDITIONCATEGORY +) + +func (i ConditionCategory) String() string { + return []string{"provisionFailures", "imageUploadFailures", "azureNetworkConnectionCheckFailures", "cloudPcInGracePeriod", "frontlineInsufficientLicenses", "cloudPcConnectionErrors", "cloudPcHostHealthCheckFailures", "cloudPcZoneOutage", "unknownFutureValue"}[i] +} +func ParseConditionCategory(v string) (any, error) { + result := PROVISIONFAILURES_CONDITIONCATEGORY + switch v { + case "provisionFailures": + result = PROVISIONFAILURES_CONDITIONCATEGORY + case "imageUploadFailures": + result = IMAGEUPLOADFAILURES_CONDITIONCATEGORY + case "azureNetworkConnectionCheckFailures": + result = AZURENETWORKCONNECTIONCHECKFAILURES_CONDITIONCATEGORY + case "cloudPcInGracePeriod": + result = CLOUDPCINGRACEPERIOD_CONDITIONCATEGORY + case "frontlineInsufficientLicenses": + result = FRONTLINEINSUFFICIENTLICENSES_CONDITIONCATEGORY + case "cloudPcConnectionErrors": + result = CLOUDPCCONNECTIONERRORS_CONDITIONCATEGORY + case "cloudPcHostHealthCheckFailures": + result = CLOUDPCHOSTHEALTHCHECKFAILURES_CONDITIONCATEGORY + case "cloudPcZoneOutage": + result = CLOUDPCZONEOUTAGE_CONDITIONCATEGORY + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CONDITIONCATEGORY + default: + return 0, errors.New("Unknown ConditionCategory value: " + v) + } + return &result, nil +} +func SerializeConditionCategory(values []ConditionCategory) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i ConditionCategory) isMultiValue() bool { + return false +} diff --git a/models/devicemanagement/relationship_type.go b/models/devicemanagement/relationship_type.go new file mode 100644 index 00000000000..386c4da0874 --- /dev/null +++ b/models/devicemanagement/relationship_type.go @@ -0,0 +1,40 @@ +package devicemanagement +import ( + "errors" +) +// +type RelationshipType int + +const ( + AND_RELATIONSHIPTYPE RelationshipType = iota + OR_RELATIONSHIPTYPE + UNKNOWNFUTUREVALUE_RELATIONSHIPTYPE +) + +func (i RelationshipType) String() string { + return []string{"and", "or", "unknownFutureValue"}[i] +} +func ParseRelationshipType(v string) (any, error) { + result := AND_RELATIONSHIPTYPE + switch v { + case "and": + result = AND_RELATIONSHIPTYPE + case "or": + result = OR_RELATIONSHIPTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_RELATIONSHIPTYPE + default: + return 0, errors.New("Unknown RelationshipType value: " + v) + } + return &result, nil +} +func SerializeRelationshipType(values []RelationshipType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i RelationshipType) isMultiValue() bool { + return false +} diff --git a/models/devicemanagement/rule_condition.go b/models/devicemanagement/rule_condition.go new file mode 100644 index 00000000000..f3636ba0ee7 --- /dev/null +++ b/models/devicemanagement/rule_condition.go @@ -0,0 +1,294 @@ +package devicemanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +// RuleCondition +type RuleCondition struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewRuleCondition instantiates a new ruleCondition and sets the default values. +func NewRuleCondition()(*RuleCondition) { + m := &RuleCondition{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateRuleConditionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRuleConditionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRuleCondition(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *RuleCondition) 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) +} +// GetAggregation gets the aggregation property value. The built-in aggregation method for the rule condition. The possible values are: count, percentage, affectedCloudPcCount, affectedCloudPcPercentage, unknownFutureValue. +func (m *RuleCondition) GetAggregation()(*AggregationType) { + val, err := m.GetBackingStore().Get("aggregation") + if err != nil { + panic(err) + } + if val != nil { + return val.(*AggregationType) + } + return nil +} +// GetBackingStore gets the BackingStore property value. Stores model information. +func (m *RuleCondition) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetConditionCategory gets the conditionCategory property value. The property that the rule condition monitors. Possible values are: provisionFailures, imageUploadFailures, azureNetworkConnectionCheckFailures, cloudPcInGracePeriod, frontlineInsufficientLicenses, cloudPcConnectionErrors, cloudPcHostHealthCheckFailures, cloudPcZoneOutage, unknownFutureValue. +func (m *RuleCondition) GetConditionCategory()(*ConditionCategory) { + val, err := m.GetBackingStore().Get("conditionCategory") + if err != nil { + panic(err) + } + if val != nil { + return val.(*ConditionCategory) + } + return nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RuleCondition) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["aggregation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAggregationType) + if err != nil { + return err + } + if val != nil { + m.SetAggregation(val.(*AggregationType)) + } + return nil + } + res["conditionCategory"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseConditionCategory) + if err != nil { + return err + } + if val != nil { + m.SetConditionCategory(val.(*ConditionCategory)) + } + 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["operator"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOperatorType) + if err != nil { + return err + } + if val != nil { + m.SetOperator(val.(*OperatorType)) + } + return nil + } + res["relationshipType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRelationshipType) + if err != nil { + return err + } + if val != nil { + m.SetRelationshipType(val.(*RelationshipType)) + } + return nil + } + res["thresholdValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetThresholdValue(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *RuleCondition) GetOdataType()(*string) { + val, err := m.GetBackingStore().Get("odataType") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetOperator gets the operator property value. The built-in operator for the rule condition. The possible values are: greaterOrEqual, equal, greater, less, lessOrEqual, notEqual, unknownFutureValue. +func (m *RuleCondition) GetOperator()(*OperatorType) { + val, err := m.GetBackingStore().Get("operator") + if err != nil { + panic(err) + } + if val != nil { + return val.(*OperatorType) + } + return nil +} +// GetRelationshipType gets the relationshipType property value. The relationship type. Possible values are: and, or. +func (m *RuleCondition) GetRelationshipType()(*RelationshipType) { + val, err := m.GetBackingStore().Get("relationshipType") + if err != nil { + panic(err) + } + if val != nil { + return val.(*RelationshipType) + } + return nil +} +// GetThresholdValue gets the thresholdValue property value. The threshold value of the alert condition. The threshold value can be a number in string form or string like 'WestUS'. +func (m *RuleCondition) GetThresholdValue()(*string) { + val, err := m.GetBackingStore().Get("thresholdValue") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// Serialize serializes information the current object +func (m *RuleCondition) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAggregation() != nil { + cast := (*m.GetAggregation()).String() + err := writer.WriteStringValue("aggregation", &cast) + if err != nil { + return err + } + } + if m.GetConditionCategory() != nil { + cast := (*m.GetConditionCategory()).String() + err := writer.WriteStringValue("conditionCategory", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetOperator() != nil { + cast := (*m.GetOperator()).String() + err := writer.WriteStringValue("operator", &cast) + if err != nil { + return err + } + } + if m.GetRelationshipType() != nil { + cast := (*m.GetRelationshipType()).String() + err := writer.WriteStringValue("relationshipType", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("thresholdValue", m.GetThresholdValue()) + 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 *RuleCondition) SetAdditionalData(value map[string]any)() { + err := m.GetBackingStore().Set("additionalData", value) + if err != nil { + panic(err) + } +} +// SetAggregation sets the aggregation property value. The built-in aggregation method for the rule condition. The possible values are: count, percentage, affectedCloudPcCount, affectedCloudPcPercentage, unknownFutureValue. +func (m *RuleCondition) SetAggregation(value *AggregationType)() { + err := m.GetBackingStore().Set("aggregation", value) + if err != nil { + panic(err) + } +} +// SetBackingStore sets the BackingStore property value. Stores model information. +func (m *RuleCondition) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetConditionCategory sets the conditionCategory property value. The property that the rule condition monitors. Possible values are: provisionFailures, imageUploadFailures, azureNetworkConnectionCheckFailures, cloudPcInGracePeriod, frontlineInsufficientLicenses, cloudPcConnectionErrors, cloudPcHostHealthCheckFailures, cloudPcZoneOutage, unknownFutureValue. +func (m *RuleCondition) SetConditionCategory(value *ConditionCategory)() { + err := m.GetBackingStore().Set("conditionCategory", value) + if err != nil { + panic(err) + } +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *RuleCondition) SetOdataType(value *string)() { + err := m.GetBackingStore().Set("odataType", value) + if err != nil { + panic(err) + } +} +// SetOperator sets the operator property value. The built-in operator for the rule condition. The possible values are: greaterOrEqual, equal, greater, less, lessOrEqual, notEqual, unknownFutureValue. +func (m *RuleCondition) SetOperator(value *OperatorType)() { + err := m.GetBackingStore().Set("operator", value) + if err != nil { + panic(err) + } +} +// SetRelationshipType sets the relationshipType property value. The relationship type. Possible values are: and, or. +func (m *RuleCondition) SetRelationshipType(value *RelationshipType)() { + err := m.GetBackingStore().Set("relationshipType", value) + if err != nil { + panic(err) + } +} +// SetThresholdValue sets the thresholdValue property value. The threshold value of the alert condition. The threshold value can be a number in string form or string like 'WestUS'. +func (m *RuleCondition) SetThresholdValue(value *string)() { + err := m.GetBackingStore().Set("thresholdValue", value) + if err != nil { + panic(err) + } +} +// RuleConditionable +type RuleConditionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAggregation()(*AggregationType) + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetConditionCategory()(*ConditionCategory) + GetOdataType()(*string) + GetOperator()(*OperatorType) + GetRelationshipType()(*RelationshipType) + GetThresholdValue()(*string) + SetAggregation(value *AggregationType)() + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetConditionCategory(value *ConditionCategory)() + SetOdataType(value *string)() + SetOperator(value *OperatorType)() + SetRelationshipType(value *RelationshipType)() + SetThresholdValue(value *string)() +} diff --git a/models/dictionary.go b/models/dictionary.go index 06d469f862d..f09977963f9 100644 --- a/models/dictionary.go +++ b/models/dictionary.go @@ -34,6 +34,8 @@ func CreateDictionaryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3 switch *mappingValue { case "#microsoft.graph.customAppScopeAttributesDictionary": return NewCustomAppScopeAttributesDictionary(), nil + case "#microsoft.graph.plannerFormsDictionary": + return NewPlannerFormsDictionary(), nil case "#microsoft.graph.resultTemplateDictionary": return NewResultTemplateDictionary(), nil } diff --git a/models/employee_experience.go b/models/employee_experience.go index 1cd9068d788..e28d8f30afd 100644 --- a/models/employee_experience.go +++ b/models/employee_experience.go @@ -38,9 +38,63 @@ func (m *EmployeeExperience) GetAdditionalData()(map[string]any) { func (m *EmployeeExperience) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { return m.backingStore } +// GetCommunities gets the communities property value. A collection of communities in Viva Engage. +func (m *EmployeeExperience) GetCommunities()([]Communityable) { + val, err := m.GetBackingStore().Get("communities") + if err != nil { + panic(err) + } + if val != nil { + return val.([]Communityable) + } + return nil +} +// GetEngagementAsyncOperations gets the engagementAsyncOperations property value. A collection of long-running, asynchronous operations related to Viva Engage. +func (m *EmployeeExperience) GetEngagementAsyncOperations()([]EngagementAsyncOperationable) { + val, err := m.GetBackingStore().Get("engagementAsyncOperations") + if err != nil { + panic(err) + } + if val != nil { + return val.([]EngagementAsyncOperationable) + } + return nil +} // GetFieldDeserializers the deserialization information for the current model func (m *EmployeeExperience) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["communities"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCommunityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Communityable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(Communityable) + } + } + m.SetCommunities(res) + } + return nil + } + res["engagementAsyncOperations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEngagementAsyncOperationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EngagementAsyncOperationable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(EngagementAsyncOperationable) + } + } + m.SetEngagementAsyncOperations(res) + } + return nil + } res["goals"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(CreateGoalsFromDiscriminatorValue) if err != nil { @@ -141,6 +195,30 @@ func (m *EmployeeExperience) GetOdataType()(*string) { } // Serialize serializes information the current object func (m *EmployeeExperience) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetCommunities() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCommunities())) + for i, v := range m.GetCommunities() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("communities", cast) + if err != nil { + return err + } + } + if m.GetEngagementAsyncOperations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetEngagementAsyncOperations())) + for i, v := range m.GetEngagementAsyncOperations() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("engagementAsyncOperations", cast) + if err != nil { + return err + } + } { err := writer.WriteObjectValue("goals", m.GetGoals()) if err != nil { @@ -196,6 +274,20 @@ func (m *EmployeeExperience) SetAdditionalData(value map[string]any)() { func (m *EmployeeExperience) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { m.backingStore = value } +// SetCommunities sets the communities property value. A collection of communities in Viva Engage. +func (m *EmployeeExperience) SetCommunities(value []Communityable)() { + err := m.GetBackingStore().Set("communities", value) + if err != nil { + panic(err) + } +} +// SetEngagementAsyncOperations sets the engagementAsyncOperations property value. A collection of long-running, asynchronous operations related to Viva Engage. +func (m *EmployeeExperience) SetEngagementAsyncOperations(value []EngagementAsyncOperationable)() { + err := m.GetBackingStore().Set("engagementAsyncOperations", value) + if err != nil { + panic(err) + } +} // SetGoals sets the goals property value. Represents a collection of goals in a Viva Goals organization. func (m *EmployeeExperience) SetGoals(value Goalsable)() { err := m.GetBackingStore().Set("goals", value) @@ -230,11 +322,15 @@ type EmployeeExperienceable interface { ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetCommunities()([]Communityable) + GetEngagementAsyncOperations()([]EngagementAsyncOperationable) GetGoals()(Goalsable) GetLearningCourseActivities()([]LearningCourseActivityable) GetLearningProviders()([]LearningProviderable) GetOdataType()(*string) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetCommunities(value []Communityable)() + SetEngagementAsyncOperations(value []EngagementAsyncOperationable)() SetGoals(value Goalsable)() SetLearningCourseActivities(value []LearningCourseActivityable)() SetLearningProviders(value []LearningProviderable)() diff --git a/models/engagement_async_operation.go b/models/engagement_async_operation.go new file mode 100644 index 00000000000..c776055d0a2 --- /dev/null +++ b/models/engagement_async_operation.go @@ -0,0 +1,112 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EngagementAsyncOperation +type EngagementAsyncOperation struct { + LongRunningOperation +} +// NewEngagementAsyncOperation instantiates a new engagementAsyncOperation and sets the default values. +func NewEngagementAsyncOperation()(*EngagementAsyncOperation) { + m := &EngagementAsyncOperation{ + LongRunningOperation: *NewLongRunningOperation(), + } + return m +} +// CreateEngagementAsyncOperationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEngagementAsyncOperationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEngagementAsyncOperation(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EngagementAsyncOperation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.LongRunningOperation.GetFieldDeserializers() + res["operationType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEngagementAsyncOperationType) + if err != nil { + return err + } + if val != nil { + m.SetOperationType(val.(*EngagementAsyncOperationType)) + } + return nil + } + res["resourceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetResourceId(val) + } + return nil + } + return res +} +// GetOperationType gets the operationType property value. The type of the long-running operation. The possible values are: createCommunity, unknownFutureValue. +func (m *EngagementAsyncOperation) GetOperationType()(*EngagementAsyncOperationType) { + val, err := m.GetBackingStore().Get("operationType") + if err != nil { + panic(err) + } + if val != nil { + return val.(*EngagementAsyncOperationType) + } + return nil +} +// GetResourceId gets the resourceId property value. The ID of the object created or modified as a result of this async operation. +func (m *EngagementAsyncOperation) 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 *EngagementAsyncOperation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.LongRunningOperation.Serialize(writer) + if err != nil { + return err + } + if m.GetOperationType() != nil { + cast := (*m.GetOperationType()).String() + err = writer.WriteStringValue("operationType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("resourceId", m.GetResourceId()) + if err != nil { + return err + } + } + return nil +} +// SetOperationType sets the operationType property value. The type of the long-running operation. The possible values are: createCommunity, unknownFutureValue. +func (m *EngagementAsyncOperation) SetOperationType(value *EngagementAsyncOperationType)() { + err := m.GetBackingStore().Set("operationType", value) + if err != nil { + panic(err) + } +} +// SetResourceId sets the resourceId property value. The ID of the object created or modified as a result of this async operation. +func (m *EngagementAsyncOperation) SetResourceId(value *string)() { + err := m.GetBackingStore().Set("resourceId", value) + if err != nil { + panic(err) + } +} +// EngagementAsyncOperationable +type EngagementAsyncOperationable interface { + LongRunningOperationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOperationType()(*EngagementAsyncOperationType) + GetResourceId()(*string) + SetOperationType(value *EngagementAsyncOperationType)() + SetResourceId(value *string)() +} diff --git a/models/engagement_async_operation_collection_response.go b/models/engagement_async_operation_collection_response.go new file mode 100644 index 00000000000..12446b4b6f4 --- /dev/null +++ b/models/engagement_async_operation_collection_response.go @@ -0,0 +1,87 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EngagementAsyncOperationCollectionResponse +type EngagementAsyncOperationCollectionResponse struct { + BaseCollectionPaginationCountResponse +} +// NewEngagementAsyncOperationCollectionResponse instantiates a new engagementAsyncOperationCollectionResponse and sets the default values. +func NewEngagementAsyncOperationCollectionResponse()(*EngagementAsyncOperationCollectionResponse) { + m := &EngagementAsyncOperationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEngagementAsyncOperationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEngagementAsyncOperationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEngagementAsyncOperationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EngagementAsyncOperationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEngagementAsyncOperationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EngagementAsyncOperationable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(EngagementAsyncOperationable) + } + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EngagementAsyncOperationCollectionResponse) GetValue()([]EngagementAsyncOperationable) { + val, err := m.GetBackingStore().Get("value") + if err != nil { + panic(err) + } + if val != nil { + return val.([]EngagementAsyncOperationable) + } + return nil +} +// Serialize serializes information the current object +func (m *EngagementAsyncOperationCollectionResponse) 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 *EngagementAsyncOperationCollectionResponse) SetValue(value []EngagementAsyncOperationable)() { + err := m.GetBackingStore().Set("value", value) + if err != nil { + panic(err) + } +} +// EngagementAsyncOperationCollectionResponseable +type EngagementAsyncOperationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EngagementAsyncOperationable) + SetValue(value []EngagementAsyncOperationable)() +} diff --git a/models/engagement_async_operation_type.go b/models/engagement_async_operation_type.go new file mode 100644 index 00000000000..19064e68215 --- /dev/null +++ b/models/engagement_async_operation_type.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// +type EngagementAsyncOperationType int + +const ( + CREATECOMMUNITY_ENGAGEMENTASYNCOPERATIONTYPE EngagementAsyncOperationType = iota + UNKNOWNFUTUREVALUE_ENGAGEMENTASYNCOPERATIONTYPE +) + +func (i EngagementAsyncOperationType) String() string { + return []string{"createCommunity", "unknownFutureValue"}[i] +} +func ParseEngagementAsyncOperationType(v string) (any, error) { + result := CREATECOMMUNITY_ENGAGEMENTASYNCOPERATIONTYPE + switch v { + case "createCommunity": + result = CREATECOMMUNITY_ENGAGEMENTASYNCOPERATIONTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_ENGAGEMENTASYNCOPERATIONTYPE + default: + return 0, errors.New("Unknown EngagementAsyncOperationType value: " + v) + } + return &result, nil +} +func SerializeEngagementAsyncOperationType(values []EngagementAsyncOperationType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i EngagementAsyncOperationType) isMultiValue() bool { + return false +} diff --git a/models/entity.go b/models/entity.go index df2fc5ae377..7d4b76f5c49 100644 --- a/models/entity.go +++ b/models/entity.go @@ -110,6 +110,8 @@ func CreateEntityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487 return NewAdminForms(), nil case "#microsoft.graph.administrativeUnit": return NewAdministrativeUnit(), nil + case "#microsoft.graph.adminMicrosoft365Apps": + return NewAdminMicrosoft365Apps(), nil case "#microsoft.graph.adminReportSettings": return NewAdminReportSettings(), nil case "#microsoft.graph.adminTodo": @@ -602,6 +604,12 @@ func CreateEntityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487 return NewCloudPcAuditEvent(), nil case "#microsoft.graph.cloudPcBulkAction": return NewCloudPcBulkAction(), nil + case "#microsoft.graph.cloudPcBulkDisasterRecoveryFailback": + return NewCloudPcBulkDisasterRecoveryFailback(), nil + case "#microsoft.graph.cloudPcBulkDisasterRecoveryFailover": + return NewCloudPcBulkDisasterRecoveryFailover(), nil + case "#microsoft.graph.cloudPcBulkModifyDiskEncryptionType": + return NewCloudPcBulkModifyDiskEncryptionType(), nil case "#microsoft.graph.cloudPcBulkPowerOff": return NewCloudPcBulkPowerOff(), nil case "#microsoft.graph.cloudPcBulkPowerOn": @@ -662,6 +670,8 @@ func CreateEntityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487 return NewCommand(), nil case "#microsoft.graph.commsOperation": return NewCommsOperation(), nil + case "#microsoft.graph.community": + return NewCommunity(), nil case "#microsoft.graph.companySubscription": return NewCompanySubscription(), nil case "#microsoft.graph.complianceManagementPartner": @@ -1160,6 +1170,8 @@ func CreateEntityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487 return NewEndUserNotification(), nil case "#microsoft.graph.endUserNotificationDetail": return NewEndUserNotificationDetail(), nil + case "#microsoft.graph.engagementAsyncOperation": + return NewEngagementAsyncOperation(), nil case "#microsoft.graph.enrollmentConfigurationAssignment": return NewEnrollmentConfigurationAssignment(), nil case "#microsoft.graph.enrollmentProfile": @@ -1588,6 +1600,8 @@ func CreateEntityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487 return NewLongRunningOperation(), nil case "#microsoft.graph.lookupResultRow": return NewLookupResultRow(), nil + case "#microsoft.graph.m365AppsInstallationOptions": + return NewM365AppsInstallationOptions(), nil case "#microsoft.graph.macOSCertificateProfileBase": return NewMacOSCertificateProfileBase(), nil case "#microsoft.graph.macOSCompliancePolicy": @@ -1876,6 +1890,14 @@ func CreateEntityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487 return NewOfficeSuiteApp(), nil case "#microsoft.graph.onAttributeCollectionListener": return NewOnAttributeCollectionListener(), nil + case "#microsoft.graph.onAttributeCollectionStartCustomExtension": + return NewOnAttributeCollectionStartCustomExtension(), nil + case "#microsoft.graph.onAttributeCollectionStartListener": + return NewOnAttributeCollectionStartListener(), nil + case "#microsoft.graph.onAttributeCollectionSubmitCustomExtension": + return NewOnAttributeCollectionSubmitCustomExtension(), nil + case "#microsoft.graph.onAttributeCollectionSubmitListener": + return NewOnAttributeCollectionSubmitListener(), nil case "#microsoft.graph.onAuthenticationMethodLoadStartListener": return NewOnAuthenticationMethodLoadStartListener(), nil case "#microsoft.graph.onenote": @@ -2832,12 +2854,12 @@ func CreateEntityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487 return NewVirtualEvent(), nil case "#microsoft.graph.virtualEventPresenter": return NewVirtualEventPresenter(), nil - case "#microsoft.graph.virtualEventRegistratioCustomQuestion": - return NewVirtualEventRegistratioCustomQuestion(), nil case "#microsoft.graph.virtualEventRegistration": return NewVirtualEventRegistration(), nil case "#microsoft.graph.virtualEventRegistrationConfiguration": return NewVirtualEventRegistrationConfiguration(), nil + case "#microsoft.graph.virtualEventRegistrationCustomQuestion": + return NewVirtualEventRegistrationCustomQuestion(), nil case "#microsoft.graph.virtualEventRegistrationPredefinedQuestion": return NewVirtualEventRegistrationPredefinedQuestion(), nil case "#microsoft.graph.virtualEventRegistrationQuestionBase": diff --git a/models/enumerated_device_registration_membership.go b/models/enumerated_device_registration_membership.go index fb278796d4e..35ea61584f1 100644 --- a/models/enumerated_device_registration_membership.go +++ b/models/enumerated_device_registration_membership.go @@ -58,7 +58,7 @@ func (m *EnumeratedDeviceRegistrationMembership) GetFieldDeserializers()(map[str } return res } -// GetGroups gets the groups property value. The groups property +// GetGroups gets the groups property value. List of groups that this policy applies to. func (m *EnumeratedDeviceRegistrationMembership) GetGroups()([]string) { val, err := m.GetBackingStore().Get("groups") if err != nil { @@ -69,7 +69,7 @@ func (m *EnumeratedDeviceRegistrationMembership) GetGroups()([]string) { } return nil } -// GetUsers gets the users property value. The users property +// GetUsers gets the users property value. List of users that this policy applies to. func (m *EnumeratedDeviceRegistrationMembership) GetUsers()([]string) { val, err := m.GetBackingStore().Get("users") if err != nil { @@ -100,14 +100,14 @@ func (m *EnumeratedDeviceRegistrationMembership) Serialize(writer i878a80d2330e8 } return nil } -// SetGroups sets the groups property value. The groups property +// SetGroups sets the groups property value. List of groups that this policy applies to. func (m *EnumeratedDeviceRegistrationMembership) SetGroups(value []string)() { err := m.GetBackingStore().Set("groups", value) if err != nil { panic(err) } } -// SetUsers sets the users property value. The users property +// SetUsers sets the users property value. List of users that this policy applies to. func (m *EnumeratedDeviceRegistrationMembership) SetUsers(value []string)() { err := m.GetBackingStore().Set("users", value) if err != nil { diff --git a/models/external_users_self_service_sign_up_events_flow.go b/models/external_users_self_service_sign_up_events_flow.go index 29c82b9af29..d87c3bc4697 100644 --- a/models/external_users_self_service_sign_up_events_flow.go +++ b/models/external_users_self_service_sign_up_events_flow.go @@ -34,6 +34,26 @@ func (m *ExternalUsersSelfServiceSignUpEventsFlow) GetFieldDeserializers()(map[s } return nil } + res["onAttributeCollectionStart"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateOnAttributeCollectionStartHandlerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOnAttributeCollectionStart(val.(OnAttributeCollectionStartHandlerable)) + } + return nil + } + res["onAttributeCollectionSubmit"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateOnAttributeCollectionSubmitHandlerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOnAttributeCollectionSubmit(val.(OnAttributeCollectionSubmitHandlerable)) + } + return nil + } res["onAuthenticationMethodLoadStart"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(CreateOnAuthenticationMethodLoadStartHandlerFromDiscriminatorValue) if err != nil { @@ -77,6 +97,28 @@ func (m *ExternalUsersSelfServiceSignUpEventsFlow) GetOnAttributeCollection()(On } return nil } +// GetOnAttributeCollectionStart gets the onAttributeCollectionStart property value. The configuration for what to invoke when attribution collection has started. +func (m *ExternalUsersSelfServiceSignUpEventsFlow) GetOnAttributeCollectionStart()(OnAttributeCollectionStartHandlerable) { + val, err := m.GetBackingStore().Get("onAttributeCollectionStart") + if err != nil { + panic(err) + } + if val != nil { + return val.(OnAttributeCollectionStartHandlerable) + } + return nil +} +// GetOnAttributeCollectionSubmit gets the onAttributeCollectionSubmit property value. The configuration for what to invoke when attributes have been submitted at the end of attribution collection. +func (m *ExternalUsersSelfServiceSignUpEventsFlow) GetOnAttributeCollectionSubmit()(OnAttributeCollectionSubmitHandlerable) { + val, err := m.GetBackingStore().Get("onAttributeCollectionSubmit") + if err != nil { + panic(err) + } + if val != nil { + return val.(OnAttributeCollectionSubmitHandlerable) + } + return nil +} // GetOnAuthenticationMethodLoadStart gets the onAuthenticationMethodLoadStart property value. Required. The configuration for what to invoke when authentication methods are ready to be presented to the user. Must have at least one identity provider linked. func (m *ExternalUsersSelfServiceSignUpEventsFlow) GetOnAuthenticationMethodLoadStart()(OnAuthenticationMethodLoadStartHandlerable) { val, err := m.GetBackingStore().Get("onAuthenticationMethodLoadStart") @@ -122,6 +164,18 @@ func (m *ExternalUsersSelfServiceSignUpEventsFlow) Serialize(writer i878a80d2330 return err } } + { + err = writer.WriteObjectValue("onAttributeCollectionStart", m.GetOnAttributeCollectionStart()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("onAttributeCollectionSubmit", m.GetOnAttributeCollectionSubmit()) + if err != nil { + return err + } + } { err = writer.WriteObjectValue("onAuthenticationMethodLoadStart", m.GetOnAuthenticationMethodLoadStart()) if err != nil { @@ -149,6 +203,20 @@ func (m *ExternalUsersSelfServiceSignUpEventsFlow) SetOnAttributeCollection(valu panic(err) } } +// SetOnAttributeCollectionStart sets the onAttributeCollectionStart property value. The configuration for what to invoke when attribution collection has started. +func (m *ExternalUsersSelfServiceSignUpEventsFlow) SetOnAttributeCollectionStart(value OnAttributeCollectionStartHandlerable)() { + err := m.GetBackingStore().Set("onAttributeCollectionStart", value) + if err != nil { + panic(err) + } +} +// SetOnAttributeCollectionSubmit sets the onAttributeCollectionSubmit property value. The configuration for what to invoke when attributes have been submitted at the end of attribution collection. +func (m *ExternalUsersSelfServiceSignUpEventsFlow) SetOnAttributeCollectionSubmit(value OnAttributeCollectionSubmitHandlerable)() { + err := m.GetBackingStore().Set("onAttributeCollectionSubmit", value) + if err != nil { + panic(err) + } +} // SetOnAuthenticationMethodLoadStart sets the onAuthenticationMethodLoadStart property value. Required. The configuration for what to invoke when authentication methods are ready to be presented to the user. Must have at least one identity provider linked. func (m *ExternalUsersSelfServiceSignUpEventsFlow) SetOnAuthenticationMethodLoadStart(value OnAuthenticationMethodLoadStartHandlerable)() { err := m.GetBackingStore().Set("onAuthenticationMethodLoadStart", value) @@ -175,10 +243,14 @@ type ExternalUsersSelfServiceSignUpEventsFlowable interface { AuthenticationEventsFlowable i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetOnAttributeCollection()(OnAttributeCollectionHandlerable) + GetOnAttributeCollectionStart()(OnAttributeCollectionStartHandlerable) + GetOnAttributeCollectionSubmit()(OnAttributeCollectionSubmitHandlerable) GetOnAuthenticationMethodLoadStart()(OnAuthenticationMethodLoadStartHandlerable) GetOnInteractiveAuthFlowStart()(OnInteractiveAuthFlowStartHandlerable) GetOnUserCreateStart()(OnUserCreateStartHandlerable) SetOnAttributeCollection(value OnAttributeCollectionHandlerable)() + SetOnAttributeCollectionStart(value OnAttributeCollectionStartHandlerable)() + SetOnAttributeCollectionSubmit(value OnAttributeCollectionSubmitHandlerable)() SetOnAuthenticationMethodLoadStart(value OnAuthenticationMethodLoadStartHandlerable)() SetOnInteractiveAuthFlowStart(value OnInteractiveAuthFlowStartHandlerable)() SetOnUserCreateStart(value OnUserCreateStartHandlerable)() diff --git a/models/identity.go b/models/identity.go index 1faf1a22b02..9d1e28cdf53 100644 --- a/models/identity.go +++ b/models/identity.go @@ -96,7 +96,7 @@ func (m *Identity) GetAdditionalData()(map[string]any) { func (m *Identity) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { return m.backingStore } -// GetDisplayName gets the displayName property value. The display name of the identity. The display name might not always be available or up to date. For example, if a user changes their display name the API might show the new value in a future response, but the items associated with the user won't show up as having changed when using delta. +// GetDisplayName gets the displayName property value. The display name of the identity. This property is read-only. func (m *Identity) GetDisplayName()(*string) { val, err := m.GetBackingStore().Get("displayName") if err != nil { @@ -142,7 +142,7 @@ func (m *Identity) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896 } return res } -// GetId gets the id property value. Unique identifier for the identity. When the unique identifier is unavailable, the displayName property is provided for the identity, but the id property isn't included in the response. +// GetId gets the id property value. The identifier of the identity. This property is read-only. func (m *Identity) GetId()(*string) { val, err := m.GetBackingStore().Get("id") if err != nil { @@ -203,14 +203,14 @@ func (m *Identity) SetAdditionalData(value map[string]any)() { func (m *Identity) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { m.backingStore = value } -// SetDisplayName sets the displayName property value. The display name of the identity. The display name might not always be available or up to date. For example, if a user changes their display name the API might show the new value in a future response, but the items associated with the user won't show up as having changed when using delta. +// SetDisplayName sets the displayName property value. The display name of the identity. This property is read-only. func (m *Identity) SetDisplayName(value *string)() { err := m.GetBackingStore().Set("displayName", value) if err != nil { panic(err) } } -// SetId sets the id property value. Unique identifier for the identity. When the unique identifier is unavailable, the displayName property is provided for the identity, but the id property isn't included in the response. +// SetId sets the id property value. The identifier of the identity. This property is read-only. func (m *Identity) SetId(value *string)() { err := m.GetBackingStore().Set("id", value) if err != nil { diff --git a/models/identity_set.go b/models/identity_set.go index f5b33a196fa..d99555f2f66 100644 --- a/models/identity_set.go +++ b/models/identity_set.go @@ -60,7 +60,7 @@ func (m *IdentitySet) GetAdditionalData()(map[string]any) { } return val.(map[string]any) } -// GetApplication gets the application property value. Optional. The application associated with this action. +// GetApplication gets the application property value. The Identity of the Application. This property is read-only. func (m *IdentitySet) GetApplication()(Identityable) { val, err := m.GetBackingStore().Get("application") if err != nil { @@ -75,7 +75,7 @@ func (m *IdentitySet) GetApplication()(Identityable) { func (m *IdentitySet) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { return m.backingStore } -// GetDevice gets the device property value. Optional. The device associated with this action. +// GetDevice gets the device property value. The Identity of the Device. This property is read-only. func (m *IdentitySet) GetDevice()(Identityable) { val, err := m.GetBackingStore().Get("device") if err != nil { @@ -142,7 +142,7 @@ func (m *IdentitySet) GetOdataType()(*string) { } return nil } -// GetUser gets the user property value. Optional. The user associated with this action. +// GetUser gets the user property value. The Identity of the User. This property is read-only. func (m *IdentitySet) GetUser()(Identityable) { val, err := m.GetBackingStore().Get("user") if err != nil { @@ -194,7 +194,7 @@ func (m *IdentitySet) SetAdditionalData(value map[string]any)() { panic(err) } } -// SetApplication sets the application property value. Optional. The application associated with this action. +// SetApplication sets the application property value. The Identity of the Application. This property is read-only. func (m *IdentitySet) SetApplication(value Identityable)() { err := m.GetBackingStore().Set("application", value) if err != nil { @@ -205,7 +205,7 @@ func (m *IdentitySet) SetApplication(value Identityable)() { func (m *IdentitySet) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { m.backingStore = value } -// SetDevice sets the device property value. Optional. The device associated with this action. +// SetDevice sets the device property value. The Identity of the Device. This property is read-only. func (m *IdentitySet) SetDevice(value Identityable)() { err := m.GetBackingStore().Set("device", value) if err != nil { @@ -219,7 +219,7 @@ func (m *IdentitySet) SetOdataType(value *string)() { panic(err) } } -// SetUser sets the user property value. Optional. The user associated with this action. +// SetUser sets the user property value. The Identity of the User. This property is read-only. func (m *IdentitySet) SetUser(value Identityable)() { err := m.GetBackingStore().Set("user", value) if err != nil { diff --git a/models/key_value.go b/models/key_value.go index f457b180f2f..bc582aa0d2e 100644 --- a/models/key_value.go +++ b/models/key_value.go @@ -73,7 +73,7 @@ func (m *KeyValue) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896 } return res } -// GetKey gets the key property value. Key. +// GetKey gets the key property value. Contains the name of the field that a value is associated with. func (m *KeyValue) GetKey()(*string) { val, err := m.GetBackingStore().Get("key") if err != nil { @@ -95,7 +95,7 @@ func (m *KeyValue) GetOdataType()(*string) { } return nil } -// GetValue gets the value property value. Value. +// GetValue gets the value property value. Contains the corresponding value for the specified key. func (m *KeyValue) GetValue()(*string) { val, err := m.GetBackingStore().Get("value") if err != nil { @@ -145,7 +145,7 @@ func (m *KeyValue) SetAdditionalData(value map[string]any)() { func (m *KeyValue) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { m.backingStore = value } -// SetKey sets the key property value. Key. +// SetKey sets the key property value. Contains the name of the field that a value is associated with. func (m *KeyValue) SetKey(value *string)() { err := m.GetBackingStore().Set("key", value) if err != nil { @@ -159,7 +159,7 @@ func (m *KeyValue) SetOdataType(value *string)() { panic(err) } } -// SetValue sets the value property value. Value. +// SetValue sets the value property value. Contains the corresponding value for the specified key. func (m *KeyValue) SetValue(value *string)() { err := m.GetBackingStore().Set("value", value) if err != nil { diff --git a/models/long_running_operation.go b/models/long_running_operation.go index 9faf07d84e4..c2a99586a60 100644 --- a/models/long_running_operation.go +++ b/models/long_running_operation.go @@ -32,6 +32,8 @@ func CreateLongRunningOperationFromDiscriminatorValue(parseNode i878a80d2330e89d switch *mappingValue { case "#microsoft.graph.attackSimulationOperation": return NewAttackSimulationOperation(), nil + case "#microsoft.graph.engagementAsyncOperation": + return NewEngagementAsyncOperation(), nil case "#microsoft.graph.goalsExportJob": return NewGoalsExportJob(), nil case "#microsoft.graph.richLongRunningOperation": diff --git a/models/m365_apps_installation_options.go b/models/m365_apps_installation_options.go new file mode 100644 index 00000000000..4771ea6954f --- /dev/null +++ b/models/m365_apps_installation_options.go @@ -0,0 +1,148 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// M365AppsInstallationOptions +type M365AppsInstallationOptions struct { + Entity +} +// NewM365AppsInstallationOptions instantiates a new m365AppsInstallationOptions and sets the default values. +func NewM365AppsInstallationOptions()(*M365AppsInstallationOptions) { + m := &M365AppsInstallationOptions{ + Entity: *NewEntity(), + } + return m +} +// CreateM365AppsInstallationOptionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateM365AppsInstallationOptionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewM365AppsInstallationOptions(), nil +} +// GetAppsForMac gets the appsForMac property value. The appsForMac property +func (m *M365AppsInstallationOptions) GetAppsForMac()(AppsInstallationOptionsForMacable) { + val, err := m.GetBackingStore().Get("appsForMac") + if err != nil { + panic(err) + } + if val != nil { + return val.(AppsInstallationOptionsForMacable) + } + return nil +} +// GetAppsForWindows gets the appsForWindows property value. The appsForWindows property +func (m *M365AppsInstallationOptions) GetAppsForWindows()(AppsInstallationOptionsForWindowsable) { + val, err := m.GetBackingStore().Get("appsForWindows") + if err != nil { + panic(err) + } + if val != nil { + return val.(AppsInstallationOptionsForWindowsable) + } + return nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *M365AppsInstallationOptions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["appsForMac"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAppsInstallationOptionsForMacFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAppsForMac(val.(AppsInstallationOptionsForMacable)) + } + return nil + } + res["appsForWindows"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAppsInstallationOptionsForWindowsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAppsForWindows(val.(AppsInstallationOptionsForWindowsable)) + } + return nil + } + res["updateChannel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppsUpdateChannelType) + if err != nil { + return err + } + if val != nil { + m.SetUpdateChannel(val.(*AppsUpdateChannelType)) + } + return nil + } + return res +} +// GetUpdateChannel gets the updateChannel property value. The updateChannel property +func (m *M365AppsInstallationOptions) GetUpdateChannel()(*AppsUpdateChannelType) { + val, err := m.GetBackingStore().Get("updateChannel") + if err != nil { + panic(err) + } + if val != nil { + return val.(*AppsUpdateChannelType) + } + return nil +} +// Serialize serializes information the current object +func (m *M365AppsInstallationOptions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("appsForMac", m.GetAppsForMac()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("appsForWindows", m.GetAppsForWindows()) + if err != nil { + return err + } + } + if m.GetUpdateChannel() != nil { + cast := (*m.GetUpdateChannel()).String() + err = writer.WriteStringValue("updateChannel", &cast) + if err != nil { + return err + } + } + return nil +} +// SetAppsForMac sets the appsForMac property value. The appsForMac property +func (m *M365AppsInstallationOptions) SetAppsForMac(value AppsInstallationOptionsForMacable)() { + err := m.GetBackingStore().Set("appsForMac", value) + if err != nil { + panic(err) + } +} +// SetAppsForWindows sets the appsForWindows property value. The appsForWindows property +func (m *M365AppsInstallationOptions) SetAppsForWindows(value AppsInstallationOptionsForWindowsable)() { + err := m.GetBackingStore().Set("appsForWindows", value) + if err != nil { + panic(err) + } +} +// SetUpdateChannel sets the updateChannel property value. The updateChannel property +func (m *M365AppsInstallationOptions) SetUpdateChannel(value *AppsUpdateChannelType)() { + err := m.GetBackingStore().Set("updateChannel", value) + if err != nil { + panic(err) + } +} +// M365AppsInstallationOptionsable +type M365AppsInstallationOptionsable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppsForMac()(AppsInstallationOptionsForMacable) + GetAppsForWindows()(AppsInstallationOptionsForWindowsable) + GetUpdateChannel()(*AppsUpdateChannelType) + SetAppsForMac(value AppsInstallationOptionsForMacable)() + SetAppsForWindows(value AppsInstallationOptionsForWindowsable)() + SetUpdateChannel(value *AppsUpdateChannelType)() +} diff --git a/models/mac_os_lob_app_assignment_settings.go b/models/mac_os_lob_app_assignment_settings.go index 3f00c04ddb3..1ef77798b5e 100644 --- a/models/mac_os_lob_app_assignment_settings.go +++ b/models/mac_os_lob_app_assignment_settings.go @@ -36,7 +36,7 @@ func (m *MacOsLobAppAssignmentSettings) GetFieldDeserializers()(map[string]func( } return res } -// GetUninstallOnDeviceRemoval gets the uninstallOnDeviceRemoval property value. Whether or not to uninstall the app when device is removed from Intune. +// GetUninstallOnDeviceRemoval gets the uninstallOnDeviceRemoval property value. When TRUE, indicates that the app should be uninstalled when the device is removed from Intune. When FALSE, indicates that the app will not be uninstalled when the device is removed from Intune. func (m *MacOsLobAppAssignmentSettings) GetUninstallOnDeviceRemoval()(*bool) { val, err := m.GetBackingStore().Get("uninstallOnDeviceRemoval") if err != nil { @@ -61,7 +61,7 @@ func (m *MacOsLobAppAssignmentSettings) Serialize(writer i878a80d2330e89d2689638 } return nil } -// SetUninstallOnDeviceRemoval sets the uninstallOnDeviceRemoval property value. Whether or not to uninstall the app when device is removed from Intune. +// SetUninstallOnDeviceRemoval sets the uninstallOnDeviceRemoval property value. When TRUE, indicates that the app should be uninstalled when the device is removed from Intune. When FALSE, indicates that the app will not be uninstalled when the device is removed from Intune. func (m *MacOsLobAppAssignmentSettings) SetUninstallOnDeviceRemoval(value *bool)() { err := m.GetBackingStore().Set("uninstallOnDeviceRemoval", value) if err != nil { diff --git a/models/microsoft_managed_desktop.go b/models/microsoft_managed_desktop.go index 4066815c311..987aae7288e 100644 --- a/models/microsoft_managed_desktop.go +++ b/models/microsoft_managed_desktop.go @@ -41,6 +41,16 @@ func (m *MicrosoftManagedDesktop) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd // GetFieldDeserializers the deserialization information for the current model func (m *MicrosoftManagedDesktop) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["managedType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMicrosoftManagedDesktopType) + if err != nil { + return err + } + if val != nil { + m.SetManagedType(val.(*MicrosoftManagedDesktopType)) + } + return nil + } res["@odata.type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -73,6 +83,17 @@ func (m *MicrosoftManagedDesktop) GetFieldDeserializers()(map[string]func(i878a8 } return res } +// GetManagedType gets the managedType property value. The managedType property +func (m *MicrosoftManagedDesktop) GetManagedType()(*MicrosoftManagedDesktopType) { + val, err := m.GetBackingStore().Get("managedType") + if err != nil { + panic(err) + } + if val != nil { + return val.(*MicrosoftManagedDesktopType) + } + return nil +} // GetOdataType gets the @odata.type property value. The OdataType property func (m *MicrosoftManagedDesktop) GetOdataType()(*string) { val, err := m.GetBackingStore().Get("odataType") @@ -108,6 +129,13 @@ func (m *MicrosoftManagedDesktop) GetTypeEscaped()(*MicrosoftManagedDesktopType) } // Serialize serializes information the current object func (m *MicrosoftManagedDesktop) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetManagedType() != nil { + cast := (*m.GetManagedType()).String() + err := writer.WriteStringValue("managedType", &cast) + if err != nil { + return err + } + } { err := writer.WriteStringValue("@odata.type", m.GetOdataType()) if err != nil { @@ -146,6 +174,13 @@ func (m *MicrosoftManagedDesktop) SetAdditionalData(value map[string]any)() { func (m *MicrosoftManagedDesktop) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { m.backingStore = value } +// SetManagedType sets the managedType property value. The managedType property +func (m *MicrosoftManagedDesktop) SetManagedType(value *MicrosoftManagedDesktopType)() { + err := m.GetBackingStore().Set("managedType", value) + if err != nil { + panic(err) + } +} // SetOdataType sets the @odata.type property value. The OdataType property func (m *MicrosoftManagedDesktop) SetOdataType(value *string)() { err := m.GetBackingStore().Set("odataType", value) @@ -173,10 +208,12 @@ type MicrosoftManagedDesktopable interface { ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetManagedType()(*MicrosoftManagedDesktopType) GetOdataType()(*string) GetProfile()(*string) GetTypeEscaped()(*MicrosoftManagedDesktopType) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetManagedType(value *MicrosoftManagedDesktopType)() SetOdataType(value *string)() SetProfile(value *string)() SetTypeEscaped(value *MicrosoftManagedDesktopType)() diff --git a/models/odataerrors/inner_error.go b/models/odataerrors/inner_error.go index ae1778c36ae..d266d3077dd 100644 --- a/models/odataerrors/inner_error.go +++ b/models/odataerrors/inner_error.go @@ -50,7 +50,7 @@ func (m *InnerError) GetClientRequestId()(*string) { } return nil } -// GetDate gets the Date property value. Date when the error occured. +// GetDate gets the date property value. Date when the error occured. func (m *InnerError) GetDate()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { val, err := m.GetBackingStore().Get("date") if err != nil { @@ -74,7 +74,7 @@ func (m *InnerError) GetFieldDeserializers()(map[string]func(i878a80d2330e89d268 } return nil } - res["Date"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + res["date"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetTimeValue() if err != nil { return err @@ -137,7 +137,7 @@ func (m *InnerError) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c } } { - err := writer.WriteTimeValue("Date", m.GetDate()) + err := writer.WriteTimeValue("date", m.GetDate()) if err != nil { return err } @@ -180,7 +180,7 @@ func (m *InnerError) SetClientRequestId(value *string)() { panic(err) } } -// SetDate sets the Date property value. Date when the error occured. +// SetDate sets the date property value. Date when the error occured. func (m *InnerError) SetDate(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { err := m.GetBackingStore().Set("date", value) if err != nil { diff --git a/models/on_attribute_collection_start_custom_extension.go b/models/on_attribute_collection_start_custom_extension.go new file mode 100644 index 00000000000..877882d9f06 --- /dev/null +++ b/models/on_attribute_collection_start_custom_extension.go @@ -0,0 +1,41 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnAttributeCollectionStartCustomExtension +type OnAttributeCollectionStartCustomExtension struct { + CustomAuthenticationExtension +} +// NewOnAttributeCollectionStartCustomExtension instantiates a new onAttributeCollectionStartCustomExtension and sets the default values. +func NewOnAttributeCollectionStartCustomExtension()(*OnAttributeCollectionStartCustomExtension) { + m := &OnAttributeCollectionStartCustomExtension{ + CustomAuthenticationExtension: *NewCustomAuthenticationExtension(), + } + odataTypeValue := "#microsoft.graph.onAttributeCollectionStartCustomExtension" + m.SetOdataType(&odataTypeValue) + return m +} +// CreateOnAttributeCollectionStartCustomExtensionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOnAttributeCollectionStartCustomExtensionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOnAttributeCollectionStartCustomExtension(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OnAttributeCollectionStartCustomExtension) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.CustomAuthenticationExtension.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *OnAttributeCollectionStartCustomExtension) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.CustomAuthenticationExtension.Serialize(writer) + if err != nil { + return err + } + return nil +} +// OnAttributeCollectionStartCustomExtensionable +type OnAttributeCollectionStartCustomExtensionable interface { + CustomAuthenticationExtensionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/models/on_attribute_collection_start_custom_extension_handler.go b/models/on_attribute_collection_start_custom_extension_handler.go new file mode 100644 index 00000000000..989e476fccc --- /dev/null +++ b/models/on_attribute_collection_start_custom_extension_handler.go @@ -0,0 +1,113 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnAttributeCollectionStartCustomExtensionHandler +type OnAttributeCollectionStartCustomExtensionHandler struct { + OnAttributeCollectionStartHandler +} +// NewOnAttributeCollectionStartCustomExtensionHandler instantiates a new onAttributeCollectionStartCustomExtensionHandler and sets the default values. +func NewOnAttributeCollectionStartCustomExtensionHandler()(*OnAttributeCollectionStartCustomExtensionHandler) { + m := &OnAttributeCollectionStartCustomExtensionHandler{ + OnAttributeCollectionStartHandler: *NewOnAttributeCollectionStartHandler(), + } + odataTypeValue := "#microsoft.graph.onAttributeCollectionStartCustomExtensionHandler" + m.SetOdataType(&odataTypeValue) + return m +} +// CreateOnAttributeCollectionStartCustomExtensionHandlerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOnAttributeCollectionStartCustomExtensionHandlerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOnAttributeCollectionStartCustomExtensionHandler(), nil +} +// GetConfiguration gets the configuration property value. Configuration regarding properties of the custom extension that are can be overwritten per event listener. +func (m *OnAttributeCollectionStartCustomExtensionHandler) 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 +func (m *OnAttributeCollectionStartCustomExtensionHandler) GetCustomExtension()(OnAttributeCollectionStartCustomExtensionable) { + val, err := m.GetBackingStore().Get("customExtension") + if err != nil { + panic(err) + } + if val != nil { + return val.(OnAttributeCollectionStartCustomExtensionable) + } + return nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OnAttributeCollectionStartCustomExtensionHandler) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.OnAttributeCollectionStartHandler.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(CreateOnAttributeCollectionStartCustomExtensionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCustomExtension(val.(OnAttributeCollectionStartCustomExtensionable)) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *OnAttributeCollectionStartCustomExtensionHandler) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.OnAttributeCollectionStartHandler.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. Configuration regarding properties of the custom extension that are can be overwritten per event listener. +func (m *OnAttributeCollectionStartCustomExtensionHandler) 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 *OnAttributeCollectionStartCustomExtensionHandler) SetCustomExtension(value OnAttributeCollectionStartCustomExtensionable)() { + err := m.GetBackingStore().Set("customExtension", value) + if err != nil { + panic(err) + } +} +// OnAttributeCollectionStartCustomExtensionHandlerable +type OnAttributeCollectionStartCustomExtensionHandlerable interface { + OnAttributeCollectionStartHandlerable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConfiguration()(CustomExtensionOverwriteConfigurationable) + GetCustomExtension()(OnAttributeCollectionStartCustomExtensionable) + SetConfiguration(value CustomExtensionOverwriteConfigurationable)() + SetCustomExtension(value OnAttributeCollectionStartCustomExtensionable)() +} diff --git a/models/on_attribute_collection_start_handler.go b/models/on_attribute_collection_start_handler.go new file mode 100644 index 00000000000..caf4b3ed518 --- /dev/null +++ b/models/on_attribute_collection_start_handler.go @@ -0,0 +1,128 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +// OnAttributeCollectionStartHandler +type OnAttributeCollectionStartHandler struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewOnAttributeCollectionStartHandler instantiates a new onAttributeCollectionStartHandler and sets the default values. +func NewOnAttributeCollectionStartHandler()(*OnAttributeCollectionStartHandler) { + m := &OnAttributeCollectionStartHandler{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateOnAttributeCollectionStartHandlerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOnAttributeCollectionStartHandlerFromDiscriminatorValue(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.onAttributeCollectionStartCustomExtensionHandler": + return NewOnAttributeCollectionStartCustomExtensionHandler(), nil + } + } + } + } + return NewOnAttributeCollectionStartHandler(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *OnAttributeCollectionStartHandler) GetAdditionalData()(map[string]any) { + val , err := m.backingStore.Get("additionalData") + if err != nil { + panic(err) + } + if val == nil { + var value = make(map[string]any); + m.SetAdditionalData(value); + } + return val.(map[string]any) +} +// GetBackingStore gets the BackingStore property value. Stores model information. +func (m *OnAttributeCollectionStartHandler) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OnAttributeCollectionStartHandler) 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 +func (m *OnAttributeCollectionStartHandler) 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 *OnAttributeCollectionStartHandler) 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 *OnAttributeCollectionStartHandler) 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 *OnAttributeCollectionStartHandler) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *OnAttributeCollectionStartHandler) SetOdataType(value *string)() { + err := m.GetBackingStore().Set("odataType", value) + if err != nil { + panic(err) + } +} +// OnAttributeCollectionStartHandlerable +type OnAttributeCollectionStartHandlerable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetOdataType()(*string) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetOdataType(value *string)() +} diff --git a/models/on_attribute_collection_start_listener.go b/models/on_attribute_collection_start_listener.go new file mode 100644 index 00000000000..e7e49dc892d --- /dev/null +++ b/models/on_attribute_collection_start_listener.go @@ -0,0 +1,77 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnAttributeCollectionStartListener +type OnAttributeCollectionStartListener struct { + AuthenticationEventListener +} +// NewOnAttributeCollectionStartListener instantiates a new onAttributeCollectionStartListener and sets the default values. +func NewOnAttributeCollectionStartListener()(*OnAttributeCollectionStartListener) { + m := &OnAttributeCollectionStartListener{ + AuthenticationEventListener: *NewAuthenticationEventListener(), + } + odataTypeValue := "#microsoft.graph.onAttributeCollectionStartListener" + m.SetOdataType(&odataTypeValue) + return m +} +// CreateOnAttributeCollectionStartListenerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOnAttributeCollectionStartListenerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOnAttributeCollectionStartListener(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OnAttributeCollectionStartListener) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AuthenticationEventListener.GetFieldDeserializers() + res["handler"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateOnAttributeCollectionStartHandlerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetHandler(val.(OnAttributeCollectionStartHandlerable)) + } + return nil + } + return res +} +// GetHandler gets the handler property value. Configuration for what to invoke if the event resolves to this listener. +func (m *OnAttributeCollectionStartListener) GetHandler()(OnAttributeCollectionStartHandlerable) { + val, err := m.GetBackingStore().Get("handler") + if err != nil { + panic(err) + } + if val != nil { + return val.(OnAttributeCollectionStartHandlerable) + } + return nil +} +// Serialize serializes information the current object +func (m *OnAttributeCollectionStartListener) 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. Configuration for what to invoke if the event resolves to this listener. +func (m *OnAttributeCollectionStartListener) SetHandler(value OnAttributeCollectionStartHandlerable)() { + err := m.GetBackingStore().Set("handler", value) + if err != nil { + panic(err) + } +} +// OnAttributeCollectionStartListenerable +type OnAttributeCollectionStartListenerable interface { + AuthenticationEventListenerable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetHandler()(OnAttributeCollectionStartHandlerable) + SetHandler(value OnAttributeCollectionStartHandlerable)() +} diff --git a/models/on_attribute_collection_submit_custom_extension.go b/models/on_attribute_collection_submit_custom_extension.go new file mode 100644 index 00000000000..39052af99d3 --- /dev/null +++ b/models/on_attribute_collection_submit_custom_extension.go @@ -0,0 +1,41 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnAttributeCollectionSubmitCustomExtension +type OnAttributeCollectionSubmitCustomExtension struct { + CustomAuthenticationExtension +} +// NewOnAttributeCollectionSubmitCustomExtension instantiates a new onAttributeCollectionSubmitCustomExtension and sets the default values. +func NewOnAttributeCollectionSubmitCustomExtension()(*OnAttributeCollectionSubmitCustomExtension) { + m := &OnAttributeCollectionSubmitCustomExtension{ + CustomAuthenticationExtension: *NewCustomAuthenticationExtension(), + } + odataTypeValue := "#microsoft.graph.onAttributeCollectionSubmitCustomExtension" + m.SetOdataType(&odataTypeValue) + return m +} +// CreateOnAttributeCollectionSubmitCustomExtensionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOnAttributeCollectionSubmitCustomExtensionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOnAttributeCollectionSubmitCustomExtension(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OnAttributeCollectionSubmitCustomExtension) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.CustomAuthenticationExtension.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *OnAttributeCollectionSubmitCustomExtension) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.CustomAuthenticationExtension.Serialize(writer) + if err != nil { + return err + } + return nil +} +// OnAttributeCollectionSubmitCustomExtensionable +type OnAttributeCollectionSubmitCustomExtensionable interface { + CustomAuthenticationExtensionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/models/on_attribute_collection_submit_custom_extension_handler.go b/models/on_attribute_collection_submit_custom_extension_handler.go new file mode 100644 index 00000000000..4bd508a474f --- /dev/null +++ b/models/on_attribute_collection_submit_custom_extension_handler.go @@ -0,0 +1,113 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnAttributeCollectionSubmitCustomExtensionHandler +type OnAttributeCollectionSubmitCustomExtensionHandler struct { + OnAttributeCollectionSubmitHandler +} +// NewOnAttributeCollectionSubmitCustomExtensionHandler instantiates a new onAttributeCollectionSubmitCustomExtensionHandler and sets the default values. +func NewOnAttributeCollectionSubmitCustomExtensionHandler()(*OnAttributeCollectionSubmitCustomExtensionHandler) { + m := &OnAttributeCollectionSubmitCustomExtensionHandler{ + OnAttributeCollectionSubmitHandler: *NewOnAttributeCollectionSubmitHandler(), + } + odataTypeValue := "#microsoft.graph.onAttributeCollectionSubmitCustomExtensionHandler" + m.SetOdataType(&odataTypeValue) + return m +} +// CreateOnAttributeCollectionSubmitCustomExtensionHandlerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOnAttributeCollectionSubmitCustomExtensionHandlerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOnAttributeCollectionSubmitCustomExtensionHandler(), nil +} +// GetConfiguration gets the configuration property value. Configuration regarding properties of the custom extension that can be overwritten per event listener. +func (m *OnAttributeCollectionSubmitCustomExtensionHandler) 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 +func (m *OnAttributeCollectionSubmitCustomExtensionHandler) GetCustomExtension()(OnAttributeCollectionSubmitCustomExtensionable) { + val, err := m.GetBackingStore().Get("customExtension") + if err != nil { + panic(err) + } + if val != nil { + return val.(OnAttributeCollectionSubmitCustomExtensionable) + } + return nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OnAttributeCollectionSubmitCustomExtensionHandler) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.OnAttributeCollectionSubmitHandler.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(CreateOnAttributeCollectionSubmitCustomExtensionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCustomExtension(val.(OnAttributeCollectionSubmitCustomExtensionable)) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *OnAttributeCollectionSubmitCustomExtensionHandler) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.OnAttributeCollectionSubmitHandler.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. Configuration regarding properties of the custom extension that can be overwritten per event listener. +func (m *OnAttributeCollectionSubmitCustomExtensionHandler) 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 *OnAttributeCollectionSubmitCustomExtensionHandler) SetCustomExtension(value OnAttributeCollectionSubmitCustomExtensionable)() { + err := m.GetBackingStore().Set("customExtension", value) + if err != nil { + panic(err) + } +} +// OnAttributeCollectionSubmitCustomExtensionHandlerable +type OnAttributeCollectionSubmitCustomExtensionHandlerable interface { + OnAttributeCollectionSubmitHandlerable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConfiguration()(CustomExtensionOverwriteConfigurationable) + GetCustomExtension()(OnAttributeCollectionSubmitCustomExtensionable) + SetConfiguration(value CustomExtensionOverwriteConfigurationable)() + SetCustomExtension(value OnAttributeCollectionSubmitCustomExtensionable)() +} diff --git a/models/on_attribute_collection_submit_handler.go b/models/on_attribute_collection_submit_handler.go new file mode 100644 index 00000000000..4d40b45e0ca --- /dev/null +++ b/models/on_attribute_collection_submit_handler.go @@ -0,0 +1,128 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +// OnAttributeCollectionSubmitHandler +type OnAttributeCollectionSubmitHandler struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewOnAttributeCollectionSubmitHandler instantiates a new onAttributeCollectionSubmitHandler and sets the default values. +func NewOnAttributeCollectionSubmitHandler()(*OnAttributeCollectionSubmitHandler) { + m := &OnAttributeCollectionSubmitHandler{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateOnAttributeCollectionSubmitHandlerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOnAttributeCollectionSubmitHandlerFromDiscriminatorValue(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.onAttributeCollectionSubmitCustomExtensionHandler": + return NewOnAttributeCollectionSubmitCustomExtensionHandler(), nil + } + } + } + } + return NewOnAttributeCollectionSubmitHandler(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *OnAttributeCollectionSubmitHandler) GetAdditionalData()(map[string]any) { + val , err := m.backingStore.Get("additionalData") + if err != nil { + panic(err) + } + if val == nil { + var value = make(map[string]any); + m.SetAdditionalData(value); + } + return val.(map[string]any) +} +// GetBackingStore gets the BackingStore property value. Stores model information. +func (m *OnAttributeCollectionSubmitHandler) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OnAttributeCollectionSubmitHandler) 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 +func (m *OnAttributeCollectionSubmitHandler) 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 *OnAttributeCollectionSubmitHandler) 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 *OnAttributeCollectionSubmitHandler) 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 *OnAttributeCollectionSubmitHandler) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *OnAttributeCollectionSubmitHandler) SetOdataType(value *string)() { + err := m.GetBackingStore().Set("odataType", value) + if err != nil { + panic(err) + } +} +// OnAttributeCollectionSubmitHandlerable +type OnAttributeCollectionSubmitHandlerable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetOdataType()(*string) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetOdataType(value *string)() +} diff --git a/models/on_attribute_collection_submit_listener.go b/models/on_attribute_collection_submit_listener.go new file mode 100644 index 00000000000..a0a9f6ba4fc --- /dev/null +++ b/models/on_attribute_collection_submit_listener.go @@ -0,0 +1,77 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnAttributeCollectionSubmitListener +type OnAttributeCollectionSubmitListener struct { + AuthenticationEventListener +} +// NewOnAttributeCollectionSubmitListener instantiates a new onAttributeCollectionSubmitListener and sets the default values. +func NewOnAttributeCollectionSubmitListener()(*OnAttributeCollectionSubmitListener) { + m := &OnAttributeCollectionSubmitListener{ + AuthenticationEventListener: *NewAuthenticationEventListener(), + } + odataTypeValue := "#microsoft.graph.onAttributeCollectionSubmitListener" + m.SetOdataType(&odataTypeValue) + return m +} +// CreateOnAttributeCollectionSubmitListenerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOnAttributeCollectionSubmitListenerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOnAttributeCollectionSubmitListener(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OnAttributeCollectionSubmitListener) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AuthenticationEventListener.GetFieldDeserializers() + res["handler"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateOnAttributeCollectionSubmitHandlerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetHandler(val.(OnAttributeCollectionSubmitHandlerable)) + } + return nil + } + return res +} +// GetHandler gets the handler property value. Configuration for what to invoke if the event resolves to this listener. +func (m *OnAttributeCollectionSubmitListener) GetHandler()(OnAttributeCollectionSubmitHandlerable) { + val, err := m.GetBackingStore().Get("handler") + if err != nil { + panic(err) + } + if val != nil { + return val.(OnAttributeCollectionSubmitHandlerable) + } + return nil +} +// Serialize serializes information the current object +func (m *OnAttributeCollectionSubmitListener) 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. Configuration for what to invoke if the event resolves to this listener. +func (m *OnAttributeCollectionSubmitListener) SetHandler(value OnAttributeCollectionSubmitHandlerable)() { + err := m.GetBackingStore().Set("handler", value) + if err != nil { + panic(err) + } +} +// OnAttributeCollectionSubmitListenerable +type OnAttributeCollectionSubmitListenerable interface { + AuthenticationEventListenerable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetHandler()(OnAttributeCollectionSubmitHandlerable) + SetHandler(value OnAttributeCollectionSubmitHandlerable)() +} diff --git a/models/open_shift.go b/models/open_shift.go index d281c0e7925..3a4072c1aaf 100644 --- a/models/open_shift.go +++ b/models/open_shift.go @@ -21,7 +21,7 @@ func NewOpenShift()(*OpenShift) { func CreateOpenShiftFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewOpenShift(), nil } -// GetDraftOpenShift gets the draftOpenShift property value. An unpublished open shift. +// GetDraftOpenShift gets the draftOpenShift property value. Draft changes in the openShift are only visible to managers until they are shared. func (m *OpenShift) GetDraftOpenShift()(OpenShiftItemable) { val, err := m.GetBackingStore().Get("draftOpenShift") if err != nil { @@ -107,7 +107,7 @@ func (m *OpenShift) GetFieldDeserializers()(map[string]func(i878a80d2330e89d2689 } return res } -// GetIsStagedForDeletion gets the isStagedForDeletion property value. The isStagedForDeletion property +// GetIsStagedForDeletion gets the isStagedForDeletion property value. The openShift is marked for deletion, a process that is finalized when the schedule is shared. func (m *OpenShift) GetIsStagedForDeletion()(*bool) { val, err := m.GetBackingStore().Get("isStagedForDeletion") if err != nil { @@ -118,7 +118,7 @@ func (m *OpenShift) GetIsStagedForDeletion()(*bool) { } return nil } -// GetSchedulingGroupId gets the schedulingGroupId property value. ID for the scheduling group that the open shift belongs to. +// GetSchedulingGroupId gets the schedulingGroupId property value. The ID of the schedulingGroup that contains the openShift. func (m *OpenShift) GetSchedulingGroupId()(*string) { val, err := m.GetBackingStore().Get("schedulingGroupId") if err != nil { @@ -129,7 +129,7 @@ func (m *OpenShift) GetSchedulingGroupId()(*string) { } return nil } -// GetSchedulingGroupName gets the schedulingGroupName property value. The schedulingGroupName property +// GetSchedulingGroupName gets the schedulingGroupName property value. The name of the schedulingGroup that contains the openShift. func (m *OpenShift) GetSchedulingGroupName()(*string) { val, err := m.GetBackingStore().Get("schedulingGroupName") if err != nil { @@ -140,7 +140,7 @@ func (m *OpenShift) GetSchedulingGroupName()(*string) { } return nil } -// GetSharedOpenShift gets the sharedOpenShift property value. A published open shift. +// GetSharedOpenShift gets the sharedOpenShift property value. The shared version of this openShift that is viewable by both employees and managers. func (m *OpenShift) GetSharedOpenShift()(OpenShiftItemable) { val, err := m.GetBackingStore().Get("sharedOpenShift") if err != nil { @@ -151,7 +151,7 @@ func (m *OpenShift) GetSharedOpenShift()(OpenShiftItemable) { } return nil } -// GetTeamId gets the teamId property value. The teamId property +// GetTeamId gets the teamId property value. The ID of the team in which the openShift is located. func (m *OpenShift) GetTeamId()(*string) { val, err := m.GetBackingStore().Get("teamId") if err != nil { @@ -162,7 +162,7 @@ func (m *OpenShift) GetTeamId()(*string) { } return nil } -// GetTeamName gets the teamName property value. The teamName property +// GetTeamName gets the teamName property value. The name of the team in which the openShift is located. func (m *OpenShift) GetTeamName()(*string) { val, err := m.GetBackingStore().Get("teamName") if err != nil { @@ -205,49 +205,49 @@ func (m *OpenShift) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c0 } return nil } -// SetDraftOpenShift sets the draftOpenShift property value. An unpublished open shift. +// SetDraftOpenShift sets the draftOpenShift property value. Draft changes in the openShift are only visible to managers until they are shared. func (m *OpenShift) SetDraftOpenShift(value OpenShiftItemable)() { err := m.GetBackingStore().Set("draftOpenShift", value) if err != nil { panic(err) } } -// SetIsStagedForDeletion sets the isStagedForDeletion property value. The isStagedForDeletion property +// SetIsStagedForDeletion sets the isStagedForDeletion property value. The openShift is marked for deletion, a process that is finalized when the schedule is shared. func (m *OpenShift) SetIsStagedForDeletion(value *bool)() { err := m.GetBackingStore().Set("isStagedForDeletion", value) if err != nil { panic(err) } } -// SetSchedulingGroupId sets the schedulingGroupId property value. ID for the scheduling group that the open shift belongs to. +// SetSchedulingGroupId sets the schedulingGroupId property value. The ID of the schedulingGroup that contains the openShift. func (m *OpenShift) SetSchedulingGroupId(value *string)() { err := m.GetBackingStore().Set("schedulingGroupId", value) if err != nil { panic(err) } } -// SetSchedulingGroupName sets the schedulingGroupName property value. The schedulingGroupName property +// SetSchedulingGroupName sets the schedulingGroupName property value. The name of the schedulingGroup that contains the openShift. func (m *OpenShift) SetSchedulingGroupName(value *string)() { err := m.GetBackingStore().Set("schedulingGroupName", value) if err != nil { panic(err) } } -// SetSharedOpenShift sets the sharedOpenShift property value. A published open shift. +// SetSharedOpenShift sets the sharedOpenShift property value. The shared version of this openShift that is viewable by both employees and managers. func (m *OpenShift) SetSharedOpenShift(value OpenShiftItemable)() { err := m.GetBackingStore().Set("sharedOpenShift", value) if err != nil { panic(err) } } -// SetTeamId sets the teamId property value. The teamId property +// SetTeamId sets the teamId property value. The ID of the team in which the openShift is located. func (m *OpenShift) SetTeamId(value *string)() { err := m.GetBackingStore().Set("teamId", value) if err != nil { panic(err) } } -// SetTeamName sets the teamName property value. The teamName property +// SetTeamName sets the teamName property value. The name of the team in which the openShift is located. func (m *OpenShift) SetTeamName(value *string)() { err := m.GetBackingStore().Set("teamName", value) if err != nil { diff --git a/models/planner_approval_requirement.go b/models/planner_approval_requirement.go new file mode 100644 index 00000000000..168909cd0f7 --- /dev/null +++ b/models/planner_approval_requirement.go @@ -0,0 +1,146 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +// PlannerApprovalRequirement +type PlannerApprovalRequirement struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewPlannerApprovalRequirement instantiates a new plannerApprovalRequirement and sets the default values. +func NewPlannerApprovalRequirement()(*PlannerApprovalRequirement) { + m := &PlannerApprovalRequirement{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePlannerApprovalRequirementFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerApprovalRequirementFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerApprovalRequirement(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *PlannerApprovalRequirement) GetAdditionalData()(map[string]any) { + val , err := m.backingStore.Get("additionalData") + if err != nil { + panic(err) + } + if val == nil { + var value = make(map[string]any); + m.SetAdditionalData(value); + } + return val.(map[string]any) +} +// GetBackingStore gets the BackingStore property value. Stores model information. +func (m *PlannerApprovalRequirement) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerApprovalRequirement) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["isApprovalRequired"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsApprovalRequired(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 +} +// GetIsApprovalRequired gets the isApprovalRequired property value. The isApprovalRequired property +func (m *PlannerApprovalRequirement) GetIsApprovalRequired()(*bool) { + val, err := m.GetBackingStore().Get("isApprovalRequired") + if err != nil { + panic(err) + } + if val != nil { + return val.(*bool) + } + return nil +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PlannerApprovalRequirement) 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 *PlannerApprovalRequirement) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("isApprovalRequired", m.GetIsApprovalRequired()) + 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 *PlannerApprovalRequirement) 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 *PlannerApprovalRequirement) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetIsApprovalRequired sets the isApprovalRequired property value. The isApprovalRequired property +func (m *PlannerApprovalRequirement) SetIsApprovalRequired(value *bool)() { + err := m.GetBackingStore().Set("isApprovalRequired", value) + if err != nil { + panic(err) + } +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PlannerApprovalRequirement) SetOdataType(value *string)() { + err := m.GetBackingStore().Set("odataType", value) + if err != nil { + panic(err) + } +} +// PlannerApprovalRequirementable +type PlannerApprovalRequirementable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetIsApprovalRequired()(*bool) + GetOdataType()(*string) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetIsApprovalRequired(value *bool)() + SetOdataType(value *string)() +} diff --git a/models/planner_approval_status.go b/models/planner_approval_status.go new file mode 100644 index 00000000000..0cb907afa67 --- /dev/null +++ b/models/planner_approval_status.go @@ -0,0 +1,46 @@ +package models +import ( + "errors" +) +// +type PlannerApprovalStatus int + +const ( + REQUESTED_PLANNERAPPROVALSTATUS PlannerApprovalStatus = iota + APPROVED_PLANNERAPPROVALSTATUS + REJECTED_PLANNERAPPROVALSTATUS + CANCELLED_PLANNERAPPROVALSTATUS + UNKNOWNFUTUREVALUE_PLANNERAPPROVALSTATUS +) + +func (i PlannerApprovalStatus) String() string { + return []string{"requested", "approved", "rejected", "cancelled", "unknownFutureValue"}[i] +} +func ParsePlannerApprovalStatus(v string) (any, error) { + result := REQUESTED_PLANNERAPPROVALSTATUS + switch v { + case "requested": + result = REQUESTED_PLANNERAPPROVALSTATUS + case "approved": + result = APPROVED_PLANNERAPPROVALSTATUS + case "rejected": + result = REJECTED_PLANNERAPPROVALSTATUS + case "cancelled": + result = CANCELLED_PLANNERAPPROVALSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_PLANNERAPPROVALSTATUS + default: + return 0, errors.New("Unknown PlannerApprovalStatus value: " + v) + } + return &result, nil +} +func SerializePlannerApprovalStatus(values []PlannerApprovalStatus) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i PlannerApprovalStatus) isMultiValue() bool { + return false +} diff --git a/models/planner_archival_info.go b/models/planner_archival_info.go new file mode 100644 index 00000000000..0410d4e06ae --- /dev/null +++ b/models/planner_archival_info.go @@ -0,0 +1,219 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +// PlannerArchivalInfo +type PlannerArchivalInfo struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewPlannerArchivalInfo instantiates a new plannerArchivalInfo and sets the default values. +func NewPlannerArchivalInfo()(*PlannerArchivalInfo) { + m := &PlannerArchivalInfo{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePlannerArchivalInfoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerArchivalInfoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerArchivalInfo(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *PlannerArchivalInfo) GetAdditionalData()(map[string]any) { + val , err := m.backingStore.Get("additionalData") + if err != nil { + panic(err) + } + if val == nil { + var value = make(map[string]any); + m.SetAdditionalData(value); + } + return val.(map[string]any) +} +// GetBackingStore gets the BackingStore property value. Stores model information. +func (m *PlannerArchivalInfo) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerArchivalInfo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["justification"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetJustification(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["statusChangedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetStatusChangedBy(val.(IdentitySetable)) + } + return nil + } + res["statusChangedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetStatusChangedDateTime(val) + } + return nil + } + return res +} +// GetJustification gets the justification property value. The justification property +func (m *PlannerArchivalInfo) GetJustification()(*string) { + val, err := m.GetBackingStore().Get("justification") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PlannerArchivalInfo) GetOdataType()(*string) { + val, err := m.GetBackingStore().Get("odataType") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetStatusChangedBy gets the statusChangedBy property value. The statusChangedBy property +func (m *PlannerArchivalInfo) GetStatusChangedBy()(IdentitySetable) { + val, err := m.GetBackingStore().Get("statusChangedBy") + if err != nil { + panic(err) + } + if val != nil { + return val.(IdentitySetable) + } + return nil +} +// GetStatusChangedDateTime gets the statusChangedDateTime property value. The statusChangedDateTime property +func (m *PlannerArchivalInfo) GetStatusChangedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + val, err := m.GetBackingStore().Get("statusChangedDateTime") + if err != nil { + panic(err) + } + if val != nil { + return val.(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + } + return nil +} +// Serialize serializes information the current object +func (m *PlannerArchivalInfo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("justification", m.GetJustification()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("statusChangedBy", m.GetStatusChangedBy()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("statusChangedDateTime", m.GetStatusChangedDateTime()) + 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 *PlannerArchivalInfo) 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 *PlannerArchivalInfo) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetJustification sets the justification property value. The justification property +func (m *PlannerArchivalInfo) SetJustification(value *string)() { + err := m.GetBackingStore().Set("justification", value) + if err != nil { + panic(err) + } +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PlannerArchivalInfo) SetOdataType(value *string)() { + err := m.GetBackingStore().Set("odataType", value) + if err != nil { + panic(err) + } +} +// SetStatusChangedBy sets the statusChangedBy property value. The statusChangedBy property +func (m *PlannerArchivalInfo) SetStatusChangedBy(value IdentitySetable)() { + err := m.GetBackingStore().Set("statusChangedBy", value) + if err != nil { + panic(err) + } +} +// SetStatusChangedDateTime sets the statusChangedDateTime property value. The statusChangedDateTime property +func (m *PlannerArchivalInfo) SetStatusChangedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + err := m.GetBackingStore().Set("statusChangedDateTime", value) + if err != nil { + panic(err) + } +} +// PlannerArchivalInfoable +type PlannerArchivalInfoable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetJustification()(*string) + GetOdataType()(*string) + GetStatusChangedBy()(IdentitySetable) + GetStatusChangedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetJustification(value *string)() + SetOdataType(value *string)() + SetStatusChangedBy(value IdentitySetable)() + SetStatusChangedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/models/planner_base_approval_attachment.go b/models/planner_base_approval_attachment.go new file mode 100644 index 00000000000..30722757c21 --- /dev/null +++ b/models/planner_base_approval_attachment.go @@ -0,0 +1,165 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +// PlannerBaseApprovalAttachment +type PlannerBaseApprovalAttachment struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewPlannerBaseApprovalAttachment instantiates a new plannerBaseApprovalAttachment and sets the default values. +func NewPlannerBaseApprovalAttachment()(*PlannerBaseApprovalAttachment) { + m := &PlannerBaseApprovalAttachment{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePlannerBaseApprovalAttachmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerBaseApprovalAttachmentFromDiscriminatorValue(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.plannerBasicApprovalAttachment": + return NewPlannerBasicApprovalAttachment(), nil + } + } + } + } + return NewPlannerBaseApprovalAttachment(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *PlannerBaseApprovalAttachment) GetAdditionalData()(map[string]any) { + val , err := m.backingStore.Get("additionalData") + if err != nil { + panic(err) + } + if val == nil { + var value = make(map[string]any); + m.SetAdditionalData(value); + } + return val.(map[string]any) +} +// GetBackingStore gets the BackingStore property value. Stores model information. +func (m *PlannerBaseApprovalAttachment) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerBaseApprovalAttachment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["@odata.type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOdataType(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePlannerApprovalStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*PlannerApprovalStatus)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PlannerBaseApprovalAttachment) 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. The status property +func (m *PlannerBaseApprovalAttachment) GetStatus()(*PlannerApprovalStatus) { + val, err := m.GetBackingStore().Get("status") + if err != nil { + panic(err) + } + if val != nil { + return val.(*PlannerApprovalStatus) + } + return nil +} +// Serialize serializes information the current object +func (m *PlannerBaseApprovalAttachment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err := writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *PlannerBaseApprovalAttachment) 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 *PlannerBaseApprovalAttachment) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PlannerBaseApprovalAttachment) SetOdataType(value *string)() { + err := m.GetBackingStore().Set("odataType", value) + if err != nil { + panic(err) + } +} +// SetStatus sets the status property value. The status property +func (m *PlannerBaseApprovalAttachment) SetStatus(value *PlannerApprovalStatus)() { + err := m.GetBackingStore().Set("status", value) + if err != nil { + panic(err) + } +} +// PlannerBaseApprovalAttachmentable +type PlannerBaseApprovalAttachmentable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetOdataType()(*string) + GetStatus()(*PlannerApprovalStatus) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetOdataType(value *string)() + SetStatus(value *PlannerApprovalStatus)() +} diff --git a/models/planner_basic_approval_attachment.go b/models/planner_basic_approval_attachment.go new file mode 100644 index 00000000000..4ddb32eb417 --- /dev/null +++ b/models/planner_basic_approval_attachment.go @@ -0,0 +1,77 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerBasicApprovalAttachment +type PlannerBasicApprovalAttachment struct { + PlannerBaseApprovalAttachment +} +// NewPlannerBasicApprovalAttachment instantiates a new plannerBasicApprovalAttachment and sets the default values. +func NewPlannerBasicApprovalAttachment()(*PlannerBasicApprovalAttachment) { + m := &PlannerBasicApprovalAttachment{ + PlannerBaseApprovalAttachment: *NewPlannerBaseApprovalAttachment(), + } + odataTypeValue := "#microsoft.graph.plannerBasicApprovalAttachment" + m.SetOdataType(&odataTypeValue) + return m +} +// CreatePlannerBasicApprovalAttachmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerBasicApprovalAttachmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerBasicApprovalAttachment(), nil +} +// GetApprovalId gets the approvalId property value. The approvalId property +func (m *PlannerBasicApprovalAttachment) GetApprovalId()(*string) { + val, err := m.GetBackingStore().Get("approvalId") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerBasicApprovalAttachment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.PlannerBaseApprovalAttachment.GetFieldDeserializers() + res["approvalId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetApprovalId(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *PlannerBasicApprovalAttachment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.PlannerBaseApprovalAttachment.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("approvalId", m.GetApprovalId()) + if err != nil { + return err + } + } + return nil +} +// SetApprovalId sets the approvalId property value. The approvalId property +func (m *PlannerBasicApprovalAttachment) SetApprovalId(value *string)() { + err := m.GetBackingStore().Set("approvalId", value) + if err != nil { + panic(err) + } +} +// PlannerBasicApprovalAttachmentable +type PlannerBasicApprovalAttachmentable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + PlannerBaseApprovalAttachmentable + GetApprovalId()(*string) + SetApprovalId(value *string)() +} diff --git a/models/planner_bucket.go b/models/planner_bucket.go index 868a8246a28..d977efb362d 100644 --- a/models/planner_bucket.go +++ b/models/planner_bucket.go @@ -19,6 +19,17 @@ func NewPlannerBucket()(*PlannerBucket) { func CreatePlannerBucketFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewPlannerBucket(), nil } +// GetArchivalInfo gets the archivalInfo property value. The archivalInfo property +func (m *PlannerBucket) GetArchivalInfo()(PlannerArchivalInfoable) { + val, err := m.GetBackingStore().Get("archivalInfo") + if err != nil { + panic(err) + } + if val != nil { + return val.(PlannerArchivalInfoable) + } + return nil +} // GetCreationSource gets the creationSource property value. Contains information about the origin of the bucket. func (m *PlannerBucket) GetCreationSource()(PlannerBucketCreationable) { val, err := m.GetBackingStore().Get("creationSource") @@ -33,6 +44,16 @@ func (m *PlannerBucket) GetCreationSource()(PlannerBucketCreationable) { // GetFieldDeserializers the deserialization information for the current model func (m *PlannerBucket) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := m.PlannerDelta.GetFieldDeserializers() + res["archivalInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePlannerArchivalInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetArchivalInfo(val.(PlannerArchivalInfoable)) + } + return nil + } res["creationSource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(CreatePlannerBucketCreationFromDiscriminatorValue) if err != nil { @@ -43,6 +64,16 @@ func (m *PlannerBucket) GetFieldDeserializers()(map[string]func(i878a80d2330e89d } return nil } + res["isArchived"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsArchived(val) + } + return nil + } res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -91,6 +122,17 @@ func (m *PlannerBucket) GetFieldDeserializers()(map[string]func(i878a80d2330e89d } return res } +// GetIsArchived gets the isArchived property value. The isArchived property +func (m *PlannerBucket) GetIsArchived()(*bool) { + val, err := m.GetBackingStore().Get("isArchived") + if err != nil { + panic(err) + } + if val != nil { + return val.(*bool) + } + return nil +} // GetName gets the name property value. Name of the bucket. func (m *PlannerBucket) GetName()(*string) { val, err := m.GetBackingStore().Get("name") @@ -141,12 +183,24 @@ func (m *PlannerBucket) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0 if err != nil { return err } + { + err = writer.WriteObjectValue("archivalInfo", m.GetArchivalInfo()) + if err != nil { + return err + } + } { err = writer.WriteObjectValue("creationSource", m.GetCreationSource()) if err != nil { return err } } + { + err = writer.WriteBoolValue("isArchived", m.GetIsArchived()) + if err != nil { + return err + } + } { err = writer.WriteStringValue("name", m.GetName()) if err != nil { @@ -179,6 +233,13 @@ func (m *PlannerBucket) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0 } return nil } +// SetArchivalInfo sets the archivalInfo property value. The archivalInfo property +func (m *PlannerBucket) SetArchivalInfo(value PlannerArchivalInfoable)() { + err := m.GetBackingStore().Set("archivalInfo", value) + if err != nil { + panic(err) + } +} // SetCreationSource sets the creationSource property value. Contains information about the origin of the bucket. func (m *PlannerBucket) SetCreationSource(value PlannerBucketCreationable)() { err := m.GetBackingStore().Set("creationSource", value) @@ -186,6 +247,13 @@ func (m *PlannerBucket) SetCreationSource(value PlannerBucketCreationable)() { panic(err) } } +// SetIsArchived sets the isArchived property value. The isArchived property +func (m *PlannerBucket) SetIsArchived(value *bool)() { + err := m.GetBackingStore().Set("isArchived", value) + if err != nil { + panic(err) + } +} // SetName sets the name property value. Name of the bucket. func (m *PlannerBucket) SetName(value *string)() { err := m.GetBackingStore().Set("name", value) @@ -218,12 +286,16 @@ func (m *PlannerBucket) SetTasks(value []PlannerTaskable)() { type PlannerBucketable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable PlannerDeltaable + GetArchivalInfo()(PlannerArchivalInfoable) GetCreationSource()(PlannerBucketCreationable) + GetIsArchived()(*bool) GetName()(*string) GetOrderHint()(*string) GetPlanId()(*string) GetTasks()([]PlannerTaskable) + SetArchivalInfo(value PlannerArchivalInfoable)() SetCreationSource(value PlannerBucketCreationable)() + SetIsArchived(value *bool)() SetName(value *string)() SetOrderHint(value *string)() SetPlanId(value *string)() diff --git a/models/planner_forms_dictionary.go b/models/planner_forms_dictionary.go new file mode 100644 index 00000000000..ed0cc9a6336 --- /dev/null +++ b/models/planner_forms_dictionary.go @@ -0,0 +1,39 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerFormsDictionary +type PlannerFormsDictionary struct { + Dictionary +} +// NewPlannerFormsDictionary instantiates a new plannerFormsDictionary and sets the default values. +func NewPlannerFormsDictionary()(*PlannerFormsDictionary) { + m := &PlannerFormsDictionary{ + Dictionary: *NewDictionary(), + } + return m +} +// CreatePlannerFormsDictionaryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerFormsDictionaryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerFormsDictionary(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerFormsDictionary) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Dictionary.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *PlannerFormsDictionary) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Dictionary.Serialize(writer) + if err != nil { + return err + } + return nil +} +// PlannerFormsDictionaryable +type PlannerFormsDictionaryable interface { + Dictionaryable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/models/planner_forms_requirement.go b/models/planner_forms_requirement.go new file mode 100644 index 00000000000..b8d2283c047 --- /dev/null +++ b/models/planner_forms_requirement.go @@ -0,0 +1,152 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +// PlannerFormsRequirement +type PlannerFormsRequirement struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewPlannerFormsRequirement instantiates a new plannerFormsRequirement and sets the default values. +func NewPlannerFormsRequirement()(*PlannerFormsRequirement) { + m := &PlannerFormsRequirement{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePlannerFormsRequirementFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerFormsRequirementFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerFormsRequirement(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *PlannerFormsRequirement) GetAdditionalData()(map[string]any) { + val , err := m.backingStore.Get("additionalData") + if err != nil { + panic(err) + } + if val == nil { + var value = make(map[string]any); + m.SetAdditionalData(value); + } + return val.(map[string]any) +} +// GetBackingStore gets the BackingStore property value. Stores model information. +func (m *PlannerFormsRequirement) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerFormsRequirement) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["@odata.type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOdataType(val) + } + return nil + } + res["requiredForms"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetRequiredForms(res) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PlannerFormsRequirement) GetOdataType()(*string) { + val, err := m.GetBackingStore().Get("odataType") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetRequiredForms gets the requiredForms property value. The requiredForms property +func (m *PlannerFormsRequirement) GetRequiredForms()([]string) { + val, err := m.GetBackingStore().Get("requiredForms") + if err != nil { + panic(err) + } + if val != nil { + return val.([]string) + } + return nil +} +// Serialize serializes information the current object +func (m *PlannerFormsRequirement) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetRequiredForms() != nil { + err := writer.WriteCollectionOfStringValues("requiredForms", m.GetRequiredForms()) + 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 *PlannerFormsRequirement) 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 *PlannerFormsRequirement) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PlannerFormsRequirement) SetOdataType(value *string)() { + err := m.GetBackingStore().Set("odataType", value) + if err != nil { + panic(err) + } +} +// SetRequiredForms sets the requiredForms property value. The requiredForms property +func (m *PlannerFormsRequirement) SetRequiredForms(value []string)() { + err := m.GetBackingStore().Set("requiredForms", value) + if err != nil { + panic(err) + } +} +// PlannerFormsRequirementable +type PlannerFormsRequirementable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetOdataType()(*string) + GetRequiredForms()([]string) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetOdataType(value *string)() + SetRequiredForms(value []string)() +} diff --git a/models/planner_plan.go b/models/planner_plan.go index e51367314e6..bbcf9efa539 100644 --- a/models/planner_plan.go +++ b/models/planner_plan.go @@ -20,6 +20,17 @@ func NewPlannerPlan()(*PlannerPlan) { func CreatePlannerPlanFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewPlannerPlan(), nil } +// GetArchivalInfo gets the archivalInfo property value. The archivalInfo property +func (m *PlannerPlan) GetArchivalInfo()(PlannerArchivalInfoable) { + val, err := m.GetBackingStore().Get("archivalInfo") + if err != nil { + panic(err) + } + if val != nil { + return val.(PlannerArchivalInfoable) + } + return nil +} // GetBuckets gets the buckets property value. Collection of buckets in the plan. Read-only. Nullable. func (m *PlannerPlan) GetBuckets()([]PlannerBucketable) { val, err := m.GetBackingStore().Get("buckets") @@ -100,6 +111,16 @@ func (m *PlannerPlan) GetDetails()(PlannerPlanDetailsable) { // GetFieldDeserializers the deserialization information for the current model func (m *PlannerPlan) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := m.PlannerDelta.GetFieldDeserializers() + res["archivalInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePlannerArchivalInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetArchivalInfo(val.(PlannerArchivalInfoable)) + } + return nil + } res["buckets"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetCollectionOfObjectValues(CreatePlannerBucketFromDiscriminatorValue) if err != nil { @@ -176,6 +197,16 @@ func (m *PlannerPlan) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26 } return nil } + res["isArchived"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsArchived(val) + } + return nil + } res["owner"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -230,6 +261,17 @@ func (m *PlannerPlan) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26 } return res } +// GetIsArchived gets the isArchived property value. The isArchived property +func (m *PlannerPlan) GetIsArchived()(*bool) { + val, err := m.GetBackingStore().Get("isArchived") + if err != nil { + panic(err) + } + if val != nil { + return val.(*bool) + } + return nil +} // GetOwner gets the owner property value. The owner property func (m *PlannerPlan) GetOwner()(*string) { val, err := m.GetBackingStore().Get("owner") @@ -280,6 +322,12 @@ func (m *PlannerPlan) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6 if err != nil { return err } + { + err = writer.WriteObjectValue("archivalInfo", m.GetArchivalInfo()) + if err != nil { + return err + } + } if m.GetBuckets() != nil { cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetBuckets())) for i, v := range m.GetBuckets() { @@ -328,6 +376,12 @@ func (m *PlannerPlan) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6 return err } } + { + err = writer.WriteBoolValue("isArchived", m.GetIsArchived()) + if err != nil { + return err + } + } { err = writer.WriteStringValue("owner", m.GetOwner()) if err != nil { @@ -366,6 +420,13 @@ func (m *PlannerPlan) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6 } return nil } +// SetArchivalInfo sets the archivalInfo property value. The archivalInfo property +func (m *PlannerPlan) SetArchivalInfo(value PlannerArchivalInfoable)() { + err := m.GetBackingStore().Set("archivalInfo", value) + if err != nil { + panic(err) + } +} // SetBuckets sets the buckets property value. Collection of buckets in the plan. Read-only. Nullable. func (m *PlannerPlan) SetBuckets(value []PlannerBucketable)() { err := m.GetBackingStore().Set("buckets", value) @@ -415,6 +476,13 @@ func (m *PlannerPlan) SetDetails(value PlannerPlanDetailsable)() { panic(err) } } +// SetIsArchived sets the isArchived property value. The isArchived property +func (m *PlannerPlan) SetIsArchived(value *bool)() { + err := m.GetBackingStore().Set("isArchived", value) + if err != nil { + panic(err) + } +} // SetOwner sets the owner property value. The owner property func (m *PlannerPlan) SetOwner(value *string)() { err := m.GetBackingStore().Set("owner", value) @@ -447,6 +515,7 @@ func (m *PlannerPlan) SetTitle(value *string)() { type PlannerPlanable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable PlannerDeltaable + GetArchivalInfo()(PlannerArchivalInfoable) GetBuckets()([]PlannerBucketable) GetContainer()(PlannerPlanContainerable) GetContexts()(PlannerPlanContextCollectionable) @@ -454,10 +523,12 @@ type PlannerPlanable interface { GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) GetCreationSource()(PlannerPlanCreationable) GetDetails()(PlannerPlanDetailsable) + GetIsArchived()(*bool) GetOwner()(*string) GetSharedWithContainers()([]PlannerSharedWithContainerable) GetTasks()([]PlannerTaskable) GetTitle()(*string) + SetArchivalInfo(value PlannerArchivalInfoable)() SetBuckets(value []PlannerBucketable)() SetContainer(value PlannerPlanContainerable)() SetContexts(value PlannerPlanContextCollectionable)() @@ -465,6 +536,7 @@ type PlannerPlanable interface { SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() SetCreationSource(value PlannerPlanCreationable)() SetDetails(value PlannerPlanDetailsable)() + SetIsArchived(value *bool)() SetOwner(value *string)() SetSharedWithContainers(value []PlannerSharedWithContainerable)() SetTasks(value []PlannerTaskable)() diff --git a/models/planner_task.go b/models/planner_task.go index f409916827f..287b5f37064 100644 --- a/models/planner_task.go +++ b/models/planner_task.go @@ -60,6 +60,17 @@ func (m *PlannerTask) GetAppliedCategories()(PlannerAppliedCategoriesable) { } return nil } +// GetArchivalInfo gets the archivalInfo property value. The archivalInfo property +func (m *PlannerTask) GetArchivalInfo()(PlannerArchivalInfoable) { + val, err := m.GetBackingStore().Get("archivalInfo") + if err != nil { + panic(err) + } + if val != nil { + return val.(PlannerArchivalInfoable) + } + return nil +} // GetAssignedToTaskBoardFormat gets the assignedToTaskBoardFormat property value. Read-only. Nullable. Used to render the task correctly in the task board view when grouped by assignedTo. func (m *PlannerTask) GetAssignedToTaskBoardFormat()(PlannerAssignedToTaskBoardTaskFormatable) { val, err := m.GetBackingStore().Get("assignedToTaskBoardFormat") @@ -237,6 +248,16 @@ func (m *PlannerTask) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26 } return nil } + res["archivalInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePlannerArchivalInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetArchivalInfo(val.(PlannerArchivalInfoable)) + } + return nil + } res["assignedToTaskBoardFormat"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(CreatePlannerAssignedToTaskBoardTaskFormatFromDiscriminatorValue) if err != nil { @@ -387,6 +408,36 @@ func (m *PlannerTask) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26 } return nil } + res["isArchived"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsArchived(val) + } + return nil + } + res["isOnMyDay"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsOnMyDay(val) + } + return nil + } + res["isOnMyDayLastModifiedDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetIsOnMyDayLastModifiedDate(val) + } + return nil + } res["orderHint"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -510,6 +561,39 @@ func (m *PlannerTask) GetHasDescription()(*bool) { } return nil } +// GetIsArchived gets the isArchived property value. The isArchived property +func (m *PlannerTask) GetIsArchived()(*bool) { + val, err := m.GetBackingStore().Get("isArchived") + if err != nil { + panic(err) + } + if val != nil { + return val.(*bool) + } + return nil +} +// GetIsOnMyDay gets the isOnMyDay property value. The isOnMyDay property +func (m *PlannerTask) GetIsOnMyDay()(*bool) { + val, err := m.GetBackingStore().Get("isOnMyDay") + if err != nil { + panic(err) + } + if val != nil { + return val.(*bool) + } + return nil +} +// GetIsOnMyDayLastModifiedDate gets the isOnMyDayLastModifiedDate property value. The isOnMyDayLastModifiedDate property +func (m *PlannerTask) GetIsOnMyDayLastModifiedDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + val, err := m.GetBackingStore().Get("isOnMyDayLastModifiedDate") + if err != nil { + panic(err) + } + if val != nil { + return val.(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + } + return nil +} // GetOrderHint gets the orderHint property value. Hint used to order items of this type in a list view. The format is defined as outlined here. func (m *PlannerTask) GetOrderHint()(*string) { val, err := m.GetBackingStore().Get("orderHint") @@ -649,6 +733,12 @@ func (m *PlannerTask) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6 return err } } + { + err = writer.WriteObjectValue("archivalInfo", m.GetArchivalInfo()) + if err != nil { + return err + } + } { err = writer.WriteObjectValue("assignedToTaskBoardFormat", m.GetAssignedToTaskBoardFormat()) if err != nil { @@ -739,6 +829,24 @@ func (m *PlannerTask) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6 return err } } + { + err = writer.WriteBoolValue("isArchived", m.GetIsArchived()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isOnMyDay", m.GetIsOnMyDay()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("isOnMyDayLastModifiedDate", m.GetIsOnMyDayLastModifiedDate()) + if err != nil { + return err + } + } { err = writer.WriteStringValue("orderHint", m.GetOrderHint()) if err != nil { @@ -823,6 +931,13 @@ func (m *PlannerTask) SetAppliedCategories(value PlannerAppliedCategoriesable)() panic(err) } } +// SetArchivalInfo sets the archivalInfo property value. The archivalInfo property +func (m *PlannerTask) SetArchivalInfo(value PlannerArchivalInfoable)() { + err := m.GetBackingStore().Set("archivalInfo", value) + if err != nil { + panic(err) + } +} // SetAssignedToTaskBoardFormat sets the assignedToTaskBoardFormat property value. Read-only. Nullable. Used to render the task correctly in the task board view when grouped by assignedTo. func (m *PlannerTask) SetAssignedToTaskBoardFormat(value PlannerAssignedToTaskBoardTaskFormatable)() { err := m.GetBackingStore().Set("assignedToTaskBoardFormat", value) @@ -928,6 +1043,27 @@ func (m *PlannerTask) SetHasDescription(value *bool)() { panic(err) } } +// SetIsArchived sets the isArchived property value. The isArchived property +func (m *PlannerTask) SetIsArchived(value *bool)() { + err := m.GetBackingStore().Set("isArchived", value) + if err != nil { + panic(err) + } +} +// SetIsOnMyDay sets the isOnMyDay property value. The isOnMyDay property +func (m *PlannerTask) SetIsOnMyDay(value *bool)() { + err := m.GetBackingStore().Set("isOnMyDay", value) + if err != nil { + panic(err) + } +} +// SetIsOnMyDayLastModifiedDate sets the isOnMyDayLastModifiedDate property value. The isOnMyDayLastModifiedDate property +func (m *PlannerTask) SetIsOnMyDayLastModifiedDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + err := m.GetBackingStore().Set("isOnMyDayLastModifiedDate", value) + if err != nil { + panic(err) + } +} // SetOrderHint sets the orderHint property value. Hint used to order items of this type in a list view. The format is defined as outlined here. func (m *PlannerTask) SetOrderHint(value *string)() { err := m.GetBackingStore().Set("orderHint", value) @@ -1011,6 +1147,7 @@ type PlannerTaskable interface { PlannerDeltaable GetActiveChecklistItemCount()(*int32) GetAppliedCategories()(PlannerAppliedCategoriesable) + GetArchivalInfo()(PlannerArchivalInfoable) GetAssignedToTaskBoardFormat()(PlannerAssignedToTaskBoardTaskFormatable) GetAssigneePriority()(*string) GetAssignments()(PlannerAssignmentsable) @@ -1026,6 +1163,9 @@ type PlannerTaskable interface { GetDetails()(PlannerTaskDetailsable) GetDueDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) GetHasDescription()(*bool) + GetIsArchived()(*bool) + GetIsOnMyDay()(*bool) + GetIsOnMyDayLastModifiedDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) GetOrderHint()(*string) GetPercentComplete()(*int32) GetPlanId()(*string) @@ -1039,6 +1179,7 @@ type PlannerTaskable interface { GetTitle()(*string) SetActiveChecklistItemCount(value *int32)() SetAppliedCategories(value PlannerAppliedCategoriesable)() + SetArchivalInfo(value PlannerArchivalInfoable)() SetAssignedToTaskBoardFormat(value PlannerAssignedToTaskBoardTaskFormatable)() SetAssigneePriority(value *string)() SetAssignments(value PlannerAssignmentsable)() @@ -1054,6 +1195,9 @@ type PlannerTaskable interface { SetDetails(value PlannerTaskDetailsable)() SetDueDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() SetHasDescription(value *bool)() + SetIsArchived(value *bool)() + SetIsOnMyDay(value *bool)() + SetIsOnMyDayLastModifiedDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() SetOrderHint(value *string)() SetPercentComplete(value *int32)() SetPlanId(value *string)() diff --git a/models/planner_task_completion_requirement_details.go b/models/planner_task_completion_requirement_details.go index 964a9c282c2..14a339cc8bd 100644 --- a/models/planner_task_completion_requirement_details.go +++ b/models/planner_task_completion_requirement_details.go @@ -34,6 +34,17 @@ func (m *PlannerTaskCompletionRequirementDetails) GetAdditionalData()(map[string } return val.(map[string]any) } +// GetApprovalRequirement gets the approvalRequirement property value. The approvalRequirement property +func (m *PlannerTaskCompletionRequirementDetails) GetApprovalRequirement()(PlannerApprovalRequirementable) { + val, err := m.GetBackingStore().Get("approvalRequirement") + if err != nil { + panic(err) + } + if val != nil { + return val.(PlannerApprovalRequirementable) + } + return nil +} // GetBackingStore gets the BackingStore property value. Stores model information. func (m *PlannerTaskCompletionRequirementDetails) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { return m.backingStore @@ -52,6 +63,16 @@ func (m *PlannerTaskCompletionRequirementDetails) GetChecklistRequirement()(Plan // GetFieldDeserializers the deserialization information for the current model func (m *PlannerTaskCompletionRequirementDetails) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["approvalRequirement"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePlannerApprovalRequirementFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetApprovalRequirement(val.(PlannerApprovalRequirementable)) + } + return nil + } res["checklistRequirement"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(CreatePlannerChecklistRequirementFromDiscriminatorValue) if err != nil { @@ -62,6 +83,16 @@ func (m *PlannerTaskCompletionRequirementDetails) GetFieldDeserializers()(map[st } return nil } + res["formsRequirement"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePlannerFormsRequirementFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetFormsRequirement(val.(PlannerFormsRequirementable)) + } + return nil + } res["@odata.type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -74,6 +105,17 @@ func (m *PlannerTaskCompletionRequirementDetails) GetFieldDeserializers()(map[st } return res } +// GetFormsRequirement gets the formsRequirement property value. The formsRequirement property +func (m *PlannerTaskCompletionRequirementDetails) GetFormsRequirement()(PlannerFormsRequirementable) { + val, err := m.GetBackingStore().Get("formsRequirement") + if err != nil { + panic(err) + } + if val != nil { + return val.(PlannerFormsRequirementable) + } + return nil +} // GetOdataType gets the @odata.type property value. The OdataType property func (m *PlannerTaskCompletionRequirementDetails) GetOdataType()(*string) { val, err := m.GetBackingStore().Get("odataType") @@ -87,12 +129,24 @@ func (m *PlannerTaskCompletionRequirementDetails) GetOdataType()(*string) { } // Serialize serializes information the current object func (m *PlannerTaskCompletionRequirementDetails) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("approvalRequirement", m.GetApprovalRequirement()) + if err != nil { + return err + } + } { err := writer.WriteObjectValue("checklistRequirement", m.GetChecklistRequirement()) if err != nil { return err } } + { + err := writer.WriteObjectValue("formsRequirement", m.GetFormsRequirement()) + if err != nil { + return err + } + } { err := writer.WriteStringValue("@odata.type", m.GetOdataType()) if err != nil { @@ -114,6 +168,13 @@ func (m *PlannerTaskCompletionRequirementDetails) SetAdditionalData(value map[st panic(err) } } +// SetApprovalRequirement sets the approvalRequirement property value. The approvalRequirement property +func (m *PlannerTaskCompletionRequirementDetails) SetApprovalRequirement(value PlannerApprovalRequirementable)() { + err := m.GetBackingStore().Set("approvalRequirement", value) + if err != nil { + panic(err) + } +} // SetBackingStore sets the BackingStore property value. Stores model information. func (m *PlannerTaskCompletionRequirementDetails) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { m.backingStore = value @@ -125,6 +186,13 @@ func (m *PlannerTaskCompletionRequirementDetails) SetChecklistRequirement(value panic(err) } } +// SetFormsRequirement sets the formsRequirement property value. The formsRequirement property +func (m *PlannerTaskCompletionRequirementDetails) SetFormsRequirement(value PlannerFormsRequirementable)() { + err := m.GetBackingStore().Set("formsRequirement", value) + if err != nil { + panic(err) + } +} // SetOdataType sets the @odata.type property value. The OdataType property func (m *PlannerTaskCompletionRequirementDetails) SetOdataType(value *string)() { err := m.GetBackingStore().Set("odataType", value) @@ -137,10 +205,14 @@ type PlannerTaskCompletionRequirementDetailsable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApprovalRequirement()(PlannerApprovalRequirementable) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) GetChecklistRequirement()(PlannerChecklistRequirementable) + GetFormsRequirement()(PlannerFormsRequirementable) GetOdataType()(*string) + SetApprovalRequirement(value PlannerApprovalRequirementable)() SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() SetChecklistRequirement(value PlannerChecklistRequirementable)() + SetFormsRequirement(value PlannerFormsRequirementable)() SetOdataType(value *string)() } diff --git a/models/planner_task_completion_requirements.go b/models/planner_task_completion_requirements.go index 3fa4c8a953f..1852831a721 100644 --- a/models/planner_task_completion_requirements.go +++ b/models/planner_task_completion_requirements.go @@ -10,13 +10,15 @@ const ( NONE_PLANNERTASKCOMPLETIONREQUIREMENTS PlannerTaskCompletionRequirements = iota CHECKLISTCOMPLETION_PLANNERTASKCOMPLETIONREQUIREMENTS UNKNOWNFUTUREVALUE_PLANNERTASKCOMPLETIONREQUIREMENTS + FORMCOMPLETION_PLANNERTASKCOMPLETIONREQUIREMENTS + APPROVALCOMPLETION_PLANNERTASKCOMPLETIONREQUIREMENTS ) func (i PlannerTaskCompletionRequirements) String() string { var values []string - for p := PlannerTaskCompletionRequirements(1); p <= UNKNOWNFUTUREVALUE_PLANNERTASKCOMPLETIONREQUIREMENTS; p <<= 1 { + for p := PlannerTaskCompletionRequirements(1); p <= APPROVALCOMPLETION_PLANNERTASKCOMPLETIONREQUIREMENTS; p <<= 1 { if i&p == p { - values = append(values, []string{"none", "checklistCompletion", "unknownFutureValue"}[p]) + values = append(values, []string{"none", "checklistCompletion", "unknownFutureValue", "formCompletion", "approvalCompletion"}[p]) } } return strings.Join(values, ",") @@ -32,6 +34,10 @@ func ParsePlannerTaskCompletionRequirements(v string) (any, error) { result |= CHECKLISTCOMPLETION_PLANNERTASKCOMPLETIONREQUIREMENTS case "unknownFutureValue": result |= UNKNOWNFUTUREVALUE_PLANNERTASKCOMPLETIONREQUIREMENTS + case "formCompletion": + result |= FORMCOMPLETION_PLANNERTASKCOMPLETIONREQUIREMENTS + case "approvalCompletion": + result |= APPROVALCOMPLETION_PLANNERTASKCOMPLETIONREQUIREMENTS default: return 0, errors.New("Unknown PlannerTaskCompletionRequirements value: " + v) } diff --git a/models/planner_task_details.go b/models/planner_task_details.go index 7215a1e490d..ffc1f108d77 100644 --- a/models/planner_task_details.go +++ b/models/planner_task_details.go @@ -19,6 +19,17 @@ func NewPlannerTaskDetails()(*PlannerTaskDetails) { func CreatePlannerTaskDetailsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewPlannerTaskDetails(), nil } +// GetApprovalAttachment gets the approvalAttachment property value. The approvalAttachment property +func (m *PlannerTaskDetails) GetApprovalAttachment()(PlannerBaseApprovalAttachmentable) { + val, err := m.GetBackingStore().Get("approvalAttachment") + if err != nil { + panic(err) + } + if val != nil { + return val.(PlannerBaseApprovalAttachmentable) + } + return nil +} // GetChecklist gets the checklist property value. The collection of checklist items on the task. func (m *PlannerTaskDetails) GetChecklist()(PlannerChecklistItemsable) { val, err := m.GetBackingStore().Get("checklist") @@ -55,6 +66,16 @@ func (m *PlannerTaskDetails) GetDescription()(*string) { // GetFieldDeserializers the deserialization information for the current model func (m *PlannerTaskDetails) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := m.PlannerDelta.GetFieldDeserializers() + res["approvalAttachment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePlannerBaseApprovalAttachmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetApprovalAttachment(val.(PlannerBaseApprovalAttachmentable)) + } + return nil + } res["checklist"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(CreatePlannerChecklistItemsFromDiscriminatorValue) if err != nil { @@ -85,6 +106,16 @@ func (m *PlannerTaskDetails) GetFieldDeserializers()(map[string]func(i878a80d233 } return nil } + res["forms"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePlannerFormsDictionaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetForms(val.(PlannerFormsDictionaryable)) + } + return nil + } res["notes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(CreateItemBodyFromDiscriminatorValue) if err != nil { @@ -117,6 +148,17 @@ func (m *PlannerTaskDetails) GetFieldDeserializers()(map[string]func(i878a80d233 } return res } +// GetForms gets the forms property value. The forms property +func (m *PlannerTaskDetails) GetForms()(PlannerFormsDictionaryable) { + val, err := m.GetBackingStore().Get("forms") + if err != nil { + panic(err) + } + if val != nil { + return val.(PlannerFormsDictionaryable) + } + return nil +} // GetNotes gets the notes property value. Rich text description of the task. To be used by HTML-aware clients. For backwards compatibility, a plain-text version of the HTML description will be synced to the 'description' field. If this field hasn't previously been set but 'description' has been, the existing description is synchronized to 'notes' with minimal whitespace-preserving HTML markup. Setting both 'description' and 'notes' is an error and will result in an exception. func (m *PlannerTaskDetails) GetNotes()(ItemBodyable) { val, err := m.GetBackingStore().Get("notes") @@ -156,6 +198,12 @@ func (m *PlannerTaskDetails) Serialize(writer i878a80d2330e89d26896388a3f487eef2 if err != nil { return err } + { + err = writer.WriteObjectValue("approvalAttachment", m.GetApprovalAttachment()) + if err != nil { + return err + } + } { err = writer.WriteObjectValue("checklist", m.GetChecklist()) if err != nil { @@ -174,6 +222,12 @@ func (m *PlannerTaskDetails) Serialize(writer i878a80d2330e89d26896388a3f487eef2 return err } } + { + err = writer.WriteObjectValue("forms", m.GetForms()) + if err != nil { + return err + } + } { err = writer.WriteObjectValue("notes", m.GetNotes()) if err != nil { @@ -195,6 +249,13 @@ func (m *PlannerTaskDetails) Serialize(writer i878a80d2330e89d26896388a3f487eef2 } return nil } +// SetApprovalAttachment sets the approvalAttachment property value. The approvalAttachment property +func (m *PlannerTaskDetails) SetApprovalAttachment(value PlannerBaseApprovalAttachmentable)() { + err := m.GetBackingStore().Set("approvalAttachment", value) + if err != nil { + panic(err) + } +} // SetChecklist sets the checklist property value. The collection of checklist items on the task. func (m *PlannerTaskDetails) SetChecklist(value PlannerChecklistItemsable)() { err := m.GetBackingStore().Set("checklist", value) @@ -216,6 +277,13 @@ func (m *PlannerTaskDetails) SetDescription(value *string)() { panic(err) } } +// SetForms sets the forms property value. The forms property +func (m *PlannerTaskDetails) SetForms(value PlannerFormsDictionaryable)() { + err := m.GetBackingStore().Set("forms", value) + if err != nil { + panic(err) + } +} // SetNotes sets the notes property value. Rich text description of the task. To be used by HTML-aware clients. For backwards compatibility, a plain-text version of the HTML description will be synced to the 'description' field. If this field hasn't previously been set but 'description' has been, the existing description is synchronized to 'notes' with minimal whitespace-preserving HTML markup. Setting both 'description' and 'notes' is an error and will result in an exception. func (m *PlannerTaskDetails) SetNotes(value ItemBodyable)() { err := m.GetBackingStore().Set("notes", value) @@ -241,15 +309,19 @@ func (m *PlannerTaskDetails) SetReferences(value PlannerExternalReferencesable)( type PlannerTaskDetailsable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable PlannerDeltaable + GetApprovalAttachment()(PlannerBaseApprovalAttachmentable) GetChecklist()(PlannerChecklistItemsable) GetCompletionRequirements()(PlannerTaskCompletionRequirementDetailsable) GetDescription()(*string) + GetForms()(PlannerFormsDictionaryable) GetNotes()(ItemBodyable) GetPreviewType()(*PlannerPreviewType) GetReferences()(PlannerExternalReferencesable) + SetApprovalAttachment(value PlannerBaseApprovalAttachmentable)() SetChecklist(value PlannerChecklistItemsable)() SetCompletionRequirements(value PlannerTaskCompletionRequirementDetailsable)() SetDescription(value *string)() + SetForms(value PlannerFormsDictionaryable)() SetNotes(value ItemBodyable)() SetPreviewType(value *PlannerPreviewType)() SetReferences(value PlannerExternalReferencesable)() diff --git a/models/planner_task_property_rule.go b/models/planner_task_property_rule.go index 7b608a08b72..36d3e01188c 100644 --- a/models/planner_task_property_rule.go +++ b/models/planner_task_property_rule.go @@ -32,6 +32,17 @@ func (m *PlannerTaskPropertyRule) GetAppliedCategories()(PlannerFieldRulesable) } return nil } +// GetApprovalAttachment gets the approvalAttachment property value. The approvalAttachment property +func (m *PlannerTaskPropertyRule) GetApprovalAttachment()(PlannerFieldRulesable) { + val, err := m.GetBackingStore().Get("approvalAttachment") + if err != nil { + panic(err) + } + if val != nil { + return val.(PlannerFieldRulesable) + } + return nil +} // GetAssignments gets the assignments property value. Rules and restrictions for assignments. Allowed overrides are userCreated and applicationCreated. Accepted values for the default rule and individual overrides are allow, add, addSelf, addOther, remove, removeSelf, removeOther, block. func (m *PlannerTaskPropertyRule) GetAssignments()(PlannerFieldRulesable) { val, err := m.GetBackingStore().Get("assignments") @@ -100,6 +111,16 @@ func (m *PlannerTaskPropertyRule) GetFieldDeserializers()(map[string]func(i878a8 } return nil } + res["approvalAttachment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePlannerFieldRulesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetApprovalAttachment(val.(PlannerFieldRulesable)) + } + return nil + } res["assignments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(CreatePlannerFieldRulesFromDiscriminatorValue) if err != nil { @@ -168,6 +189,16 @@ func (m *PlannerTaskPropertyRule) GetFieldDeserializers()(map[string]func(i878a8 } return nil } + res["forms"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePlannerFieldRulesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetForms(val.(PlannerFieldRulesable)) + } + return nil + } res["move"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetCollectionOfPrimitiveValues("string") if err != nil { @@ -308,6 +339,17 @@ func (m *PlannerTaskPropertyRule) GetFieldDeserializers()(map[string]func(i878a8 } return res } +// GetForms gets the forms property value. The forms property +func (m *PlannerTaskPropertyRule) GetForms()(PlannerFieldRulesable) { + val, err := m.GetBackingStore().Get("forms") + if err != nil { + panic(err) + } + if val != nil { + return val.(PlannerFieldRulesable) + } + return nil +} // GetMove gets the move property value. Rules and restrictions for moving the task between buckets or plans. Accepted values are allow, moveBetweenPlans, moveBetweenBuckets, and block. func (m *PlannerTaskPropertyRule) GetMove()([]string) { val, err := m.GetBackingStore().Get("move") @@ -419,6 +461,12 @@ func (m *PlannerTaskPropertyRule) Serialize(writer i878a80d2330e89d26896388a3f48 return err } } + { + err = writer.WriteObjectValue("approvalAttachment", m.GetApprovalAttachment()) + if err != nil { + return err + } + } { err = writer.WriteObjectValue("assignments", m.GetAssignments()) if err != nil { @@ -449,6 +497,12 @@ func (m *PlannerTaskPropertyRule) Serialize(writer i878a80d2330e89d26896388a3f48 return err } } + { + err = writer.WriteObjectValue("forms", m.GetForms()) + if err != nil { + return err + } + } if m.GetMove() != nil { err = writer.WriteCollectionOfStringValues("move", m.GetMove()) if err != nil { @@ -512,6 +566,13 @@ func (m *PlannerTaskPropertyRule) SetAppliedCategories(value PlannerFieldRulesab panic(err) } } +// SetApprovalAttachment sets the approvalAttachment property value. The approvalAttachment property +func (m *PlannerTaskPropertyRule) SetApprovalAttachment(value PlannerFieldRulesable)() { + err := m.GetBackingStore().Set("approvalAttachment", value) + if err != nil { + panic(err) + } +} // SetAssignments sets the assignments property value. Rules and restrictions for assignments. Allowed overrides are userCreated and applicationCreated. Accepted values for the default rule and individual overrides are allow, add, addSelf, addOther, remove, removeSelf, removeOther, block. func (m *PlannerTaskPropertyRule) SetAssignments(value PlannerFieldRulesable)() { err := m.GetBackingStore().Set("assignments", value) @@ -547,6 +608,13 @@ func (m *PlannerTaskPropertyRule) SetDueDate(value []string)() { panic(err) } } +// SetForms sets the forms property value. The forms property +func (m *PlannerTaskPropertyRule) SetForms(value PlannerFieldRulesable)() { + err := m.GetBackingStore().Set("forms", value) + if err != nil { + panic(err) + } +} // SetMove sets the move property value. Rules and restrictions for moving the task between buckets or plans. Accepted values are allow, moveBetweenPlans, moveBetweenBuckets, and block. func (m *PlannerTaskPropertyRule) SetMove(value []string)() { err := m.GetBackingStore().Set("move", value) @@ -615,11 +683,13 @@ type PlannerTaskPropertyRuleable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable PlannerPropertyRuleable GetAppliedCategories()(PlannerFieldRulesable) + GetApprovalAttachment()(PlannerFieldRulesable) GetAssignments()(PlannerFieldRulesable) GetCheckLists()(PlannerFieldRulesable) GetCompletionRequirements()([]string) GetDelete()([]string) GetDueDate()([]string) + GetForms()(PlannerFieldRulesable) GetMove()([]string) GetNotes()([]string) GetOrder()([]string) @@ -630,11 +700,13 @@ type PlannerTaskPropertyRuleable interface { GetStartDate()([]string) GetTitle()([]string) SetAppliedCategories(value PlannerFieldRulesable)() + SetApprovalAttachment(value PlannerFieldRulesable)() SetAssignments(value PlannerFieldRulesable)() SetCheckLists(value PlannerFieldRulesable)() SetCompletionRequirements(value []string)() SetDelete(value []string)() SetDueDate(value []string)() + SetForms(value PlannerFieldRulesable)() SetMove(value []string)() SetNotes(value []string)() SetOrder(value []string)() diff --git a/models/publication_facet.go b/models/publication_facet.go index d349cc1485a..a69140d32a1 100644 --- a/models/publication_facet.go +++ b/models/publication_facet.go @@ -38,7 +38,7 @@ func (m *PublicationFacet) GetAdditionalData()(map[string]any) { func (m *PublicationFacet) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { return m.backingStore } -// GetCheckedOutBy gets the checkedOutBy property value. User who has checked out the file. +// GetCheckedOutBy gets the checkedOutBy property value. The user who checked out the file. func (m *PublicationFacet) GetCheckedOutBy()(IdentitySetable) { val, err := m.GetBackingStore().Get("checkedOutBy") if err != nil { @@ -172,7 +172,7 @@ func (m *PublicationFacet) SetAdditionalData(value map[string]any)() { func (m *PublicationFacet) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { m.backingStore = value } -// SetCheckedOutBy sets the checkedOutBy property value. User who has checked out the file. +// SetCheckedOutBy sets the checkedOutBy property value. The user who checked out the file. func (m *PublicationFacet) SetCheckedOutBy(value IdentitySetable)() { err := m.GetBackingStore().Set("checkedOutBy", value) if err != nil { diff --git a/models/shift.go b/models/shift.go index 1940e0cf36c..10764863467 100644 --- a/models/shift.go +++ b/models/shift.go @@ -21,7 +21,7 @@ func NewShift()(*Shift) { func CreateShiftFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewShift(), nil } -// GetDraftShift gets the draftShift property value. The draft version of this shift that is viewable by managers. Required. +// GetDraftShift gets the draftShift property value. Draft changes in the shift are only visible to managers until they are shared. func (m *Shift) GetDraftShift()(ShiftItemable) { val, err := m.GetBackingStore().Get("draftShift") if err != nil { @@ -87,7 +87,7 @@ func (m *Shift) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388 } return res } -// GetIsStagedForDeletion gets the isStagedForDeletion property value. The isStagedForDeletion property +// GetIsStagedForDeletion gets the isStagedForDeletion property value. The shift is marked for deletion, a process that is finalized when the schedule is shared. func (m *Shift) GetIsStagedForDeletion()(*bool) { val, err := m.GetBackingStore().Get("isStagedForDeletion") if err != nil { @@ -109,7 +109,7 @@ func (m *Shift) GetSchedulingGroupId()(*string) { } return nil } -// GetSharedShift gets the sharedShift property value. The shared version of this shift that is viewable by both employees and managers. Required. +// GetSharedShift gets the sharedShift property value. The shared version of this shift that is viewable by both employees and managers. func (m *Shift) GetSharedShift()(ShiftItemable) { val, err := m.GetBackingStore().Get("sharedShift") if err != nil { @@ -169,14 +169,14 @@ func (m *Shift) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c4 } return nil } -// SetDraftShift sets the draftShift property value. The draft version of this shift that is viewable by managers. Required. +// SetDraftShift sets the draftShift property value. Draft changes in the shift are only visible to managers until they are shared. func (m *Shift) SetDraftShift(value ShiftItemable)() { err := m.GetBackingStore().Set("draftShift", value) if err != nil { panic(err) } } -// SetIsStagedForDeletion sets the isStagedForDeletion property value. The isStagedForDeletion property +// SetIsStagedForDeletion sets the isStagedForDeletion property value. The shift is marked for deletion, a process that is finalized when the schedule is shared. func (m *Shift) SetIsStagedForDeletion(value *bool)() { err := m.GetBackingStore().Set("isStagedForDeletion", value) if err != nil { @@ -190,7 +190,7 @@ func (m *Shift) SetSchedulingGroupId(value *string)() { panic(err) } } -// SetSharedShift sets the sharedShift property value. The shared version of this shift that is viewable by both employees and managers. Required. +// SetSharedShift sets the sharedShift property value. The shared version of this shift that is viewable by both employees and managers. func (m *Shift) SetSharedShift(value ShiftItemable)() { err := m.GetBackingStore().Set("sharedShift", value) if err != nil { diff --git a/models/solutions_root.go b/models/solutions_root.go index f3385ca0592..ca326d0fdea 100644 --- a/models/solutions_root.go +++ b/models/solutions_root.go @@ -38,6 +38,28 @@ func (m *SolutionsRoot) GetAdditionalData()(map[string]any) { func (m *SolutionsRoot) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { return m.backingStore } +// GetBookingBusinesses gets the bookingBusinesses property value. The bookingBusinesses property +func (m *SolutionsRoot) GetBookingBusinesses()([]BookingBusinessable) { + val, err := m.GetBackingStore().Get("bookingBusinesses") + if err != nil { + panic(err) + } + if val != nil { + return val.([]BookingBusinessable) + } + return nil +} +// GetBookingCurrencies gets the bookingCurrencies property value. The bookingCurrencies property +func (m *SolutionsRoot) GetBookingCurrencies()([]BookingCurrencyable) { + val, err := m.GetBackingStore().Get("bookingCurrencies") + if err != nil { + panic(err) + } + if val != nil { + return val.([]BookingCurrencyable) + } + return nil +} // GetBusinessScenarios gets the businessScenarios property value. The businessScenarios property func (m *SolutionsRoot) GetBusinessScenarios()([]BusinessScenarioable) { val, err := m.GetBackingStore().Get("businessScenarios") @@ -52,6 +74,38 @@ func (m *SolutionsRoot) GetBusinessScenarios()([]BusinessScenarioable) { // GetFieldDeserializers the deserialization information for the current model func (m *SolutionsRoot) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["bookingBusinesses"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateBookingBusinessFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]BookingBusinessable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(BookingBusinessable) + } + } + m.SetBookingBusinesses(res) + } + return nil + } + res["bookingCurrencies"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateBookingCurrencyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]BookingCurrencyable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(BookingCurrencyable) + } + } + m.SetBookingCurrencies(res) + } + return nil + } res["businessScenarios"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetCollectionOfObjectValues(CreateBusinessScenarioFromDiscriminatorValue) if err != nil { @@ -114,6 +168,30 @@ func (m *SolutionsRoot) GetVirtualEvents()(VirtualEventsRootable) { } // Serialize serializes information the current object func (m *SolutionsRoot) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetBookingBusinesses() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetBookingBusinesses())) + for i, v := range m.GetBookingBusinesses() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("bookingBusinesses", cast) + if err != nil { + return err + } + } + if m.GetBookingCurrencies() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetBookingCurrencies())) + for i, v := range m.GetBookingCurrencies() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("bookingCurrencies", cast) + if err != nil { + return err + } + } if m.GetBusinessScenarios() != nil { cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetBusinessScenarios())) for i, v := range m.GetBusinessScenarios() { @@ -157,6 +235,20 @@ func (m *SolutionsRoot) SetAdditionalData(value map[string]any)() { func (m *SolutionsRoot) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { m.backingStore = value } +// SetBookingBusinesses sets the bookingBusinesses property value. The bookingBusinesses property +func (m *SolutionsRoot) SetBookingBusinesses(value []BookingBusinessable)() { + err := m.GetBackingStore().Set("bookingBusinesses", value) + if err != nil { + panic(err) + } +} +// SetBookingCurrencies sets the bookingCurrencies property value. The bookingCurrencies property +func (m *SolutionsRoot) SetBookingCurrencies(value []BookingCurrencyable)() { + err := m.GetBackingStore().Set("bookingCurrencies", value) + if err != nil { + panic(err) + } +} // SetBusinessScenarios sets the businessScenarios property value. The businessScenarios property func (m *SolutionsRoot) SetBusinessScenarios(value []BusinessScenarioable)() { err := m.GetBackingStore().Set("businessScenarios", value) @@ -184,10 +276,14 @@ type SolutionsRootable interface { ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetBookingBusinesses()([]BookingBusinessable) + GetBookingCurrencies()([]BookingCurrencyable) GetBusinessScenarios()([]BusinessScenarioable) GetOdataType()(*string) GetVirtualEvents()(VirtualEventsRootable) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetBookingBusinesses(value []BookingBusinessable)() + SetBookingCurrencies(value []BookingCurrencyable)() SetBusinessScenarios(value []BusinessScenarioable)() SetOdataType(value *string)() SetVirtualEvents(value VirtualEventsRootable)() diff --git a/models/teams_async_operation_type.go b/models/teams_async_operation_type.go index c5e80a84756..20bb1d90a6b 100644 --- a/models/teams_async_operation_type.go +++ b/models/teams_async_operation_type.go @@ -15,10 +15,12 @@ const ( TEAMIFYGROUP_TEAMSASYNCOPERATIONTYPE CREATECHANNEL_TEAMSASYNCOPERATIONTYPE CREATECHAT_TEAMSASYNCOPERATIONTYPE + ARCHIVECHANNEL_TEAMSASYNCOPERATIONTYPE + UNARCHIVECHANNEL_TEAMSASYNCOPERATIONTYPE ) func (i TeamsAsyncOperationType) String() string { - return []string{"invalid", "cloneTeam", "archiveTeam", "unarchiveTeam", "createTeam", "unknownFutureValue", "teamifyGroup", "createChannel", "createChat"}[i] + return []string{"invalid", "cloneTeam", "archiveTeam", "unarchiveTeam", "createTeam", "unknownFutureValue", "teamifyGroup", "createChannel", "createChat", "archiveChannel", "unarchiveChannel"}[i] } func ParseTeamsAsyncOperationType(v string) (any, error) { result := INVALID_TEAMSASYNCOPERATIONTYPE @@ -41,6 +43,10 @@ func ParseTeamsAsyncOperationType(v string) (any, error) { result = CREATECHANNEL_TEAMSASYNCOPERATIONTYPE case "createChat": result = CREATECHAT_TEAMSASYNCOPERATIONTYPE + case "archiveChannel": + result = ARCHIVECHANNEL_TEAMSASYNCOPERATIONTYPE + case "unarchiveChannel": + result = UNARCHIVECHANNEL_TEAMSASYNCOPERATIONTYPE default: return 0, errors.New("Unknown TeamsAsyncOperationType value: " + v) } diff --git a/models/teams_licensing_details.go b/models/teams_licensing_details.go new file mode 100644 index 00000000000..a6157839e70 --- /dev/null +++ b/models/teams_licensing_details.go @@ -0,0 +1,75 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// TeamsLicensingDetails +type TeamsLicensingDetails struct { + Entity +} +// NewTeamsLicensingDetails instantiates a new teamsLicensingDetails and sets the default values. +func NewTeamsLicensingDetails()(*TeamsLicensingDetails) { + m := &TeamsLicensingDetails{ + Entity: *NewEntity(), + } + return m +} +// CreateTeamsLicensingDetailsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateTeamsLicensingDetailsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTeamsLicensingDetails(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *TeamsLicensingDetails) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["hasTeamsLicense"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasTeamsLicense(val) + } + return nil + } + return res +} +// GetHasTeamsLicense gets the hasTeamsLicense property value. Indicates whether the user has a valid license to use Microsoft Teams. +func (m *TeamsLicensingDetails) GetHasTeamsLicense()(*bool) { + val, err := m.GetBackingStore().Get("hasTeamsLicense") + if err != nil { + panic(err) + } + if val != nil { + return val.(*bool) + } + return nil +} +// Serialize serializes information the current object +func (m *TeamsLicensingDetails) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("hasTeamsLicense", m.GetHasTeamsLicense()) + if err != nil { + return err + } + } + return nil +} +// SetHasTeamsLicense sets the hasTeamsLicense property value. Indicates whether the user has a valid license to use Microsoft Teams. +func (m *TeamsLicensingDetails) SetHasTeamsLicense(value *bool)() { + err := m.GetBackingStore().Set("hasTeamsLicense", value) + if err != nil { + panic(err) + } +} +// TeamsLicensingDetailsable +type TeamsLicensingDetailsable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetHasTeamsLicense()(*bool) + SetHasTeamsLicense(value *bool)() +} diff --git a/models/teamwork.go b/models/teamwork.go index d071fc07a12..c32109e5ce9 100644 --- a/models/teamwork.go +++ b/models/teamwork.go @@ -103,6 +103,26 @@ func (m *Teamwork) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896 } return nil } + res["isTeamsEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsTeamsEnabled(val) + } + return nil + } + res["region"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRegion(val) + } + return nil + } res["teamsAppSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(CreateTeamsAppSettingsFromDiscriminatorValue) if err != nil { @@ -147,6 +167,28 @@ func (m *Teamwork) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896 } return res } +// GetIsTeamsEnabled gets the isTeamsEnabled property value. Indicates whether Microsoft Teams is enabled for the organization. +func (m *Teamwork) GetIsTeamsEnabled()(*bool) { + val, err := m.GetBackingStore().Get("isTeamsEnabled") + if err != nil { + panic(err) + } + if val != nil { + return val.(*bool) + } + return nil +} +// GetRegion gets the region property value. Represents the region of the organization. +func (m *Teamwork) GetRegion()(*string) { + val, err := m.GetBackingStore().Get("region") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} // GetTeamsAppSettings gets the teamsAppSettings property value. Represents tenant-wide settings for all Teams apps in the tenant. func (m *Teamwork) GetTeamsAppSettings()(TeamsAppSettingsable) { val, err := m.GetBackingStore().Get("teamsAppSettings") @@ -222,6 +264,18 @@ func (m *Teamwork) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c01 return err } } + { + err = writer.WriteBoolValue("isTeamsEnabled", m.GetIsTeamsEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("region", m.GetRegion()) + if err != nil { + return err + } + } { err = writer.WriteObjectValue("teamsAppSettings", m.GetTeamsAppSettings()) if err != nil { @@ -275,6 +329,20 @@ func (m *Teamwork) SetDevices(value []TeamworkDeviceable)() { panic(err) } } +// SetIsTeamsEnabled sets the isTeamsEnabled property value. Indicates whether Microsoft Teams is enabled for the organization. +func (m *Teamwork) SetIsTeamsEnabled(value *bool)() { + err := m.GetBackingStore().Set("isTeamsEnabled", value) + if err != nil { + panic(err) + } +} +// SetRegion sets the region property value. Represents the region of the organization. +func (m *Teamwork) SetRegion(value *string)() { + err := m.GetBackingStore().Set("region", value) + if err != nil { + panic(err) + } +} // SetTeamsAppSettings sets the teamsAppSettings property value. Represents tenant-wide settings for all Teams apps in the tenant. func (m *Teamwork) SetTeamsAppSettings(value TeamsAppSettingsable)() { err := m.GetBackingStore().Set("teamsAppSettings", value) @@ -303,12 +371,16 @@ type Teamworkable interface { GetDeletedChats()([]DeletedChatable) GetDeletedTeams()([]DeletedTeamable) GetDevices()([]TeamworkDeviceable) + GetIsTeamsEnabled()(*bool) + GetRegion()(*string) GetTeamsAppSettings()(TeamsAppSettingsable) GetTeamTemplates()([]TeamTemplateable) GetWorkforceIntegrations()([]WorkforceIntegrationable) SetDeletedChats(value []DeletedChatable)() SetDeletedTeams(value []DeletedTeamable)() SetDevices(value []TeamworkDeviceable)() + SetIsTeamsEnabled(value *bool)() + SetRegion(value *string)() SetTeamsAppSettings(value TeamsAppSettingsable)() SetTeamTemplates(value []TeamTemplateable)() SetWorkforceIntegrations(value []WorkforceIntegrationable)() diff --git a/models/time_off.go b/models/time_off.go index aebb59f03e4..67580643269 100644 --- a/models/time_off.go +++ b/models/time_off.go @@ -21,7 +21,7 @@ func NewTimeOff()(*TimeOff) { func CreateTimeOffFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewTimeOff(), nil } -// GetDraftTimeOff gets the draftTimeOff property value. The draft version of this timeOff that is viewable by managers. Required. +// GetDraftTimeOff gets the draftTimeOff property value. Draft changes in the timeOff are only visible to managers until they're shared. func (m *TimeOff) GetDraftTimeOff()(TimeOffItemable) { val, err := m.GetBackingStore().Get("draftTimeOff") if err != nil { @@ -77,7 +77,7 @@ func (m *TimeOff) GetFieldDeserializers()(map[string]func(i878a80d2330e89d268963 } return res } -// GetIsStagedForDeletion gets the isStagedForDeletion property value. The isStagedForDeletion property +// GetIsStagedForDeletion gets the isStagedForDeletion property value. The timeOff is marked for deletion, a process that is finalized when the schedule is shared. func (m *TimeOff) GetIsStagedForDeletion()(*bool) { val, err := m.GetBackingStore().Get("isStagedForDeletion") if err != nil { @@ -88,7 +88,7 @@ func (m *TimeOff) GetIsStagedForDeletion()(*bool) { } return nil } -// GetSharedTimeOff gets the sharedTimeOff property value. The shared version of this timeOff that is viewable by both employees and managers. Required. +// GetSharedTimeOff gets the sharedTimeOff property value. The shared version of this timeOff that is viewable by both employees and managers. func (m *TimeOff) GetSharedTimeOff()(TimeOffItemable) { val, err := m.GetBackingStore().Get("sharedTimeOff") if err != nil { @@ -142,21 +142,21 @@ func (m *TimeOff) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010 } return nil } -// SetDraftTimeOff sets the draftTimeOff property value. The draft version of this timeOff that is viewable by managers. Required. +// SetDraftTimeOff sets the draftTimeOff property value. Draft changes in the timeOff are only visible to managers until they're shared. func (m *TimeOff) SetDraftTimeOff(value TimeOffItemable)() { err := m.GetBackingStore().Set("draftTimeOff", value) if err != nil { panic(err) } } -// SetIsStagedForDeletion sets the isStagedForDeletion property value. The isStagedForDeletion property +// SetIsStagedForDeletion sets the isStagedForDeletion property value. The timeOff is marked for deletion, a process that is finalized when the schedule is shared. func (m *TimeOff) SetIsStagedForDeletion(value *bool)() { err := m.GetBackingStore().Set("isStagedForDeletion", value) if err != nil { panic(err) } } -// SetSharedTimeOff sets the sharedTimeOff property value. The shared version of this timeOff that is viewable by both employees and managers. Required. +// SetSharedTimeOff sets the sharedTimeOff property value. The shared version of this timeOff that is viewable by both employees and managers. func (m *TimeOff) SetSharedTimeOff(value TimeOffItemable)() { err := m.GetBackingStore().Set("sharedTimeOff", value) if err != nil { diff --git a/models/user_teamwork.go b/models/user_teamwork.go index b3c5b985e42..88625ed257d 100644 --- a/models/user_teamwork.go +++ b/models/user_teamwork.go @@ -65,6 +65,26 @@ func (m *UserTeamwork) GetFieldDeserializers()(map[string]func(i878a80d2330e89d2 } return nil } + res["locale"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLocale(val) + } + return nil + } + res["region"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRegion(val) + } + return nil + } return res } // GetInstalledApps gets the installedApps property value. The apps installed in the personal scope of this user. @@ -78,6 +98,28 @@ func (m *UserTeamwork) GetInstalledApps()([]UserScopeTeamsAppInstallationable) { } return nil } +// GetLocale gets the locale property value. Represents the chosen locale of a user in Microsoft Teams. +func (m *UserTeamwork) GetLocale()(*string) { + val, err := m.GetBackingStore().Get("locale") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetRegion gets the region property value. Represents the region of the user in Microsoft Teams. +func (m *UserTeamwork) GetRegion()(*string) { + val, err := m.GetBackingStore().Get("region") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} // Serialize serializes information the current object func (m *UserTeamwork) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { err := m.Entity.Serialize(writer) @@ -108,6 +150,18 @@ func (m *UserTeamwork) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e return err } } + { + err = writer.WriteStringValue("locale", m.GetLocale()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("region", m.GetRegion()) + if err != nil { + return err + } + } return nil } // SetAssociatedTeams sets the associatedTeams property value. The list of associatedTeamInfo objects that a user is associated with. @@ -124,12 +178,30 @@ func (m *UserTeamwork) SetInstalledApps(value []UserScopeTeamsAppInstallationabl panic(err) } } +// SetLocale sets the locale property value. Represents the chosen locale of a user in Microsoft Teams. +func (m *UserTeamwork) SetLocale(value *string)() { + err := m.GetBackingStore().Set("locale", value) + if err != nil { + panic(err) + } +} +// SetRegion sets the region property value. Represents the region of the user in Microsoft Teams. +func (m *UserTeamwork) SetRegion(value *string)() { + err := m.GetBackingStore().Set("region", value) + if err != nil { + panic(err) + } +} // UserTeamworkable type UserTeamworkable interface { Entityable i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetAssociatedTeams()([]AssociatedTeamInfoable) GetInstalledApps()([]UserScopeTeamsAppInstallationable) + GetLocale()(*string) + GetRegion()(*string) SetAssociatedTeams(value []AssociatedTeamInfoable)() SetInstalledApps(value []UserScopeTeamsAppInstallationable)() + SetLocale(value *string)() + SetRegion(value *string)() } diff --git a/models/virtual_appointment_message_type.go b/models/virtual_appointment_message_type.go new file mode 100644 index 00000000000..3641754aaa6 --- /dev/null +++ b/models/virtual_appointment_message_type.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// +type VirtualAppointmentMessageType int + +const ( + CONFIRMATION_VIRTUALAPPOINTMENTMESSAGETYPE VirtualAppointmentMessageType = iota + RESCHEDULE_VIRTUALAPPOINTMENTMESSAGETYPE + CANCELLATION_VIRTUALAPPOINTMENTMESSAGETYPE + UNKNOWNFUTUREVALUE_VIRTUALAPPOINTMENTMESSAGETYPE +) + +func (i VirtualAppointmentMessageType) String() string { + return []string{"confirmation", "reschedule", "cancellation", "unknownFutureValue"}[i] +} +func ParseVirtualAppointmentMessageType(v string) (any, error) { + result := CONFIRMATION_VIRTUALAPPOINTMENTMESSAGETYPE + switch v { + case "confirmation": + result = CONFIRMATION_VIRTUALAPPOINTMENTMESSAGETYPE + case "reschedule": + result = RESCHEDULE_VIRTUALAPPOINTMENTMESSAGETYPE + case "cancellation": + result = CANCELLATION_VIRTUALAPPOINTMENTMESSAGETYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_VIRTUALAPPOINTMENTMESSAGETYPE + default: + return 0, errors.New("Unknown VirtualAppointmentMessageType value: " + v) + } + return &result, nil +} +func SerializeVirtualAppointmentMessageType(values []VirtualAppointmentMessageType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i VirtualAppointmentMessageType) isMultiValue() bool { + return false +} diff --git a/models/virtual_appointment_sms_type.go b/models/virtual_appointment_sms_type.go deleted file mode 100644 index 38d4a2001b1..00000000000 --- a/models/virtual_appointment_sms_type.go +++ /dev/null @@ -1,43 +0,0 @@ -package models -import ( - "errors" -) -// -type VirtualAppointmentSmsType int - -const ( - CONFIRMATION_VIRTUALAPPOINTMENTSMSTYPE VirtualAppointmentSmsType = iota - RESCHEDULE_VIRTUALAPPOINTMENTSMSTYPE - CANCELLATION_VIRTUALAPPOINTMENTSMSTYPE - UNKNOWNFUTUREVALUE_VIRTUALAPPOINTMENTSMSTYPE -) - -func (i VirtualAppointmentSmsType) String() string { - return []string{"confirmation", "reschedule", "cancellation", "unknownFutureValue"}[i] -} -func ParseVirtualAppointmentSmsType(v string) (any, error) { - result := CONFIRMATION_VIRTUALAPPOINTMENTSMSTYPE - switch v { - case "confirmation": - result = CONFIRMATION_VIRTUALAPPOINTMENTSMSTYPE - case "reschedule": - result = RESCHEDULE_VIRTUALAPPOINTMENTSMSTYPE - case "cancellation": - result = CANCELLATION_VIRTUALAPPOINTMENTSMSTYPE - case "unknownFutureValue": - result = UNKNOWNFUTUREVALUE_VIRTUALAPPOINTMENTSMSTYPE - default: - return 0, errors.New("Unknown VirtualAppointmentSmsType value: " + v) - } - return &result, nil -} -func SerializeVirtualAppointmentSmsType(values []VirtualAppointmentSmsType) []string { - result := make([]string, len(values)) - for i, v := range values { - result[i] = v.String() - } - return result -} -func (i VirtualAppointmentSmsType) isMultiValue() bool { - return false -} diff --git a/models/virtual_event.go b/models/virtual_event.go index 04fb28134fe..3d194af50df 100644 --- a/models/virtual_event.go +++ b/models/virtual_event.go @@ -39,7 +39,7 @@ func CreateVirtualEventFromDiscriminatorValue(parseNode i878a80d2330e89d26896388 } return NewVirtualEvent(), nil } -// GetCreatedBy gets the createdBy property value. Identity information of who created the virtual event. Inherited from virtualEvent. +// GetCreatedBy gets the createdBy property value. Identity information for the creator of the virtual event. Inherited from virtualEvent. func (m *VirtualEvent) GetCreatedBy()(CommunicationsIdentitySetable) { val, err := m.GetBackingStore().Get("createdBy") if err != nil { @@ -61,7 +61,7 @@ func (m *VirtualEvent) GetDescription()(ItemBodyable) { } return nil } -// GetDisplayName gets the displayName property value. Display name of the virtual event +// GetDisplayName gets the displayName property value. Display name of the virtual event. func (m *VirtualEvent) GetDisplayName()(*string) { val, err := m.GetBackingStore().Get("displayName") if err != nil { @@ -180,7 +180,7 @@ func (m *VirtualEvent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d2 } return res } -// GetPresenters gets the presenters property value. Presenters' information of the virtual event. +// GetPresenters gets the presenters property value. The virtual event presenters. func (m *VirtualEvent) GetPresenters()([]VirtualEventPresenterable) { val, err := m.GetBackingStore().Get("presenters") if err != nil { @@ -191,7 +191,7 @@ func (m *VirtualEvent) GetPresenters()([]VirtualEventPresenterable) { } return nil } -// GetSessions gets the sessions property value. Sessions of the virtual event. +// GetSessions gets the sessions property value. Sessions for the virtual event. func (m *VirtualEvent) GetSessions()([]VirtualEventSessionable) { val, err := m.GetBackingStore().Get("sessions") if err != nil { @@ -293,7 +293,7 @@ func (m *VirtualEvent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e } return nil } -// SetCreatedBy sets the createdBy property value. Identity information of who created the virtual event. Inherited from virtualEvent. +// SetCreatedBy sets the createdBy property value. Identity information for the creator of the virtual event. Inherited from virtualEvent. func (m *VirtualEvent) SetCreatedBy(value CommunicationsIdentitySetable)() { err := m.GetBackingStore().Set("createdBy", value) if err != nil { @@ -307,7 +307,7 @@ func (m *VirtualEvent) SetDescription(value ItemBodyable)() { panic(err) } } -// SetDisplayName sets the displayName property value. Display name of the virtual event +// SetDisplayName sets the displayName property value. Display name of the virtual event. func (m *VirtualEvent) SetDisplayName(value *string)() { err := m.GetBackingStore().Set("displayName", value) if err != nil { @@ -321,14 +321,14 @@ func (m *VirtualEvent) SetEndDateTime(value DateTimeTimeZoneable)() { panic(err) } } -// SetPresenters sets the presenters property value. Presenters' information of the virtual event. +// SetPresenters sets the presenters property value. The virtual event presenters. func (m *VirtualEvent) SetPresenters(value []VirtualEventPresenterable)() { err := m.GetBackingStore().Set("presenters", value) if err != nil { panic(err) } } -// SetSessions sets the sessions property value. Sessions of the virtual event. +// SetSessions sets the sessions property value. Sessions for the virtual event. func (m *VirtualEvent) SetSessions(value []VirtualEventSessionable)() { err := m.GetBackingStore().Set("sessions", value) if err != nil { diff --git a/models/virtual_event_registratio_custom_question.go b/models/virtual_event_registration_custom_question.go similarity index 65% rename from models/virtual_event_registratio_custom_question.go rename to models/virtual_event_registration_custom_question.go index 1261361d45a..0028249c309 100644 --- a/models/virtual_event_registratio_custom_question.go +++ b/models/virtual_event_registration_custom_question.go @@ -4,25 +4,25 @@ import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -// VirtualEventRegistratioCustomQuestion -type VirtualEventRegistratioCustomQuestion struct { +// VirtualEventRegistrationCustomQuestion +type VirtualEventRegistrationCustomQuestion struct { VirtualEventRegistrationQuestionBase } -// NewVirtualEventRegistratioCustomQuestion instantiates a new virtualEventRegistratioCustomQuestion and sets the default values. -func NewVirtualEventRegistratioCustomQuestion()(*VirtualEventRegistratioCustomQuestion) { - m := &VirtualEventRegistratioCustomQuestion{ +// NewVirtualEventRegistrationCustomQuestion instantiates a new virtualEventRegistrationCustomQuestion and sets the default values. +func NewVirtualEventRegistrationCustomQuestion()(*VirtualEventRegistrationCustomQuestion) { + m := &VirtualEventRegistrationCustomQuestion{ VirtualEventRegistrationQuestionBase: *NewVirtualEventRegistrationQuestionBase(), } - odataTypeValue := "#microsoft.graph.virtualEventRegistratioCustomQuestion" + odataTypeValue := "#microsoft.graph.virtualEventRegistrationCustomQuestion" m.SetOdataType(&odataTypeValue) return m } -// CreateVirtualEventRegistratioCustomQuestionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value -func CreateVirtualEventRegistratioCustomQuestionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewVirtualEventRegistratioCustomQuestion(), nil +// CreateVirtualEventRegistrationCustomQuestionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateVirtualEventRegistrationCustomQuestionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewVirtualEventRegistrationCustomQuestion(), nil } // GetAnswerChoices gets the answerChoices property value. The answerChoices property -func (m *VirtualEventRegistratioCustomQuestion) GetAnswerChoices()([]string) { +func (m *VirtualEventRegistrationCustomQuestion) GetAnswerChoices()([]string) { val, err := m.GetBackingStore().Get("answerChoices") if err != nil { panic(err) @@ -33,7 +33,7 @@ func (m *VirtualEventRegistratioCustomQuestion) GetAnswerChoices()([]string) { return nil } // GetAnswerInputType gets the answerInputType property value. The answerInputType property -func (m *VirtualEventRegistratioCustomQuestion) GetAnswerInputType()(*VirtualEventRegistrationQuestionAnswerInputType) { +func (m *VirtualEventRegistrationCustomQuestion) GetAnswerInputType()(*VirtualEventRegistrationQuestionAnswerInputType) { val, err := m.GetBackingStore().Get("answerInputType") if err != nil { panic(err) @@ -44,7 +44,7 @@ func (m *VirtualEventRegistratioCustomQuestion) GetAnswerInputType()(*VirtualEve return nil } // GetFieldDeserializers the deserialization information for the current model -func (m *VirtualEventRegistratioCustomQuestion) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { +func (m *VirtualEventRegistrationCustomQuestion) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := m.VirtualEventRegistrationQuestionBase.GetFieldDeserializers() res["answerChoices"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetCollectionOfPrimitiveValues("string") @@ -75,7 +75,7 @@ func (m *VirtualEventRegistratioCustomQuestion) GetFieldDeserializers()(map[stri return res } // Serialize serializes information the current object -func (m *VirtualEventRegistratioCustomQuestion) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { +func (m *VirtualEventRegistrationCustomQuestion) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { err := m.VirtualEventRegistrationQuestionBase.Serialize(writer) if err != nil { return err @@ -96,21 +96,21 @@ func (m *VirtualEventRegistratioCustomQuestion) Serialize(writer i878a80d2330e89 return nil } // SetAnswerChoices sets the answerChoices property value. The answerChoices property -func (m *VirtualEventRegistratioCustomQuestion) SetAnswerChoices(value []string)() { +func (m *VirtualEventRegistrationCustomQuestion) SetAnswerChoices(value []string)() { err := m.GetBackingStore().Set("answerChoices", value) if err != nil { panic(err) } } // SetAnswerInputType sets the answerInputType property value. The answerInputType property -func (m *VirtualEventRegistratioCustomQuestion) SetAnswerInputType(value *VirtualEventRegistrationQuestionAnswerInputType)() { +func (m *VirtualEventRegistrationCustomQuestion) SetAnswerInputType(value *VirtualEventRegistrationQuestionAnswerInputType)() { err := m.GetBackingStore().Set("answerInputType", value) if err != nil { panic(err) } } -// VirtualEventRegistratioCustomQuestionable -type VirtualEventRegistratioCustomQuestionable interface { +// VirtualEventRegistrationCustomQuestionable +type VirtualEventRegistrationCustomQuestionable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable VirtualEventRegistrationQuestionBaseable GetAnswerChoices()([]string) diff --git a/models/virtual_event_registration_question_base.go b/models/virtual_event_registration_question_base.go index 1815743ae61..762ad9faa4e 100644 --- a/models/virtual_event_registration_question_base.go +++ b/models/virtual_event_registration_question_base.go @@ -29,8 +29,8 @@ func CreateVirtualEventRegistrationQuestionBaseFromDiscriminatorValue(parseNode } if mappingValue != nil { switch *mappingValue { - case "#microsoft.graph.virtualEventRegistratioCustomQuestion": - return NewVirtualEventRegistratioCustomQuestion(), nil + case "#microsoft.graph.virtualEventRegistrationCustomQuestion": + return NewVirtualEventRegistrationCustomQuestion(), nil case "#microsoft.graph.virtualEventRegistrationPredefinedQuestion": return NewVirtualEventRegistrationPredefinedQuestion(), nil } diff --git a/models/windows_app_x_app_assignment_settings.go b/models/windows_app_x_app_assignment_settings.go index fe04ee9a3f9..f38f5bee38d 100644 --- a/models/windows_app_x_app_assignment_settings.go +++ b/models/windows_app_x_app_assignment_settings.go @@ -36,7 +36,7 @@ func (m *WindowsAppXAppAssignmentSettings) GetFieldDeserializers()(map[string]fu } return res } -// GetUseDeviceContext gets the useDeviceContext property value. Whether or not to use device execution context for Windows AppX mobile app. +// GetUseDeviceContext gets the useDeviceContext property value. When TRUE, indicates that device execution context will be used for the AppX mobile app. When FALSE, indicates that user context will be used for the AppX mobile app. By default, this property is set to FALSE. Once this property has been set to TRUE it cannot be changed. func (m *WindowsAppXAppAssignmentSettings) GetUseDeviceContext()(*bool) { val, err := m.GetBackingStore().Get("useDeviceContext") if err != nil { @@ -61,7 +61,7 @@ func (m *WindowsAppXAppAssignmentSettings) Serialize(writer i878a80d2330e89d2689 } return nil } -// SetUseDeviceContext sets the useDeviceContext property value. Whether or not to use device execution context for Windows AppX mobile app. +// SetUseDeviceContext sets the useDeviceContext property value. When TRUE, indicates that device execution context will be used for the AppX mobile app. When FALSE, indicates that user context will be used for the AppX mobile app. By default, this property is set to FALSE. Once this property has been set to TRUE it cannot be changed. func (m *WindowsAppXAppAssignmentSettings) SetUseDeviceContext(value *bool)() { err := m.GetBackingStore().Set("useDeviceContext", value) if err != nil { diff --git a/planner/plans_item_archive_post_request_body.go b/planner/plans_item_archive_post_request_body.go new file mode 100644 index 00000000000..2720f45e704 --- /dev/null +++ b/planner/plans_item_archive_post_request_body.go @@ -0,0 +1,110 @@ +package planner + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +// PlansItemArchivePostRequestBody +type PlansItemArchivePostRequestBody struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewPlansItemArchivePostRequestBody instantiates a new PlansItemArchivePostRequestBody and sets the default values. +func NewPlansItemArchivePostRequestBody()(*PlansItemArchivePostRequestBody) { + m := &PlansItemArchivePostRequestBody{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePlansItemArchivePostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlansItemArchivePostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlansItemArchivePostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *PlansItemArchivePostRequestBody) GetAdditionalData()(map[string]any) { + val , err := m.backingStore.Get("additionalData") + if err != nil { + panic(err) + } + if val == nil { + var value = make(map[string]any); + m.SetAdditionalData(value); + } + return val.(map[string]any) +} +// GetBackingStore gets the BackingStore property value. Stores model information. +func (m *PlansItemArchivePostRequestBody) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlansItemArchivePostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["justification"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetJustification(val) + } + return nil + } + return res +} +// GetJustification gets the justification property value. The justification property +func (m *PlansItemArchivePostRequestBody) GetJustification()(*string) { + val, err := m.GetBackingStore().Get("justification") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// Serialize serializes information the current object +func (m *PlansItemArchivePostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("justification", m.GetJustification()) + 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 *PlansItemArchivePostRequestBody) 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 *PlansItemArchivePostRequestBody) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetJustification sets the justification property value. The justification property +func (m *PlansItemArchivePostRequestBody) SetJustification(value *string)() { + err := m.GetBackingStore().Set("justification", value) + if err != nil { + panic(err) + } +} +// PlansItemArchivePostRequestBodyable +type PlansItemArchivePostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetJustification()(*string) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetJustification(value *string)() +} diff --git a/planner/plans_item_archive_request_builder.go b/planner/plans_item_archive_request_builder.go new file mode 100644 index 00000000000..047231105fe --- /dev/null +++ b/planner/plans_item_archive_request_builder.go @@ -0,0 +1,66 @@ +package planner + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// PlansItemArchiveRequestBuilder provides operations to call the archive method. +type PlansItemArchiveRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// PlansItemArchiveRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type PlansItemArchiveRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewPlansItemArchiveRequestBuilderInternal instantiates a new ArchiveRequestBuilder and sets the default values. +func NewPlansItemArchiveRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PlansItemArchiveRequestBuilder) { + m := &PlansItemArchiveRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/planner/plans/{plannerPlan%2Did}/archive", pathParameters), + } + return m +} +// NewPlansItemArchiveRequestBuilder instantiates a new ArchiveRequestBuilder and sets the default values. +func NewPlansItemArchiveRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PlansItemArchiveRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewPlansItemArchiveRequestBuilderInternal(urlParams, requestAdapter) +} +// Post invoke action archive +func (m *PlansItemArchiveRequestBuilder) Post(ctx context.Context, body PlansItemArchivePostRequestBodyable, requestConfiguration *PlansItemArchiveRequestBuilderPostRequestConfiguration)(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation invoke action archive +func (m *PlansItemArchiveRequestBuilder) ToPostRequestInformation(ctx context.Context, body PlansItemArchivePostRequestBodyable, requestConfiguration *PlansItemArchiveRequestBuilderPostRequestConfiguration)(*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. +func (m *PlansItemArchiveRequestBuilder) WithUrl(rawUrl string)(*PlansItemArchiveRequestBuilder) { + return NewPlansItemArchiveRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/planner/plans_item_unarchive_post_request_body.go b/planner/plans_item_unarchive_post_request_body.go new file mode 100644 index 00000000000..ee253c6d06b --- /dev/null +++ b/planner/plans_item_unarchive_post_request_body.go @@ -0,0 +1,110 @@ +package planner + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +// PlansItemUnarchivePostRequestBody +type PlansItemUnarchivePostRequestBody struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewPlansItemUnarchivePostRequestBody instantiates a new PlansItemUnarchivePostRequestBody and sets the default values. +func NewPlansItemUnarchivePostRequestBody()(*PlansItemUnarchivePostRequestBody) { + m := &PlansItemUnarchivePostRequestBody{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreatePlansItemUnarchivePostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlansItemUnarchivePostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlansItemUnarchivePostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *PlansItemUnarchivePostRequestBody) GetAdditionalData()(map[string]any) { + val , err := m.backingStore.Get("additionalData") + if err != nil { + panic(err) + } + if val == nil { + var value = make(map[string]any); + m.SetAdditionalData(value); + } + return val.(map[string]any) +} +// GetBackingStore gets the BackingStore property value. Stores model information. +func (m *PlansItemUnarchivePostRequestBody) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlansItemUnarchivePostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["justification"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetJustification(val) + } + return nil + } + return res +} +// GetJustification gets the justification property value. The justification property +func (m *PlansItemUnarchivePostRequestBody) GetJustification()(*string) { + val, err := m.GetBackingStore().Get("justification") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// Serialize serializes information the current object +func (m *PlansItemUnarchivePostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("justification", m.GetJustification()) + 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 *PlansItemUnarchivePostRequestBody) 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 *PlansItemUnarchivePostRequestBody) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetJustification sets the justification property value. The justification property +func (m *PlansItemUnarchivePostRequestBody) SetJustification(value *string)() { + err := m.GetBackingStore().Set("justification", value) + if err != nil { + panic(err) + } +} +// PlansItemUnarchivePostRequestBodyable +type PlansItemUnarchivePostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetJustification()(*string) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetJustification(value *string)() +} diff --git a/planner/plans_item_unarchive_request_builder.go b/planner/plans_item_unarchive_request_builder.go new file mode 100644 index 00000000000..d9dc983a9ff --- /dev/null +++ b/planner/plans_item_unarchive_request_builder.go @@ -0,0 +1,66 @@ +package planner + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// PlansItemUnarchiveRequestBuilder provides operations to call the unarchive method. +type PlansItemUnarchiveRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// PlansItemUnarchiveRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type PlansItemUnarchiveRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewPlansItemUnarchiveRequestBuilderInternal instantiates a new UnarchiveRequestBuilder and sets the default values. +func NewPlansItemUnarchiveRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PlansItemUnarchiveRequestBuilder) { + m := &PlansItemUnarchiveRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/planner/plans/{plannerPlan%2Did}/unarchive", pathParameters), + } + return m +} +// NewPlansItemUnarchiveRequestBuilder instantiates a new UnarchiveRequestBuilder and sets the default values. +func NewPlansItemUnarchiveRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PlansItemUnarchiveRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewPlansItemUnarchiveRequestBuilderInternal(urlParams, requestAdapter) +} +// Post invoke action unarchive +func (m *PlansItemUnarchiveRequestBuilder) Post(ctx context.Context, body PlansItemUnarchivePostRequestBodyable, requestConfiguration *PlansItemUnarchiveRequestBuilderPostRequestConfiguration)(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation invoke action unarchive +func (m *PlansItemUnarchiveRequestBuilder) ToPostRequestInformation(ctx context.Context, body PlansItemUnarchivePostRequestBodyable, requestConfiguration *PlansItemUnarchiveRequestBuilderPostRequestConfiguration)(*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. +func (m *PlansItemUnarchiveRequestBuilder) WithUrl(rawUrl string)(*PlansItemUnarchiveRequestBuilder) { + return NewPlansItemUnarchiveRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/planner/plans_planner_plan_item_request_builder.go b/planner/plans_planner_plan_item_request_builder.go index 6c2c755226e..80462bde3e3 100644 --- a/planner/plans_planner_plan_item_request_builder.go +++ b/planner/plans_planner_plan_item_request_builder.go @@ -41,6 +41,10 @@ type PlansPlannerPlanItemRequestBuilderPatchRequestConfiguration struct { // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } +// Archive provides operations to call the archive method. +func (m *PlansPlannerPlanItemRequestBuilder) Archive()(*PlansItemArchiveRequestBuilder) { + return NewPlansItemArchiveRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // Buckets provides operations to manage the buckets property of the microsoft.graph.plannerPlan entity. func (m *PlansPlannerPlanItemRequestBuilder) Buckets()(*PlansItemBucketsRequestBuilder) { return NewPlansItemBucketsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) @@ -170,6 +174,10 @@ func (m *PlansPlannerPlanItemRequestBuilder) ToPatchRequestInformation(ctx conte } return requestInfo, nil } +// Unarchive provides operations to call the unarchive method. +func (m *PlansPlannerPlanItemRequestBuilder) Unarchive()(*PlansItemUnarchiveRequestBuilder) { + return NewPlansItemUnarchiveRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. func (m *PlansPlannerPlanItemRequestBuilder) WithUrl(rawUrl string)(*PlansPlannerPlanItemRequestBuilder) { return NewPlansPlannerPlanItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); diff --git a/riskdetections/risk_detections_request_builder.go b/riskdetections/risk_detections_request_builder.go index 5b41cb43a65..6394147f5c8 100644 --- a/riskdetections/risk_detections_request_builder.go +++ b/riskdetections/risk_detections_request_builder.go @@ -11,7 +11,7 @@ import ( type RiskDetectionsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// RiskDetectionsRequestBuilderGetQueryParameters retrieve the properties of a collection of riskDetection objects. +// RiskDetectionsRequestBuilderGetQueryParameters retrieve the properties of a riskDetection object. type RiskDetectionsRequestBuilderGetQueryParameters struct { // Expand related entities Expand []string `uriparametername:"%24expand"` @@ -66,10 +66,10 @@ func NewRiskDetectionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7dae urlParams["request-raw-url"] = rawUrl return NewRiskDetectionsRequestBuilderInternal(urlParams, requestAdapter) } -// Get retrieve the properties of a collection of riskDetection objects. +// Get retrieve the properties of a riskDetection object. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/riskdetection-list?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/riskdetection-get?view=graph-rest-1.0 func (m *RiskDetectionsRequestBuilder) Get(ctx context.Context, requestConfiguration *RiskDetectionsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.RiskDetectionCollectionResponseable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -107,7 +107,7 @@ func (m *RiskDetectionsRequestBuilder) Post(ctx context.Context, body ie233ee762 } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.RiskDetectionable), nil } -// ToGetRequestInformation retrieve the properties of a collection of riskDetection objects. +// ToGetRequestInformation retrieve the properties of a riskDetection object. func (m *RiskDetectionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *RiskDetectionsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/serviceprincipals/item_license_details_get_teams_licensing_details_request_builder.go b/serviceprincipals/item_license_details_get_teams_licensing_details_request_builder.go new file mode 100644 index 00000000000..06fd528d057 --- /dev/null +++ b/serviceprincipals/item_license_details_get_teams_licensing_details_request_builder.go @@ -0,0 +1,66 @@ +package serviceprincipals + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemLicenseDetailsGetTeamsLicensingDetailsRequestBuilder provides operations to call the getTeamsLicensingDetails method. +type ItemLicenseDetailsGetTeamsLicensingDetailsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemLicenseDetailsGetTeamsLicensingDetailsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemLicenseDetailsGetTeamsLicensingDetailsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewItemLicenseDetailsGetTeamsLicensingDetailsRequestBuilderInternal instantiates a new GetTeamsLicensingDetailsRequestBuilder and sets the default values. +func NewItemLicenseDetailsGetTeamsLicensingDetailsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemLicenseDetailsGetTeamsLicensingDetailsRequestBuilder) { + m := &ItemLicenseDetailsGetTeamsLicensingDetailsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/licenseDetails/getTeamsLicensingDetails()", pathParameters), + } + return m +} +// NewItemLicenseDetailsGetTeamsLicensingDetailsRequestBuilder instantiates a new GetTeamsLicensingDetailsRequestBuilder and sets the default values. +func NewItemLicenseDetailsGetTeamsLicensingDetailsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemLicenseDetailsGetTeamsLicensingDetailsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemLicenseDetailsGetTeamsLicensingDetailsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get invoke function getTeamsLicensingDetails +func (m *ItemLicenseDetailsGetTeamsLicensingDetailsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemLicenseDetailsGetTeamsLicensingDetailsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.TeamsLicensingDetailsable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateTeamsLicensingDetailsFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.TeamsLicensingDetailsable), nil +} +// ToGetRequestInformation invoke function getTeamsLicensingDetails +func (m *ItemLicenseDetailsGetTeamsLicensingDetailsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemLicenseDetailsGetTeamsLicensingDetailsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemLicenseDetailsGetTeamsLicensingDetailsRequestBuilder) WithUrl(rawUrl string)(*ItemLicenseDetailsGetTeamsLicensingDetailsRequestBuilder) { + return NewItemLicenseDetailsGetTeamsLicensingDetailsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/serviceprincipals/item_license_details_request_builder.go b/serviceprincipals/item_license_details_request_builder.go index 9e82f40f96f..12aaaa77b55 100644 --- a/serviceprincipals/item_license_details_request_builder.go +++ b/serviceprincipals/item_license_details_request_builder.go @@ -93,6 +93,10 @@ func (m *ItemLicenseDetailsRequestBuilder) Get(ctx context.Context, requestConfi } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.LicenseDetailsCollectionResponseable), nil } +// GetTeamsLicensingDetails provides operations to call the getTeamsLicensingDetails method. +func (m *ItemLicenseDetailsRequestBuilder) GetTeamsLicensingDetails()(*ItemLicenseDetailsGetTeamsLicensingDetailsRequestBuilder) { + return NewItemLicenseDetailsGetTeamsLicensingDetailsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // Post create new navigation property to licenseDetails for servicePrincipals func (m *ItemLicenseDetailsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.LicenseDetailsable, requestConfiguration *ItemLicenseDetailsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.LicenseDetailsable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); diff --git a/shares/item_list_items_item_create_link_post_request_body.go b/shares/item_list_items_item_create_link_post_request_body.go index 7420931aadc..5a200934ac4 100644 --- a/shares/item_list_items_item_create_link_post_request_body.go +++ b/shares/item_list_items_item_create_link_post_request_body.go @@ -64,6 +64,16 @@ func (m *ItemListItemsItemCreateLinkPostRequestBody) GetFieldDeserializers()(map } return nil } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } res["password"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -132,6 +142,17 @@ func (m *ItemListItemsItemCreateLinkPostRequestBody) GetFieldDeserializers()(map } return res } +// GetMessage gets the message property value. The message property +func (m *ItemListItemsItemCreateLinkPostRequestBody) GetMessage()(*string) { + val, err := m.GetBackingStore().Get("message") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} // GetPassword gets the password property value. The password property func (m *ItemListItemsItemCreateLinkPostRequestBody) GetPassword()(*string) { val, err := m.GetBackingStore().Get("password") @@ -206,6 +227,12 @@ func (m *ItemListItemsItemCreateLinkPostRequestBody) Serialize(writer i878a80d23 return err } } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } { err := writer.WriteStringValue("password", m.GetPassword()) if err != nil { @@ -274,6 +301,13 @@ func (m *ItemListItemsItemCreateLinkPostRequestBody) SetExpirationDateTime(value panic(err) } } +// SetMessage sets the message property value. The message property +func (m *ItemListItemsItemCreateLinkPostRequestBody) SetMessage(value *string)() { + err := m.GetBackingStore().Set("message", value) + if err != nil { + panic(err) + } +} // SetPassword sets the password property value. The password property func (m *ItemListItemsItemCreateLinkPostRequestBody) SetPassword(value *string)() { err := m.GetBackingStore().Set("password", value) @@ -323,6 +357,7 @@ type ItemListItemsItemCreateLinkPostRequestBodyable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) GetExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetMessage()(*string) GetPassword()(*string) GetRecipients()([]ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DriveRecipientable) GetRetainInheritedPermissions()(*bool) @@ -331,6 +366,7 @@ type ItemListItemsItemCreateLinkPostRequestBodyable interface { GetTypeEscaped()(*string) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() SetExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetMessage(value *string)() SetPassword(value *string)() SetRecipients(value []ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DriveRecipientable)() SetRetainInheritedPermissions(value *bool)() diff --git a/sites/item_lists_item_items_item_create_link_post_request_body.go b/sites/item_lists_item_items_item_create_link_post_request_body.go index e40791d373a..eac6345ceb8 100644 --- a/sites/item_lists_item_items_item_create_link_post_request_body.go +++ b/sites/item_lists_item_items_item_create_link_post_request_body.go @@ -64,6 +64,16 @@ func (m *ItemListsItemItemsItemCreateLinkPostRequestBody) GetFieldDeserializers( } return nil } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } res["password"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -132,6 +142,17 @@ func (m *ItemListsItemItemsItemCreateLinkPostRequestBody) GetFieldDeserializers( } return res } +// GetMessage gets the message property value. The message property +func (m *ItemListsItemItemsItemCreateLinkPostRequestBody) GetMessage()(*string) { + val, err := m.GetBackingStore().Get("message") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} // GetPassword gets the password property value. The password property func (m *ItemListsItemItemsItemCreateLinkPostRequestBody) GetPassword()(*string) { val, err := m.GetBackingStore().Get("password") @@ -206,6 +227,12 @@ func (m *ItemListsItemItemsItemCreateLinkPostRequestBody) Serialize(writer i878a return err } } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } { err := writer.WriteStringValue("password", m.GetPassword()) if err != nil { @@ -274,6 +301,13 @@ func (m *ItemListsItemItemsItemCreateLinkPostRequestBody) SetExpirationDateTime( panic(err) } } +// SetMessage sets the message property value. The message property +func (m *ItemListsItemItemsItemCreateLinkPostRequestBody) SetMessage(value *string)() { + err := m.GetBackingStore().Set("message", value) + if err != nil { + panic(err) + } +} // SetPassword sets the password property value. The password property func (m *ItemListsItemItemsItemCreateLinkPostRequestBody) SetPassword(value *string)() { err := m.GetBackingStore().Set("password", value) @@ -323,6 +357,7 @@ type ItemListsItemItemsItemCreateLinkPostRequestBodyable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) GetExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetMessage()(*string) GetPassword()(*string) GetRecipients()([]ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DriveRecipientable) GetRetainInheritedPermissions()(*bool) @@ -331,6 +366,7 @@ type ItemListsItemItemsItemCreateLinkPostRequestBodyable interface { GetTypeEscaped()(*string) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() SetExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetMessage(value *string)() SetPassword(value *string)() SetRecipients(value []ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DriveRecipientable)() SetRetainInheritedPermissions(value *bool)() diff --git a/sites/item_lists_list_item_request_builder.go b/sites/item_lists_list_item_request_builder.go index 74d2291b374..f05860cb176 100644 --- a/sites/item_lists_list_item_request_builder.go +++ b/sites/item_lists_list_item_request_builder.go @@ -18,7 +18,7 @@ type ItemListsListItemRequestBuilderDeleteRequestConfiguration struct { // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// ItemListsListItemRequestBuilderGetQueryParameters get the list of richLongRunningOperations associated with a list. +// ItemListsListItemRequestBuilderGetQueryParameters return the metadata for a [list][]. type ItemListsListItemRequestBuilderGetQueryParameters struct { // Expand related entities Expand []string `uriparametername:"%24expand"` @@ -90,10 +90,10 @@ func (m *ItemListsListItemRequestBuilder) Delete(ctx context.Context, requestCon func (m *ItemListsListItemRequestBuilder) Drive()(*ItemListsItemDriveRequestBuilder) { return NewItemListsItemDriveRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Get get the list of richLongRunningOperations associated with a list. +// Get return the metadata for a [list][]. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/list-list-operations?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/list-get?view=graph-rest-1.0 func (m *ItemListsListItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemListsListItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Listable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -157,7 +157,7 @@ func (m *ItemListsListItemRequestBuilder) ToDeleteRequestInformation(ctx context requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToGetRequestInformation get the list of richLongRunningOperations associated with a list. +// ToGetRequestInformation return the metadata for a [list][]. func (m *ItemListsListItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemListsListItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/sites/sites_request_builder.go b/sites/sites_request_builder.go index 21a3e7d5163..f4834983344 100644 --- a/sites/sites_request_builder.go +++ b/sites/sites_request_builder.go @@ -11,7 +11,7 @@ import ( type SitesRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// SitesRequestBuilderGetQueryParameters list all available [sites][] in an organization. Specific filter criteria and query options are also supported and described below: In addition, you can use a [$search][] query against the /sites collection to find sites matching given keywords.If you want to list all sites across all geographies, refer to getAllSites][]. For more guidance about building applications that use site discovery for scanning purposes, see [Best practices for discovering files and detecting changes at scale. +// SitesRequestBuilderGetQueryParameters search across a SharePoint tenant for [sites][] that match keywords provided. The only property that works for sorting is createdDateTime. The search filter is a free text search that uses multiple properties when retrieving the search results. type SitesRequestBuilderGetQueryParameters struct { // Include count of items Count *bool `uriparametername:"%24count"` @@ -75,10 +75,10 @@ func (m *SitesRequestBuilder) Count()(*CountRequestBuilder) { func (m *SitesRequestBuilder) Delta()(*DeltaRequestBuilder) { return NewDeltaRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Get list all available [sites][] in an organization. Specific filter criteria and query options are also supported and described below: In addition, you can use a [$search][] query against the /sites collection to find sites matching given keywords.If you want to list all sites across all geographies, refer to getAllSites][]. For more guidance about building applications that use site discovery for scanning purposes, see [Best practices for discovering files and detecting changes at scale. +// Get search across a SharePoint tenant for [sites][] that match keywords provided. The only property that works for sorting is createdDateTime. The search filter is a free text search that uses multiple properties when retrieving the search results. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/site-list?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/site-search?view=graph-rest-1.0 func (m *SitesRequestBuilder) Get(ctx context.Context, requestConfiguration *SitesRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.SiteCollectionResponseable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -105,7 +105,7 @@ func (m *SitesRequestBuilder) GetAllSites()(*GetAllSitesRequestBuilder) { func (m *SitesRequestBuilder) Remove()(*RemoveRequestBuilder) { return NewRemoveRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// ToGetRequestInformation list all available [sites][] in an organization. Specific filter criteria and query options are also supported and described below: In addition, you can use a [$search][] query against the /sites collection to find sites matching given keywords.If you want to list all sites across all geographies, refer to getAllSites][]. For more guidance about building applications that use site discovery for scanning purposes, see [Best practices for discovering files and detecting changes at scale. +// ToGetRequestInformation search across a SharePoint tenant for [sites][] that match keywords provided. The only property that works for sorting is createdDateTime. The search filter is a free text search that uses multiple properties when retrieving the search results. func (m *SitesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *SitesRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/solutions/booking_businesses_booking_business_item_request_builder.go b/solutions/booking_businesses_booking_business_item_request_builder.go new file mode 100644 index 00000000000..d28ec39f63e --- /dev/null +++ b/solutions/booking_businesses_booking_business_item_request_builder.go @@ -0,0 +1,187 @@ +package solutions + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// BookingBusinessesBookingBusinessItemRequestBuilder provides operations to manage the bookingBusinesses property of the microsoft.graph.solutionsRoot entity. +type BookingBusinessesBookingBusinessItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// BookingBusinessesBookingBusinessItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type BookingBusinessesBookingBusinessItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// BookingBusinessesBookingBusinessItemRequestBuilderGetQueryParameters get bookingBusinesses from solutions +type BookingBusinessesBookingBusinessItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// BookingBusinessesBookingBusinessItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type BookingBusinessesBookingBusinessItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *BookingBusinessesBookingBusinessItemRequestBuilderGetQueryParameters +} +// BookingBusinessesBookingBusinessItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type BookingBusinessesBookingBusinessItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// Appointments provides operations to manage the appointments property of the microsoft.graph.bookingBusiness entity. +func (m *BookingBusinessesBookingBusinessItemRequestBuilder) Appointments()(*BookingBusinessesItemAppointmentsRequestBuilder) { + return NewBookingBusinessesItemAppointmentsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// CalendarView provides operations to manage the calendarView property of the microsoft.graph.bookingBusiness entity. +func (m *BookingBusinessesBookingBusinessItemRequestBuilder) CalendarView()(*BookingBusinessesItemCalendarViewRequestBuilder) { + return NewBookingBusinessesItemCalendarViewRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewBookingBusinessesBookingBusinessItemRequestBuilderInternal instantiates a new BookingBusinessItemRequestBuilder and sets the default values. +func NewBookingBusinessesBookingBusinessItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BookingBusinessesBookingBusinessItemRequestBuilder) { + m := &BookingBusinessesBookingBusinessItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/solutions/bookingBusinesses/{bookingBusiness%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewBookingBusinessesBookingBusinessItemRequestBuilder instantiates a new BookingBusinessItemRequestBuilder and sets the default values. +func NewBookingBusinessesBookingBusinessItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BookingBusinessesBookingBusinessItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewBookingBusinessesBookingBusinessItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Customers provides operations to manage the customers property of the microsoft.graph.bookingBusiness entity. +func (m *BookingBusinessesBookingBusinessItemRequestBuilder) Customers()(*BookingBusinessesItemCustomersRequestBuilder) { + return NewBookingBusinessesItemCustomersRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// CustomQuestions provides operations to manage the customQuestions property of the microsoft.graph.bookingBusiness entity. +func (m *BookingBusinessesBookingBusinessItemRequestBuilder) CustomQuestions()(*BookingBusinessesItemCustomQuestionsRequestBuilder) { + return NewBookingBusinessesItemCustomQuestionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Delete delete navigation property bookingBusinesses for solutions +func (m *BookingBusinessesBookingBusinessItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *BookingBusinessesBookingBusinessItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get get bookingBusinesses from solutions +func (m *BookingBusinessesBookingBusinessItemRequestBuilder) Get(ctx context.Context, requestConfiguration *BookingBusinessesBookingBusinessItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingBusinessable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateBookingBusinessFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingBusinessable), nil +} +// GetStaffAvailability provides operations to call the getStaffAvailability method. +func (m *BookingBusinessesBookingBusinessItemRequestBuilder) GetStaffAvailability()(*BookingBusinessesItemGetStaffAvailabilityRequestBuilder) { + return NewBookingBusinessesItemGetStaffAvailabilityRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Patch update the navigation property bookingBusinesses in solutions +func (m *BookingBusinessesBookingBusinessItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingBusinessable, requestConfiguration *BookingBusinessesBookingBusinessItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingBusinessable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateBookingBusinessFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingBusinessable), nil +} +// Publish provides operations to call the publish method. +func (m *BookingBusinessesBookingBusinessItemRequestBuilder) Publish()(*BookingBusinessesItemPublishRequestBuilder) { + return NewBookingBusinessesItemPublishRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Services provides operations to manage the services property of the microsoft.graph.bookingBusiness entity. +func (m *BookingBusinessesBookingBusinessItemRequestBuilder) Services()(*BookingBusinessesItemServicesRequestBuilder) { + return NewBookingBusinessesItemServicesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// StaffMembers provides operations to manage the staffMembers property of the microsoft.graph.bookingBusiness entity. +func (m *BookingBusinessesBookingBusinessItemRequestBuilder) StaffMembers()(*BookingBusinessesItemStaffMembersRequestBuilder) { + return NewBookingBusinessesItemStaffMembersRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToDeleteRequestInformation delete navigation property bookingBusinesses for solutions +func (m *BookingBusinessesBookingBusinessItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *BookingBusinessesBookingBusinessItemRequestBuilderDeleteRequestConfiguration)(*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 bookingBusinesses from solutions +func (m *BookingBusinessesBookingBusinessItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *BookingBusinessesBookingBusinessItemRequestBuilderGetRequestConfiguration)(*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 bookingBusinesses in solutions +func (m *BookingBusinessesBookingBusinessItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingBusinessable, requestConfiguration *BookingBusinessesBookingBusinessItemRequestBuilderPatchRequestConfiguration)(*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 +} +// Unpublish provides operations to call the unpublish method. +func (m *BookingBusinessesBookingBusinessItemRequestBuilder) Unpublish()(*BookingBusinessesItemUnpublishRequestBuilder) { + return NewBookingBusinessesItemUnpublishRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *BookingBusinessesBookingBusinessItemRequestBuilder) WithUrl(rawUrl string)(*BookingBusinessesBookingBusinessItemRequestBuilder) { + return NewBookingBusinessesBookingBusinessItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/solutions/booking_businesses_count_request_builder.go b/solutions/booking_businesses_count_request_builder.go new file mode 100644 index 00000000000..597ef09a970 --- /dev/null +++ b/solutions/booking_businesses_count_request_builder.go @@ -0,0 +1,77 @@ +package solutions + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// BookingBusinessesCountRequestBuilder provides operations to count the resources in the collection. +type BookingBusinessesCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// BookingBusinessesCountRequestBuilderGetQueryParameters get the number of the resource +type BookingBusinessesCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// BookingBusinessesCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type BookingBusinessesCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *BookingBusinessesCountRequestBuilderGetQueryParameters +} +// NewBookingBusinessesCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewBookingBusinessesCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BookingBusinessesCountRequestBuilder) { + m := &BookingBusinessesCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/solutions/bookingBusinesses/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewBookingBusinessesCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewBookingBusinessesCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BookingBusinessesCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewBookingBusinessesCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *BookingBusinessesCountRequestBuilder) Get(ctx context.Context, requestConfiguration *BookingBusinessesCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *BookingBusinessesCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *BookingBusinessesCountRequestBuilderGetRequestConfiguration)(*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. +func (m *BookingBusinessesCountRequestBuilder) WithUrl(rawUrl string)(*BookingBusinessesCountRequestBuilder) { + return NewBookingBusinessesCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/solutions/booking_businesses_item_appointments_booking_appointment_item_request_builder.go b/solutions/booking_businesses_item_appointments_booking_appointment_item_request_builder.go new file mode 100644 index 00000000000..09ec058a21f --- /dev/null +++ b/solutions/booking_businesses_item_appointments_booking_appointment_item_request_builder.go @@ -0,0 +1,164 @@ +package solutions + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// BookingBusinessesItemAppointmentsBookingAppointmentItemRequestBuilder provides operations to manage the appointments property of the microsoft.graph.bookingBusiness entity. +type BookingBusinessesItemAppointmentsBookingAppointmentItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// BookingBusinessesItemAppointmentsBookingAppointmentItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type BookingBusinessesItemAppointmentsBookingAppointmentItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// BookingBusinessesItemAppointmentsBookingAppointmentItemRequestBuilderGetQueryParameters get the properties and relationships of a bookingAppointment object in the specified bookingBusiness. The start and end properties are always returned in UTC. +type BookingBusinessesItemAppointmentsBookingAppointmentItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// BookingBusinessesItemAppointmentsBookingAppointmentItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type BookingBusinessesItemAppointmentsBookingAppointmentItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *BookingBusinessesItemAppointmentsBookingAppointmentItemRequestBuilderGetQueryParameters +} +// BookingBusinessesItemAppointmentsBookingAppointmentItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type BookingBusinessesItemAppointmentsBookingAppointmentItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// Cancel provides operations to call the cancel method. +func (m *BookingBusinessesItemAppointmentsBookingAppointmentItemRequestBuilder) Cancel()(*BookingBusinessesItemAppointmentsItemCancelRequestBuilder) { + return NewBookingBusinessesItemAppointmentsItemCancelRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewBookingBusinessesItemAppointmentsBookingAppointmentItemRequestBuilderInternal instantiates a new BookingAppointmentItemRequestBuilder and sets the default values. +func NewBookingBusinessesItemAppointmentsBookingAppointmentItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BookingBusinessesItemAppointmentsBookingAppointmentItemRequestBuilder) { + m := &BookingBusinessesItemAppointmentsBookingAppointmentItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/solutions/bookingBusinesses/{bookingBusiness%2Did}/appointments/{bookingAppointment%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewBookingBusinessesItemAppointmentsBookingAppointmentItemRequestBuilder instantiates a new BookingAppointmentItemRequestBuilder and sets the default values. +func NewBookingBusinessesItemAppointmentsBookingAppointmentItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BookingBusinessesItemAppointmentsBookingAppointmentItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewBookingBusinessesItemAppointmentsBookingAppointmentItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete a bookingAppointment in the specified bookingBusiness. +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/bookingappointment-delete?view=graph-rest-1.0 +func (m *BookingBusinessesItemAppointmentsBookingAppointmentItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *BookingBusinessesItemAppointmentsBookingAppointmentItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get get the properties and relationships of a bookingAppointment object in the specified bookingBusiness. The start and end properties are always returned in UTC. +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/bookingappointment-get?view=graph-rest-1.0 +func (m *BookingBusinessesItemAppointmentsBookingAppointmentItemRequestBuilder) Get(ctx context.Context, requestConfiguration *BookingBusinessesItemAppointmentsBookingAppointmentItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingAppointmentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateBookingAppointmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingAppointmentable), nil +} +// Patch update the properties of a bookingAppointment object in the specified bookingBusiness. +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/bookingappointment-update?view=graph-rest-1.0 +func (m *BookingBusinessesItemAppointmentsBookingAppointmentItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingAppointmentable, requestConfiguration *BookingBusinessesItemAppointmentsBookingAppointmentItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingAppointmentable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateBookingAppointmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingAppointmentable), nil +} +// ToDeleteRequestInformation delete a bookingAppointment in the specified bookingBusiness. +func (m *BookingBusinessesItemAppointmentsBookingAppointmentItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *BookingBusinessesItemAppointmentsBookingAppointmentItemRequestBuilderDeleteRequestConfiguration)(*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 the properties and relationships of a bookingAppointment object in the specified bookingBusiness. The start and end properties are always returned in UTC. +func (m *BookingBusinessesItemAppointmentsBookingAppointmentItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *BookingBusinessesItemAppointmentsBookingAppointmentItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation update the properties of a bookingAppointment object in the specified bookingBusiness. +func (m *BookingBusinessesItemAppointmentsBookingAppointmentItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingAppointmentable, requestConfiguration *BookingBusinessesItemAppointmentsBookingAppointmentItemRequestBuilderPatchRequestConfiguration)(*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. +func (m *BookingBusinessesItemAppointmentsBookingAppointmentItemRequestBuilder) WithUrl(rawUrl string)(*BookingBusinessesItemAppointmentsBookingAppointmentItemRequestBuilder) { + return NewBookingBusinessesItemAppointmentsBookingAppointmentItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/solutions/booking_businesses_item_appointments_count_request_builder.go b/solutions/booking_businesses_item_appointments_count_request_builder.go new file mode 100644 index 00000000000..e6f98570921 --- /dev/null +++ b/solutions/booking_businesses_item_appointments_count_request_builder.go @@ -0,0 +1,77 @@ +package solutions + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// BookingBusinessesItemAppointmentsCountRequestBuilder provides operations to count the resources in the collection. +type BookingBusinessesItemAppointmentsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// BookingBusinessesItemAppointmentsCountRequestBuilderGetQueryParameters get the number of the resource +type BookingBusinessesItemAppointmentsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// BookingBusinessesItemAppointmentsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type BookingBusinessesItemAppointmentsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *BookingBusinessesItemAppointmentsCountRequestBuilderGetQueryParameters +} +// NewBookingBusinessesItemAppointmentsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewBookingBusinessesItemAppointmentsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BookingBusinessesItemAppointmentsCountRequestBuilder) { + m := &BookingBusinessesItemAppointmentsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/solutions/bookingBusinesses/{bookingBusiness%2Did}/appointments/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewBookingBusinessesItemAppointmentsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewBookingBusinessesItemAppointmentsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BookingBusinessesItemAppointmentsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewBookingBusinessesItemAppointmentsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *BookingBusinessesItemAppointmentsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *BookingBusinessesItemAppointmentsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *BookingBusinessesItemAppointmentsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *BookingBusinessesItemAppointmentsCountRequestBuilderGetRequestConfiguration)(*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. +func (m *BookingBusinessesItemAppointmentsCountRequestBuilder) WithUrl(rawUrl string)(*BookingBusinessesItemAppointmentsCountRequestBuilder) { + return NewBookingBusinessesItemAppointmentsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/solutions/booking_businesses_item_appointments_item_cancel_post_request_body.go b/solutions/booking_businesses_item_appointments_item_cancel_post_request_body.go new file mode 100644 index 00000000000..c35d18c4e3e --- /dev/null +++ b/solutions/booking_businesses_item_appointments_item_cancel_post_request_body.go @@ -0,0 +1,110 @@ +package solutions + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +// BookingBusinessesItemAppointmentsItemCancelPostRequestBody +type BookingBusinessesItemAppointmentsItemCancelPostRequestBody struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewBookingBusinessesItemAppointmentsItemCancelPostRequestBody instantiates a new BookingBusinessesItemAppointmentsItemCancelPostRequestBody and sets the default values. +func NewBookingBusinessesItemAppointmentsItemCancelPostRequestBody()(*BookingBusinessesItemAppointmentsItemCancelPostRequestBody) { + m := &BookingBusinessesItemAppointmentsItemCancelPostRequestBody{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateBookingBusinessesItemAppointmentsItemCancelPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBookingBusinessesItemAppointmentsItemCancelPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBookingBusinessesItemAppointmentsItemCancelPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *BookingBusinessesItemAppointmentsItemCancelPostRequestBody) GetAdditionalData()(map[string]any) { + val , err := m.backingStore.Get("additionalData") + if err != nil { + panic(err) + } + if val == nil { + var value = make(map[string]any); + m.SetAdditionalData(value); + } + return val.(map[string]any) +} +// GetBackingStore gets the BackingStore property value. Stores model information. +func (m *BookingBusinessesItemAppointmentsItemCancelPostRequestBody) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetCancellationMessage gets the cancellationMessage property value. The cancellationMessage property +func (m *BookingBusinessesItemAppointmentsItemCancelPostRequestBody) GetCancellationMessage()(*string) { + val, err := m.GetBackingStore().Get("cancellationMessage") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BookingBusinessesItemAppointmentsItemCancelPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["cancellationMessage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCancellationMessage(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *BookingBusinessesItemAppointmentsItemCancelPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("cancellationMessage", m.GetCancellationMessage()) + 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 *BookingBusinessesItemAppointmentsItemCancelPostRequestBody) 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 *BookingBusinessesItemAppointmentsItemCancelPostRequestBody) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetCancellationMessage sets the cancellationMessage property value. The cancellationMessage property +func (m *BookingBusinessesItemAppointmentsItemCancelPostRequestBody) SetCancellationMessage(value *string)() { + err := m.GetBackingStore().Set("cancellationMessage", value) + if err != nil { + panic(err) + } +} +// BookingBusinessesItemAppointmentsItemCancelPostRequestBodyable +type BookingBusinessesItemAppointmentsItemCancelPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetCancellationMessage()(*string) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetCancellationMessage(value *string)() +} diff --git a/solutions/booking_businesses_item_appointments_item_cancel_request_builder.go b/solutions/booking_businesses_item_appointments_item_cancel_request_builder.go new file mode 100644 index 00000000000..a9999d60295 --- /dev/null +++ b/solutions/booking_businesses_item_appointments_item_cancel_request_builder.go @@ -0,0 +1,69 @@ +package solutions + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// BookingBusinessesItemAppointmentsItemCancelRequestBuilder provides operations to call the cancel method. +type BookingBusinessesItemAppointmentsItemCancelRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// BookingBusinessesItemAppointmentsItemCancelRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type BookingBusinessesItemAppointmentsItemCancelRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewBookingBusinessesItemAppointmentsItemCancelRequestBuilderInternal instantiates a new CancelRequestBuilder and sets the default values. +func NewBookingBusinessesItemAppointmentsItemCancelRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BookingBusinessesItemAppointmentsItemCancelRequestBuilder) { + m := &BookingBusinessesItemAppointmentsItemCancelRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/solutions/bookingBusinesses/{bookingBusiness%2Did}/appointments/{bookingAppointment%2Did}/cancel", pathParameters), + } + return m +} +// NewBookingBusinessesItemAppointmentsItemCancelRequestBuilder instantiates a new CancelRequestBuilder and sets the default values. +func NewBookingBusinessesItemAppointmentsItemCancelRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BookingBusinessesItemAppointmentsItemCancelRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewBookingBusinessesItemAppointmentsItemCancelRequestBuilderInternal(urlParams, requestAdapter) +} +// Post cancel the specified bookingAppointment in the specified bookingBusiness, and send a message to the involved customer and staff members. +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/bookingappointment-cancel?view=graph-rest-1.0 +func (m *BookingBusinessesItemAppointmentsItemCancelRequestBuilder) Post(ctx context.Context, body BookingBusinessesItemAppointmentsItemCancelPostRequestBodyable, requestConfiguration *BookingBusinessesItemAppointmentsItemCancelRequestBuilderPostRequestConfiguration)(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation cancel the specified bookingAppointment in the specified bookingBusiness, and send a message to the involved customer and staff members. +func (m *BookingBusinessesItemAppointmentsItemCancelRequestBuilder) ToPostRequestInformation(ctx context.Context, body BookingBusinessesItemAppointmentsItemCancelPostRequestBodyable, requestConfiguration *BookingBusinessesItemAppointmentsItemCancelRequestBuilderPostRequestConfiguration)(*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. +func (m *BookingBusinessesItemAppointmentsItemCancelRequestBuilder) WithUrl(rawUrl string)(*BookingBusinessesItemAppointmentsItemCancelRequestBuilder) { + return NewBookingBusinessesItemAppointmentsItemCancelRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/solutions/booking_businesses_item_appointments_request_builder.go b/solutions/booking_businesses_item_appointments_request_builder.go new file mode 100644 index 00000000000..0ea6efc3cff --- /dev/null +++ b/solutions/booking_businesses_item_appointments_request_builder.go @@ -0,0 +1,151 @@ +package solutions + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// BookingBusinessesItemAppointmentsRequestBuilder provides operations to manage the appointments property of the microsoft.graph.bookingBusiness entity. +type BookingBusinessesItemAppointmentsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// BookingBusinessesItemAppointmentsRequestBuilderGetQueryParameters get a list of bookingAppointment objects for the specified bookingBusiness. +type BookingBusinessesItemAppointmentsRequestBuilderGetQueryParameters 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"` +} +// BookingBusinessesItemAppointmentsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type BookingBusinessesItemAppointmentsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *BookingBusinessesItemAppointmentsRequestBuilderGetQueryParameters +} +// BookingBusinessesItemAppointmentsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type BookingBusinessesItemAppointmentsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByBookingAppointmentId provides operations to manage the appointments property of the microsoft.graph.bookingBusiness entity. +func (m *BookingBusinessesItemAppointmentsRequestBuilder) ByBookingAppointmentId(bookingAppointmentId string)(*BookingBusinessesItemAppointmentsBookingAppointmentItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if bookingAppointmentId != "" { + urlTplParams["bookingAppointment%2Did"] = bookingAppointmentId + } + return NewBookingBusinessesItemAppointmentsBookingAppointmentItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewBookingBusinessesItemAppointmentsRequestBuilderInternal instantiates a new AppointmentsRequestBuilder and sets the default values. +func NewBookingBusinessesItemAppointmentsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BookingBusinessesItemAppointmentsRequestBuilder) { + m := &BookingBusinessesItemAppointmentsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/solutions/bookingBusinesses/{bookingBusiness%2Did}/appointments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewBookingBusinessesItemAppointmentsRequestBuilder instantiates a new AppointmentsRequestBuilder and sets the default values. +func NewBookingBusinessesItemAppointmentsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BookingBusinessesItemAppointmentsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewBookingBusinessesItemAppointmentsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *BookingBusinessesItemAppointmentsRequestBuilder) Count()(*BookingBusinessesItemAppointmentsCountRequestBuilder) { + return NewBookingBusinessesItemAppointmentsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get get a list of bookingAppointment objects for the specified bookingBusiness. +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/bookingbusiness-list-appointments?view=graph-rest-1.0 +func (m *BookingBusinessesItemAppointmentsRequestBuilder) Get(ctx context.Context, requestConfiguration *BookingBusinessesItemAppointmentsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingAppointmentCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateBookingAppointmentCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingAppointmentCollectionResponseable), nil +} +// Post create a new bookingAppointment for the specified bookingBusiness. +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/bookingbusiness-post-appointments?view=graph-rest-1.0 +func (m *BookingBusinessesItemAppointmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingAppointmentable, requestConfiguration *BookingBusinessesItemAppointmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingAppointmentable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateBookingAppointmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingAppointmentable), nil +} +// ToGetRequestInformation get a list of bookingAppointment objects for the specified bookingBusiness. +func (m *BookingBusinessesItemAppointmentsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *BookingBusinessesItemAppointmentsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation create a new bookingAppointment for the specified bookingBusiness. +func (m *BookingBusinessesItemAppointmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingAppointmentable, requestConfiguration *BookingBusinessesItemAppointmentsRequestBuilderPostRequestConfiguration)(*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. +func (m *BookingBusinessesItemAppointmentsRequestBuilder) WithUrl(rawUrl string)(*BookingBusinessesItemAppointmentsRequestBuilder) { + return NewBookingBusinessesItemAppointmentsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/solutions/booking_businesses_item_calendar_view_booking_appointment_item_request_builder.go b/solutions/booking_businesses_item_calendar_view_booking_appointment_item_request_builder.go new file mode 100644 index 00000000000..44c180cbe78 --- /dev/null +++ b/solutions/booking_businesses_item_calendar_view_booking_appointment_item_request_builder.go @@ -0,0 +1,159 @@ +package solutions + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// BookingBusinessesItemCalendarViewBookingAppointmentItemRequestBuilder provides operations to manage the calendarView property of the microsoft.graph.bookingBusiness entity. +type BookingBusinessesItemCalendarViewBookingAppointmentItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// BookingBusinessesItemCalendarViewBookingAppointmentItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type BookingBusinessesItemCalendarViewBookingAppointmentItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// BookingBusinessesItemCalendarViewBookingAppointmentItemRequestBuilderGetQueryParameters the set of appointments of this business in a specified date range. Read-only. Nullable. +type BookingBusinessesItemCalendarViewBookingAppointmentItemRequestBuilderGetQueryParameters struct { + // The end date and time of the time range, represented in ISO 8601 format. For example, 2019-11-08T20:00:00-08:00 + End *string `uriparametername:"end"` + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` + // The start date and time of the time range, represented in ISO 8601 format. For example, 2019-11-08T19:00:00-08:00 + Start *string `uriparametername:"start"` +} +// BookingBusinessesItemCalendarViewBookingAppointmentItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type BookingBusinessesItemCalendarViewBookingAppointmentItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *BookingBusinessesItemCalendarViewBookingAppointmentItemRequestBuilderGetQueryParameters +} +// BookingBusinessesItemCalendarViewBookingAppointmentItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type BookingBusinessesItemCalendarViewBookingAppointmentItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// Cancel provides operations to call the cancel method. +func (m *BookingBusinessesItemCalendarViewBookingAppointmentItemRequestBuilder) Cancel()(*BookingBusinessesItemCalendarViewItemCancelRequestBuilder) { + return NewBookingBusinessesItemCalendarViewItemCancelRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewBookingBusinessesItemCalendarViewBookingAppointmentItemRequestBuilderInternal instantiates a new BookingAppointmentItemRequestBuilder and sets the default values. +func NewBookingBusinessesItemCalendarViewBookingAppointmentItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BookingBusinessesItemCalendarViewBookingAppointmentItemRequestBuilder) { + m := &BookingBusinessesItemCalendarViewBookingAppointmentItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/solutions/bookingBusinesses/{bookingBusiness%2Did}/calendarView/{bookingAppointment%2Did}{?start*,end*,%24select,%24expand}", pathParameters), + } + return m +} +// NewBookingBusinessesItemCalendarViewBookingAppointmentItemRequestBuilder instantiates a new BookingAppointmentItemRequestBuilder and sets the default values. +func NewBookingBusinessesItemCalendarViewBookingAppointmentItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BookingBusinessesItemCalendarViewBookingAppointmentItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewBookingBusinessesItemCalendarViewBookingAppointmentItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property calendarView for solutions +func (m *BookingBusinessesItemCalendarViewBookingAppointmentItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *BookingBusinessesItemCalendarViewBookingAppointmentItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get the set of appointments of this business in a specified date range. Read-only. Nullable. +func (m *BookingBusinessesItemCalendarViewBookingAppointmentItemRequestBuilder) Get(ctx context.Context, requestConfiguration *BookingBusinessesItemCalendarViewBookingAppointmentItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingAppointmentable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateBookingAppointmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingAppointmentable), nil +} +// Patch update the navigation property calendarView in solutions +func (m *BookingBusinessesItemCalendarViewBookingAppointmentItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingAppointmentable, requestConfiguration *BookingBusinessesItemCalendarViewBookingAppointmentItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingAppointmentable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateBookingAppointmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingAppointmentable), nil +} +// ToDeleteRequestInformation delete navigation property calendarView for solutions +func (m *BookingBusinessesItemCalendarViewBookingAppointmentItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *BookingBusinessesItemCalendarViewBookingAppointmentItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation the set of appointments of this business in a specified date range. Read-only. Nullable. +func (m *BookingBusinessesItemCalendarViewBookingAppointmentItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *BookingBusinessesItemCalendarViewBookingAppointmentItemRequestBuilderGetRequestConfiguration)(*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 calendarView in solutions +func (m *BookingBusinessesItemCalendarViewBookingAppointmentItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingAppointmentable, requestConfiguration *BookingBusinessesItemCalendarViewBookingAppointmentItemRequestBuilderPatchRequestConfiguration)(*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. +func (m *BookingBusinessesItemCalendarViewBookingAppointmentItemRequestBuilder) WithUrl(rawUrl string)(*BookingBusinessesItemCalendarViewBookingAppointmentItemRequestBuilder) { + return NewBookingBusinessesItemCalendarViewBookingAppointmentItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/solutions/booking_businesses_item_calendar_view_count_request_builder.go b/solutions/booking_businesses_item_calendar_view_count_request_builder.go new file mode 100644 index 00000000000..281721e323a --- /dev/null +++ b/solutions/booking_businesses_item_calendar_view_count_request_builder.go @@ -0,0 +1,77 @@ +package solutions + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// BookingBusinessesItemCalendarViewCountRequestBuilder provides operations to count the resources in the collection. +type BookingBusinessesItemCalendarViewCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// BookingBusinessesItemCalendarViewCountRequestBuilderGetQueryParameters get the number of the resource +type BookingBusinessesItemCalendarViewCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// BookingBusinessesItemCalendarViewCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type BookingBusinessesItemCalendarViewCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *BookingBusinessesItemCalendarViewCountRequestBuilderGetQueryParameters +} +// NewBookingBusinessesItemCalendarViewCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewBookingBusinessesItemCalendarViewCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BookingBusinessesItemCalendarViewCountRequestBuilder) { + m := &BookingBusinessesItemCalendarViewCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/solutions/bookingBusinesses/{bookingBusiness%2Did}/calendarView/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewBookingBusinessesItemCalendarViewCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewBookingBusinessesItemCalendarViewCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BookingBusinessesItemCalendarViewCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewBookingBusinessesItemCalendarViewCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *BookingBusinessesItemCalendarViewCountRequestBuilder) Get(ctx context.Context, requestConfiguration *BookingBusinessesItemCalendarViewCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *BookingBusinessesItemCalendarViewCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *BookingBusinessesItemCalendarViewCountRequestBuilderGetRequestConfiguration)(*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. +func (m *BookingBusinessesItemCalendarViewCountRequestBuilder) WithUrl(rawUrl string)(*BookingBusinessesItemCalendarViewCountRequestBuilder) { + return NewBookingBusinessesItemCalendarViewCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/solutions/booking_businesses_item_calendar_view_item_cancel_post_request_body.go b/solutions/booking_businesses_item_calendar_view_item_cancel_post_request_body.go new file mode 100644 index 00000000000..10d622957f6 --- /dev/null +++ b/solutions/booking_businesses_item_calendar_view_item_cancel_post_request_body.go @@ -0,0 +1,110 @@ +package solutions + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +// BookingBusinessesItemCalendarViewItemCancelPostRequestBody +type BookingBusinessesItemCalendarViewItemCancelPostRequestBody struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewBookingBusinessesItemCalendarViewItemCancelPostRequestBody instantiates a new BookingBusinessesItemCalendarViewItemCancelPostRequestBody and sets the default values. +func NewBookingBusinessesItemCalendarViewItemCancelPostRequestBody()(*BookingBusinessesItemCalendarViewItemCancelPostRequestBody) { + m := &BookingBusinessesItemCalendarViewItemCancelPostRequestBody{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateBookingBusinessesItemCalendarViewItemCancelPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBookingBusinessesItemCalendarViewItemCancelPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBookingBusinessesItemCalendarViewItemCancelPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *BookingBusinessesItemCalendarViewItemCancelPostRequestBody) GetAdditionalData()(map[string]any) { + val , err := m.backingStore.Get("additionalData") + if err != nil { + panic(err) + } + if val == nil { + var value = make(map[string]any); + m.SetAdditionalData(value); + } + return val.(map[string]any) +} +// GetBackingStore gets the BackingStore property value. Stores model information. +func (m *BookingBusinessesItemCalendarViewItemCancelPostRequestBody) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetCancellationMessage gets the cancellationMessage property value. The cancellationMessage property +func (m *BookingBusinessesItemCalendarViewItemCancelPostRequestBody) GetCancellationMessage()(*string) { + val, err := m.GetBackingStore().Get("cancellationMessage") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BookingBusinessesItemCalendarViewItemCancelPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["cancellationMessage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCancellationMessage(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *BookingBusinessesItemCalendarViewItemCancelPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("cancellationMessage", m.GetCancellationMessage()) + 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 *BookingBusinessesItemCalendarViewItemCancelPostRequestBody) 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 *BookingBusinessesItemCalendarViewItemCancelPostRequestBody) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetCancellationMessage sets the cancellationMessage property value. The cancellationMessage property +func (m *BookingBusinessesItemCalendarViewItemCancelPostRequestBody) SetCancellationMessage(value *string)() { + err := m.GetBackingStore().Set("cancellationMessage", value) + if err != nil { + panic(err) + } +} +// BookingBusinessesItemCalendarViewItemCancelPostRequestBodyable +type BookingBusinessesItemCalendarViewItemCancelPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetCancellationMessage()(*string) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetCancellationMessage(value *string)() +} diff --git a/solutions/booking_businesses_item_calendar_view_item_cancel_request_builder.go b/solutions/booking_businesses_item_calendar_view_item_cancel_request_builder.go new file mode 100644 index 00000000000..cb301614b87 --- /dev/null +++ b/solutions/booking_businesses_item_calendar_view_item_cancel_request_builder.go @@ -0,0 +1,69 @@ +package solutions + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// BookingBusinessesItemCalendarViewItemCancelRequestBuilder provides operations to call the cancel method. +type BookingBusinessesItemCalendarViewItemCancelRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// BookingBusinessesItemCalendarViewItemCancelRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type BookingBusinessesItemCalendarViewItemCancelRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewBookingBusinessesItemCalendarViewItemCancelRequestBuilderInternal instantiates a new CancelRequestBuilder and sets the default values. +func NewBookingBusinessesItemCalendarViewItemCancelRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BookingBusinessesItemCalendarViewItemCancelRequestBuilder) { + m := &BookingBusinessesItemCalendarViewItemCancelRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/solutions/bookingBusinesses/{bookingBusiness%2Did}/calendarView/{bookingAppointment%2Did}/cancel", pathParameters), + } + return m +} +// NewBookingBusinessesItemCalendarViewItemCancelRequestBuilder instantiates a new CancelRequestBuilder and sets the default values. +func NewBookingBusinessesItemCalendarViewItemCancelRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BookingBusinessesItemCalendarViewItemCancelRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewBookingBusinessesItemCalendarViewItemCancelRequestBuilderInternal(urlParams, requestAdapter) +} +// Post cancel the specified bookingAppointment in the specified bookingBusiness, and send a message to the involved customer and staff members. +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/bookingappointment-cancel?view=graph-rest-1.0 +func (m *BookingBusinessesItemCalendarViewItemCancelRequestBuilder) Post(ctx context.Context, body BookingBusinessesItemCalendarViewItemCancelPostRequestBodyable, requestConfiguration *BookingBusinessesItemCalendarViewItemCancelRequestBuilderPostRequestConfiguration)(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation cancel the specified bookingAppointment in the specified bookingBusiness, and send a message to the involved customer and staff members. +func (m *BookingBusinessesItemCalendarViewItemCancelRequestBuilder) ToPostRequestInformation(ctx context.Context, body BookingBusinessesItemCalendarViewItemCancelPostRequestBodyable, requestConfiguration *BookingBusinessesItemCalendarViewItemCancelRequestBuilderPostRequestConfiguration)(*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. +func (m *BookingBusinessesItemCalendarViewItemCancelRequestBuilder) WithUrl(rawUrl string)(*BookingBusinessesItemCalendarViewItemCancelRequestBuilder) { + return NewBookingBusinessesItemCalendarViewItemCancelRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/solutions/booking_businesses_item_calendar_view_request_builder.go b/solutions/booking_businesses_item_calendar_view_request_builder.go new file mode 100644 index 00000000000..390e83006a1 --- /dev/null +++ b/solutions/booking_businesses_item_calendar_view_request_builder.go @@ -0,0 +1,152 @@ +package solutions + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// BookingBusinessesItemCalendarViewRequestBuilder provides operations to manage the calendarView property of the microsoft.graph.bookingBusiness entity. +type BookingBusinessesItemCalendarViewRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// BookingBusinessesItemCalendarViewRequestBuilderGetQueryParameters the set of appointments of this business in a specified date range. Read-only. Nullable. +type BookingBusinessesItemCalendarViewRequestBuilderGetQueryParameters struct { + // Include count of items + Count *bool `uriparametername:"%24count"` + // The end date and time of the time range, represented in ISO 8601 format. For example, 2019-11-08T20:00:00-08:00 + End *string `uriparametername:"end"` + // 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"` + // The start date and time of the time range, represented in ISO 8601 format. For example, 2019-11-08T19:00:00-08:00 + Start *string `uriparametername:"start"` + // Show only the first n items + Top *int32 `uriparametername:"%24top"` +} +// BookingBusinessesItemCalendarViewRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type BookingBusinessesItemCalendarViewRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *BookingBusinessesItemCalendarViewRequestBuilderGetQueryParameters +} +// BookingBusinessesItemCalendarViewRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type BookingBusinessesItemCalendarViewRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByBookingAppointmentId provides operations to manage the calendarView property of the microsoft.graph.bookingBusiness entity. +func (m *BookingBusinessesItemCalendarViewRequestBuilder) ByBookingAppointmentId(bookingAppointmentId string)(*BookingBusinessesItemCalendarViewBookingAppointmentItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if bookingAppointmentId != "" { + urlTplParams["bookingAppointment%2Did"] = bookingAppointmentId + } + return NewBookingBusinessesItemCalendarViewBookingAppointmentItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewBookingBusinessesItemCalendarViewRequestBuilderInternal instantiates a new CalendarViewRequestBuilder and sets the default values. +func NewBookingBusinessesItemCalendarViewRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BookingBusinessesItemCalendarViewRequestBuilder) { + m := &BookingBusinessesItemCalendarViewRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/solutions/bookingBusinesses/{bookingBusiness%2Did}/calendarView{?start*,end*,%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewBookingBusinessesItemCalendarViewRequestBuilder instantiates a new CalendarViewRequestBuilder and sets the default values. +func NewBookingBusinessesItemCalendarViewRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BookingBusinessesItemCalendarViewRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewBookingBusinessesItemCalendarViewRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *BookingBusinessesItemCalendarViewRequestBuilder) Count()(*BookingBusinessesItemCalendarViewCountRequestBuilder) { + return NewBookingBusinessesItemCalendarViewCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get the set of appointments of this business in a specified date range. Read-only. Nullable. +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/bookingbusiness-list-calendarview?view=graph-rest-1.0 +func (m *BookingBusinessesItemCalendarViewRequestBuilder) Get(ctx context.Context, requestConfiguration *BookingBusinessesItemCalendarViewRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingAppointmentCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateBookingAppointmentCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingAppointmentCollectionResponseable), nil +} +// Post create new navigation property to calendarView for solutions +func (m *BookingBusinessesItemCalendarViewRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingAppointmentable, requestConfiguration *BookingBusinessesItemCalendarViewRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingAppointmentable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateBookingAppointmentFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingAppointmentable), nil +} +// ToGetRequestInformation the set of appointments of this business in a specified date range. Read-only. Nullable. +func (m *BookingBusinessesItemCalendarViewRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *BookingBusinessesItemCalendarViewRequestBuilderGetRequestConfiguration)(*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 calendarView for solutions +func (m *BookingBusinessesItemCalendarViewRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingAppointmentable, requestConfiguration *BookingBusinessesItemCalendarViewRequestBuilderPostRequestConfiguration)(*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. +func (m *BookingBusinessesItemCalendarViewRequestBuilder) WithUrl(rawUrl string)(*BookingBusinessesItemCalendarViewRequestBuilder) { + return NewBookingBusinessesItemCalendarViewRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/solutions/booking_businesses_item_custom_questions_booking_custom_question_item_request_builder.go b/solutions/booking_businesses_item_custom_questions_booking_custom_question_item_request_builder.go new file mode 100644 index 00000000000..b71770c6150 --- /dev/null +++ b/solutions/booking_businesses_item_custom_questions_booking_custom_question_item_request_builder.go @@ -0,0 +1,160 @@ +package solutions + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// BookingBusinessesItemCustomQuestionsBookingCustomQuestionItemRequestBuilder provides operations to manage the customQuestions property of the microsoft.graph.bookingBusiness entity. +type BookingBusinessesItemCustomQuestionsBookingCustomQuestionItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// BookingBusinessesItemCustomQuestionsBookingCustomQuestionItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type BookingBusinessesItemCustomQuestionsBookingCustomQuestionItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// BookingBusinessesItemCustomQuestionsBookingCustomQuestionItemRequestBuilderGetQueryParameters read the properties and relationships of a bookingCustomQuestion object. +type BookingBusinessesItemCustomQuestionsBookingCustomQuestionItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// BookingBusinessesItemCustomQuestionsBookingCustomQuestionItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type BookingBusinessesItemCustomQuestionsBookingCustomQuestionItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *BookingBusinessesItemCustomQuestionsBookingCustomQuestionItemRequestBuilderGetQueryParameters +} +// BookingBusinessesItemCustomQuestionsBookingCustomQuestionItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type BookingBusinessesItemCustomQuestionsBookingCustomQuestionItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewBookingBusinessesItemCustomQuestionsBookingCustomQuestionItemRequestBuilderInternal instantiates a new BookingCustomQuestionItemRequestBuilder and sets the default values. +func NewBookingBusinessesItemCustomQuestionsBookingCustomQuestionItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BookingBusinessesItemCustomQuestionsBookingCustomQuestionItemRequestBuilder) { + m := &BookingBusinessesItemCustomQuestionsBookingCustomQuestionItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/solutions/bookingBusinesses/{bookingBusiness%2Did}/customQuestions/{bookingCustomQuestion%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewBookingBusinessesItemCustomQuestionsBookingCustomQuestionItemRequestBuilder instantiates a new BookingCustomQuestionItemRequestBuilder and sets the default values. +func NewBookingBusinessesItemCustomQuestionsBookingCustomQuestionItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BookingBusinessesItemCustomQuestionsBookingCustomQuestionItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewBookingBusinessesItemCustomQuestionsBookingCustomQuestionItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete the specified bookingCustomQuestion object. +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/bookingcustomquestion-delete?view=graph-rest-1.0 +func (m *BookingBusinessesItemCustomQuestionsBookingCustomQuestionItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *BookingBusinessesItemCustomQuestionsBookingCustomQuestionItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get read the properties and relationships of a bookingCustomQuestion object. +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/bookingcustomquestion-get?view=graph-rest-1.0 +func (m *BookingBusinessesItemCustomQuestionsBookingCustomQuestionItemRequestBuilder) Get(ctx context.Context, requestConfiguration *BookingBusinessesItemCustomQuestionsBookingCustomQuestionItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingCustomQuestionable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateBookingCustomQuestionFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingCustomQuestionable), nil +} +// Patch update the properties of a bookingCustomQuestion object. +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/bookingcustomquestion-update?view=graph-rest-1.0 +func (m *BookingBusinessesItemCustomQuestionsBookingCustomQuestionItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingCustomQuestionable, requestConfiguration *BookingBusinessesItemCustomQuestionsBookingCustomQuestionItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingCustomQuestionable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateBookingCustomQuestionFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingCustomQuestionable), nil +} +// ToDeleteRequestInformation delete the specified bookingCustomQuestion object. +func (m *BookingBusinessesItemCustomQuestionsBookingCustomQuestionItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *BookingBusinessesItemCustomQuestionsBookingCustomQuestionItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToGetRequestInformation read the properties and relationships of a bookingCustomQuestion object. +func (m *BookingBusinessesItemCustomQuestionsBookingCustomQuestionItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *BookingBusinessesItemCustomQuestionsBookingCustomQuestionItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation update the properties of a bookingCustomQuestion object. +func (m *BookingBusinessesItemCustomQuestionsBookingCustomQuestionItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingCustomQuestionable, requestConfiguration *BookingBusinessesItemCustomQuestionsBookingCustomQuestionItemRequestBuilderPatchRequestConfiguration)(*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. +func (m *BookingBusinessesItemCustomQuestionsBookingCustomQuestionItemRequestBuilder) WithUrl(rawUrl string)(*BookingBusinessesItemCustomQuestionsBookingCustomQuestionItemRequestBuilder) { + return NewBookingBusinessesItemCustomQuestionsBookingCustomQuestionItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/solutions/booking_businesses_item_custom_questions_count_request_builder.go b/solutions/booking_businesses_item_custom_questions_count_request_builder.go new file mode 100644 index 00000000000..0385c093401 --- /dev/null +++ b/solutions/booking_businesses_item_custom_questions_count_request_builder.go @@ -0,0 +1,77 @@ +package solutions + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// BookingBusinessesItemCustomQuestionsCountRequestBuilder provides operations to count the resources in the collection. +type BookingBusinessesItemCustomQuestionsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// BookingBusinessesItemCustomQuestionsCountRequestBuilderGetQueryParameters get the number of the resource +type BookingBusinessesItemCustomQuestionsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// BookingBusinessesItemCustomQuestionsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type BookingBusinessesItemCustomQuestionsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *BookingBusinessesItemCustomQuestionsCountRequestBuilderGetQueryParameters +} +// NewBookingBusinessesItemCustomQuestionsCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewBookingBusinessesItemCustomQuestionsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BookingBusinessesItemCustomQuestionsCountRequestBuilder) { + m := &BookingBusinessesItemCustomQuestionsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/solutions/bookingBusinesses/{bookingBusiness%2Did}/customQuestions/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewBookingBusinessesItemCustomQuestionsCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewBookingBusinessesItemCustomQuestionsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BookingBusinessesItemCustomQuestionsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewBookingBusinessesItemCustomQuestionsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *BookingBusinessesItemCustomQuestionsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *BookingBusinessesItemCustomQuestionsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *BookingBusinessesItemCustomQuestionsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *BookingBusinessesItemCustomQuestionsCountRequestBuilderGetRequestConfiguration)(*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. +func (m *BookingBusinessesItemCustomQuestionsCountRequestBuilder) WithUrl(rawUrl string)(*BookingBusinessesItemCustomQuestionsCountRequestBuilder) { + return NewBookingBusinessesItemCustomQuestionsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/solutions/booking_businesses_item_custom_questions_request_builder.go b/solutions/booking_businesses_item_custom_questions_request_builder.go new file mode 100644 index 00000000000..5ac95fe0ef2 --- /dev/null +++ b/solutions/booking_businesses_item_custom_questions_request_builder.go @@ -0,0 +1,151 @@ +package solutions + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// BookingBusinessesItemCustomQuestionsRequestBuilder provides operations to manage the customQuestions property of the microsoft.graph.bookingBusiness entity. +type BookingBusinessesItemCustomQuestionsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// BookingBusinessesItemCustomQuestionsRequestBuilderGetQueryParameters get the bookingCustomQuestion resources associated with a bookingBusiness. +type BookingBusinessesItemCustomQuestionsRequestBuilderGetQueryParameters 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"` +} +// BookingBusinessesItemCustomQuestionsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type BookingBusinessesItemCustomQuestionsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *BookingBusinessesItemCustomQuestionsRequestBuilderGetQueryParameters +} +// BookingBusinessesItemCustomQuestionsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type BookingBusinessesItemCustomQuestionsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByBookingCustomQuestionId provides operations to manage the customQuestions property of the microsoft.graph.bookingBusiness entity. +func (m *BookingBusinessesItemCustomQuestionsRequestBuilder) ByBookingCustomQuestionId(bookingCustomQuestionId string)(*BookingBusinessesItemCustomQuestionsBookingCustomQuestionItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if bookingCustomQuestionId != "" { + urlTplParams["bookingCustomQuestion%2Did"] = bookingCustomQuestionId + } + return NewBookingBusinessesItemCustomQuestionsBookingCustomQuestionItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewBookingBusinessesItemCustomQuestionsRequestBuilderInternal instantiates a new CustomQuestionsRequestBuilder and sets the default values. +func NewBookingBusinessesItemCustomQuestionsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BookingBusinessesItemCustomQuestionsRequestBuilder) { + m := &BookingBusinessesItemCustomQuestionsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/solutions/bookingBusinesses/{bookingBusiness%2Did}/customQuestions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewBookingBusinessesItemCustomQuestionsRequestBuilder instantiates a new CustomQuestionsRequestBuilder and sets the default values. +func NewBookingBusinessesItemCustomQuestionsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BookingBusinessesItemCustomQuestionsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewBookingBusinessesItemCustomQuestionsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *BookingBusinessesItemCustomQuestionsRequestBuilder) Count()(*BookingBusinessesItemCustomQuestionsCountRequestBuilder) { + return NewBookingBusinessesItemCustomQuestionsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get get the bookingCustomQuestion resources associated with a bookingBusiness. +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/bookingbusiness-list-customquestions?view=graph-rest-1.0 +func (m *BookingBusinessesItemCustomQuestionsRequestBuilder) Get(ctx context.Context, requestConfiguration *BookingBusinessesItemCustomQuestionsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingCustomQuestionCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateBookingCustomQuestionCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingCustomQuestionCollectionResponseable), nil +} +// Post create a new bookingCustomQuestion object. +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/bookingbusiness-post-customquestions?view=graph-rest-1.0 +func (m *BookingBusinessesItemCustomQuestionsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingCustomQuestionable, requestConfiguration *BookingBusinessesItemCustomQuestionsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingCustomQuestionable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateBookingCustomQuestionFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingCustomQuestionable), nil +} +// ToGetRequestInformation get the bookingCustomQuestion resources associated with a bookingBusiness. +func (m *BookingBusinessesItemCustomQuestionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *BookingBusinessesItemCustomQuestionsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation create a new bookingCustomQuestion object. +func (m *BookingBusinessesItemCustomQuestionsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingCustomQuestionable, requestConfiguration *BookingBusinessesItemCustomQuestionsRequestBuilderPostRequestConfiguration)(*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. +func (m *BookingBusinessesItemCustomQuestionsRequestBuilder) WithUrl(rawUrl string)(*BookingBusinessesItemCustomQuestionsRequestBuilder) { + return NewBookingBusinessesItemCustomQuestionsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/solutions/booking_businesses_item_customers_booking_customer_item_request_builder.go b/solutions/booking_businesses_item_customers_booking_customer_item_request_builder.go new file mode 100644 index 00000000000..f88c5291e5f --- /dev/null +++ b/solutions/booking_businesses_item_customers_booking_customer_item_request_builder.go @@ -0,0 +1,160 @@ +package solutions + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// BookingBusinessesItemCustomersBookingCustomerItemRequestBuilder provides operations to manage the customers property of the microsoft.graph.bookingBusiness entity. +type BookingBusinessesItemCustomersBookingCustomerItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// BookingBusinessesItemCustomersBookingCustomerItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type BookingBusinessesItemCustomersBookingCustomerItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// BookingBusinessesItemCustomersBookingCustomerItemRequestBuilderGetQueryParameters get the properties and relationships of a bookingCustomer object. +type BookingBusinessesItemCustomersBookingCustomerItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// BookingBusinessesItemCustomersBookingCustomerItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type BookingBusinessesItemCustomersBookingCustomerItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *BookingBusinessesItemCustomersBookingCustomerItemRequestBuilderGetQueryParameters +} +// BookingBusinessesItemCustomersBookingCustomerItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type BookingBusinessesItemCustomersBookingCustomerItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewBookingBusinessesItemCustomersBookingCustomerItemRequestBuilderInternal instantiates a new BookingCustomerItemRequestBuilder and sets the default values. +func NewBookingBusinessesItemCustomersBookingCustomerItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BookingBusinessesItemCustomersBookingCustomerItemRequestBuilder) { + m := &BookingBusinessesItemCustomersBookingCustomerItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/solutions/bookingBusinesses/{bookingBusiness%2Did}/customers/{bookingCustomer%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewBookingBusinessesItemCustomersBookingCustomerItemRequestBuilder instantiates a new BookingCustomerItemRequestBuilder and sets the default values. +func NewBookingBusinessesItemCustomersBookingCustomerItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BookingBusinessesItemCustomersBookingCustomerItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewBookingBusinessesItemCustomersBookingCustomerItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete the specified bookingCustomer object. +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/bookingcustomer-delete?view=graph-rest-1.0 +func (m *BookingBusinessesItemCustomersBookingCustomerItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *BookingBusinessesItemCustomersBookingCustomerItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get get the properties and relationships of a bookingCustomer object. +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/bookingcustomer-get?view=graph-rest-1.0 +func (m *BookingBusinessesItemCustomersBookingCustomerItemRequestBuilder) Get(ctx context.Context, requestConfiguration *BookingBusinessesItemCustomersBookingCustomerItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingCustomerable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateBookingCustomerFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingCustomerable), nil +} +// Patch update the properties of a bookingCustomer object. +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/bookingcustomer-update?view=graph-rest-1.0 +func (m *BookingBusinessesItemCustomersBookingCustomerItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingCustomerable, requestConfiguration *BookingBusinessesItemCustomersBookingCustomerItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingCustomerable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateBookingCustomerFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingCustomerable), nil +} +// ToDeleteRequestInformation delete the specified bookingCustomer object. +func (m *BookingBusinessesItemCustomersBookingCustomerItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *BookingBusinessesItemCustomersBookingCustomerItemRequestBuilderDeleteRequestConfiguration)(*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 the properties and relationships of a bookingCustomer object. +func (m *BookingBusinessesItemCustomersBookingCustomerItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *BookingBusinessesItemCustomersBookingCustomerItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation update the properties of a bookingCustomer object. +func (m *BookingBusinessesItemCustomersBookingCustomerItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingCustomerable, requestConfiguration *BookingBusinessesItemCustomersBookingCustomerItemRequestBuilderPatchRequestConfiguration)(*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. +func (m *BookingBusinessesItemCustomersBookingCustomerItemRequestBuilder) WithUrl(rawUrl string)(*BookingBusinessesItemCustomersBookingCustomerItemRequestBuilder) { + return NewBookingBusinessesItemCustomersBookingCustomerItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/solutions/booking_businesses_item_customers_count_request_builder.go b/solutions/booking_businesses_item_customers_count_request_builder.go new file mode 100644 index 00000000000..c6c73a4aedc --- /dev/null +++ b/solutions/booking_businesses_item_customers_count_request_builder.go @@ -0,0 +1,77 @@ +package solutions + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// BookingBusinessesItemCustomersCountRequestBuilder provides operations to count the resources in the collection. +type BookingBusinessesItemCustomersCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// BookingBusinessesItemCustomersCountRequestBuilderGetQueryParameters get the number of the resource +type BookingBusinessesItemCustomersCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// BookingBusinessesItemCustomersCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type BookingBusinessesItemCustomersCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *BookingBusinessesItemCustomersCountRequestBuilderGetQueryParameters +} +// NewBookingBusinessesItemCustomersCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewBookingBusinessesItemCustomersCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BookingBusinessesItemCustomersCountRequestBuilder) { + m := &BookingBusinessesItemCustomersCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/solutions/bookingBusinesses/{bookingBusiness%2Did}/customers/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewBookingBusinessesItemCustomersCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewBookingBusinessesItemCustomersCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BookingBusinessesItemCustomersCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewBookingBusinessesItemCustomersCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *BookingBusinessesItemCustomersCountRequestBuilder) Get(ctx context.Context, requestConfiguration *BookingBusinessesItemCustomersCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *BookingBusinessesItemCustomersCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *BookingBusinessesItemCustomersCountRequestBuilderGetRequestConfiguration)(*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. +func (m *BookingBusinessesItemCustomersCountRequestBuilder) WithUrl(rawUrl string)(*BookingBusinessesItemCustomersCountRequestBuilder) { + return NewBookingBusinessesItemCustomersCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/solutions/booking_businesses_item_customers_request_builder.go b/solutions/booking_businesses_item_customers_request_builder.go new file mode 100644 index 00000000000..05184c72e1e --- /dev/null +++ b/solutions/booking_businesses_item_customers_request_builder.go @@ -0,0 +1,151 @@ +package solutions + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// BookingBusinessesItemCustomersRequestBuilder provides operations to manage the customers property of the microsoft.graph.bookingBusiness entity. +type BookingBusinessesItemCustomersRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// BookingBusinessesItemCustomersRequestBuilderGetQueryParameters get a list of bookingCustomer objects. +type BookingBusinessesItemCustomersRequestBuilderGetQueryParameters 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"` +} +// BookingBusinessesItemCustomersRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type BookingBusinessesItemCustomersRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *BookingBusinessesItemCustomersRequestBuilderGetQueryParameters +} +// BookingBusinessesItemCustomersRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type BookingBusinessesItemCustomersRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByBookingCustomerId provides operations to manage the customers property of the microsoft.graph.bookingBusiness entity. +func (m *BookingBusinessesItemCustomersRequestBuilder) ByBookingCustomerId(bookingCustomerId string)(*BookingBusinessesItemCustomersBookingCustomerItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if bookingCustomerId != "" { + urlTplParams["bookingCustomer%2Did"] = bookingCustomerId + } + return NewBookingBusinessesItemCustomersBookingCustomerItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewBookingBusinessesItemCustomersRequestBuilderInternal instantiates a new CustomersRequestBuilder and sets the default values. +func NewBookingBusinessesItemCustomersRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BookingBusinessesItemCustomersRequestBuilder) { + m := &BookingBusinessesItemCustomersRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/solutions/bookingBusinesses/{bookingBusiness%2Did}/customers{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewBookingBusinessesItemCustomersRequestBuilder instantiates a new CustomersRequestBuilder and sets the default values. +func NewBookingBusinessesItemCustomersRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BookingBusinessesItemCustomersRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewBookingBusinessesItemCustomersRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *BookingBusinessesItemCustomersRequestBuilder) Count()(*BookingBusinessesItemCustomersCountRequestBuilder) { + return NewBookingBusinessesItemCustomersCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get get a list of bookingCustomer objects. +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/bookingbusiness-list-customers?view=graph-rest-1.0 +func (m *BookingBusinessesItemCustomersRequestBuilder) Get(ctx context.Context, requestConfiguration *BookingBusinessesItemCustomersRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingCustomerCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateBookingCustomerCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingCustomerCollectionResponseable), nil +} +// Post create a new bookingCustomer object. +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/bookingbusiness-post-customers?view=graph-rest-1.0 +func (m *BookingBusinessesItemCustomersRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingCustomerable, requestConfiguration *BookingBusinessesItemCustomersRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingCustomerable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateBookingCustomerFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingCustomerable), nil +} +// ToGetRequestInformation get a list of bookingCustomer objects. +func (m *BookingBusinessesItemCustomersRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *BookingBusinessesItemCustomersRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation create a new bookingCustomer object. +func (m *BookingBusinessesItemCustomersRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingCustomerable, requestConfiguration *BookingBusinessesItemCustomersRequestBuilderPostRequestConfiguration)(*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. +func (m *BookingBusinessesItemCustomersRequestBuilder) WithUrl(rawUrl string)(*BookingBusinessesItemCustomersRequestBuilder) { + return NewBookingBusinessesItemCustomersRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/solutions/booking_businesses_item_get_staff_availability_post_request_body.go b/solutions/booking_businesses_item_get_staff_availability_post_request_body.go new file mode 100644 index 00000000000..8b187b0a8e7 --- /dev/null +++ b/solutions/booking_businesses_item_get_staff_availability_post_request_body.go @@ -0,0 +1,189 @@ +package solutions + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +// BookingBusinessesItemGetStaffAvailabilityPostRequestBody +type BookingBusinessesItemGetStaffAvailabilityPostRequestBody struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewBookingBusinessesItemGetStaffAvailabilityPostRequestBody instantiates a new BookingBusinessesItemGetStaffAvailabilityPostRequestBody and sets the default values. +func NewBookingBusinessesItemGetStaffAvailabilityPostRequestBody()(*BookingBusinessesItemGetStaffAvailabilityPostRequestBody) { + m := &BookingBusinessesItemGetStaffAvailabilityPostRequestBody{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateBookingBusinessesItemGetStaffAvailabilityPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBookingBusinessesItemGetStaffAvailabilityPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBookingBusinessesItemGetStaffAvailabilityPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *BookingBusinessesItemGetStaffAvailabilityPostRequestBody) GetAdditionalData()(map[string]any) { + val , err := m.backingStore.Get("additionalData") + if err != nil { + panic(err) + } + if val == nil { + var value = make(map[string]any); + m.SetAdditionalData(value); + } + return val.(map[string]any) +} +// GetBackingStore gets the BackingStore property value. Stores model information. +func (m *BookingBusinessesItemGetStaffAvailabilityPostRequestBody) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetEndDateTime gets the endDateTime property value. The endDateTime property +func (m *BookingBusinessesItemGetStaffAvailabilityPostRequestBody) GetEndDateTime()(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DateTimeTimeZoneable) { + val, err := m.GetBackingStore().Get("endDateTime") + if err != nil { + panic(err) + } + if val != nil { + return val.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DateTimeTimeZoneable) + } + return nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BookingBusinessesItemGetStaffAvailabilityPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["endDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateDateTimeTimeZoneFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetEndDateTime(val.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DateTimeTimeZoneable)) + } + return nil + } + res["staffIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + if v != nil { + res[i] = *(v.(*string)) + } + } + m.SetStaffIds(res) + } + return nil + } + res["startDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateDateTimeTimeZoneFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetStartDateTime(val.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DateTimeTimeZoneable)) + } + return nil + } + return res +} +// GetStaffIds gets the staffIds property value. The staffIds property +func (m *BookingBusinessesItemGetStaffAvailabilityPostRequestBody) GetStaffIds()([]string) { + val, err := m.GetBackingStore().Get("staffIds") + if err != nil { + panic(err) + } + if val != nil { + return val.([]string) + } + return nil +} +// GetStartDateTime gets the startDateTime property value. The startDateTime property +func (m *BookingBusinessesItemGetStaffAvailabilityPostRequestBody) GetStartDateTime()(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DateTimeTimeZoneable) { + val, err := m.GetBackingStore().Get("startDateTime") + if err != nil { + panic(err) + } + if val != nil { + return val.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DateTimeTimeZoneable) + } + return nil +} +// Serialize serializes information the current object +func (m *BookingBusinessesItemGetStaffAvailabilityPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("endDateTime", m.GetEndDateTime()) + if err != nil { + return err + } + } + if m.GetStaffIds() != nil { + err := writer.WriteCollectionOfStringValues("staffIds", m.GetStaffIds()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("startDateTime", m.GetStartDateTime()) + 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 *BookingBusinessesItemGetStaffAvailabilityPostRequestBody) 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 *BookingBusinessesItemGetStaffAvailabilityPostRequestBody) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetEndDateTime sets the endDateTime property value. The endDateTime property +func (m *BookingBusinessesItemGetStaffAvailabilityPostRequestBody) SetEndDateTime(value ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DateTimeTimeZoneable)() { + err := m.GetBackingStore().Set("endDateTime", value) + if err != nil { + panic(err) + } +} +// SetStaffIds sets the staffIds property value. The staffIds property +func (m *BookingBusinessesItemGetStaffAvailabilityPostRequestBody) SetStaffIds(value []string)() { + err := m.GetBackingStore().Set("staffIds", value) + if err != nil { + panic(err) + } +} +// SetStartDateTime sets the startDateTime property value. The startDateTime property +func (m *BookingBusinessesItemGetStaffAvailabilityPostRequestBody) SetStartDateTime(value ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DateTimeTimeZoneable)() { + err := m.GetBackingStore().Set("startDateTime", value) + if err != nil { + panic(err) + } +} +// BookingBusinessesItemGetStaffAvailabilityPostRequestBodyable +type BookingBusinessesItemGetStaffAvailabilityPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetEndDateTime()(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DateTimeTimeZoneable) + GetStaffIds()([]string) + GetStartDateTime()(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DateTimeTimeZoneable) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetEndDateTime(value ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DateTimeTimeZoneable)() + SetStaffIds(value []string)() + SetStartDateTime(value ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.DateTimeTimeZoneable)() +} diff --git a/solutions/booking_businesses_item_get_staff_availability_post_response.go b/solutions/booking_businesses_item_get_staff_availability_post_response.go new file mode 100644 index 00000000000..7a2a1fa3512 --- /dev/null +++ b/solutions/booking_businesses_item_get_staff_availability_post_response.go @@ -0,0 +1,88 @@ +package solutions + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" +) + +// BookingBusinessesItemGetStaffAvailabilityPostResponse +type BookingBusinessesItemGetStaffAvailabilityPostResponse struct { + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BaseCollectionPaginationCountResponse +} +// NewBookingBusinessesItemGetStaffAvailabilityPostResponse instantiates a new BookingBusinessesItemGetStaffAvailabilityPostResponse and sets the default values. +func NewBookingBusinessesItemGetStaffAvailabilityPostResponse()(*BookingBusinessesItemGetStaffAvailabilityPostResponse) { + m := &BookingBusinessesItemGetStaffAvailabilityPostResponse{ + BaseCollectionPaginationCountResponse: *ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateBookingBusinessesItemGetStaffAvailabilityPostResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBookingBusinessesItemGetStaffAvailabilityPostResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBookingBusinessesItemGetStaffAvailabilityPostResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BookingBusinessesItemGetStaffAvailabilityPostResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateStaffAvailabilityItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.StaffAvailabilityItemable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.StaffAvailabilityItemable) + } + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *BookingBusinessesItemGetStaffAvailabilityPostResponse) GetValue()([]ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.StaffAvailabilityItemable) { + val, err := m.GetBackingStore().Get("value") + if err != nil { + panic(err) + } + if val != nil { + return val.([]ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.StaffAvailabilityItemable) + } + return nil +} +// Serialize serializes information the current object +func (m *BookingBusinessesItemGetStaffAvailabilityPostResponse) 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 *BookingBusinessesItemGetStaffAvailabilityPostResponse) SetValue(value []ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.StaffAvailabilityItemable)() { + err := m.GetBackingStore().Set("value", value) + if err != nil { + panic(err) + } +} +// BookingBusinessesItemGetStaffAvailabilityPostResponseable +type BookingBusinessesItemGetStaffAvailabilityPostResponseable interface { + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.StaffAvailabilityItemable) + SetValue(value []ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.StaffAvailabilityItemable)() +} diff --git a/solutions/booking_businesses_item_get_staff_availability_request_builder.go b/solutions/booking_businesses_item_get_staff_availability_request_builder.go new file mode 100644 index 00000000000..5fd1cfa4784 --- /dev/null +++ b/solutions/booking_businesses_item_get_staff_availability_request_builder.go @@ -0,0 +1,95 @@ +package solutions + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// BookingBusinessesItemGetStaffAvailabilityRequestBuilder provides operations to call the getStaffAvailability method. +type BookingBusinessesItemGetStaffAvailabilityRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// BookingBusinessesItemGetStaffAvailabilityRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type BookingBusinessesItemGetStaffAvailabilityRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewBookingBusinessesItemGetStaffAvailabilityRequestBuilderInternal instantiates a new GetStaffAvailabilityRequestBuilder and sets the default values. +func NewBookingBusinessesItemGetStaffAvailabilityRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BookingBusinessesItemGetStaffAvailabilityRequestBuilder) { + m := &BookingBusinessesItemGetStaffAvailabilityRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/solutions/bookingBusinesses/{bookingBusiness%2Did}/getStaffAvailability", pathParameters), + } + return m +} +// NewBookingBusinessesItemGetStaffAvailabilityRequestBuilder instantiates a new GetStaffAvailabilityRequestBuilder and sets the default values. +func NewBookingBusinessesItemGetStaffAvailabilityRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BookingBusinessesItemGetStaffAvailabilityRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewBookingBusinessesItemGetStaffAvailabilityRequestBuilderInternal(urlParams, requestAdapter) +} +// Post get the availability information of staff members of a Microsoft Bookings calendar. +// Deprecated: This method is obsolete. Use PostAsGetStaffAvailabilityPostResponse instead. +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/bookingbusiness-getstaffavailability?view=graph-rest-1.0 +func (m *BookingBusinessesItemGetStaffAvailabilityRequestBuilder) Post(ctx context.Context, body BookingBusinessesItemGetStaffAvailabilityPostRequestBodyable, requestConfiguration *BookingBusinessesItemGetStaffAvailabilityRequestBuilderPostRequestConfiguration)(BookingBusinessesItemGetStaffAvailabilityResponseable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateBookingBusinessesItemGetStaffAvailabilityResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(BookingBusinessesItemGetStaffAvailabilityResponseable), nil +} +// PostAsGetStaffAvailabilityPostResponse get the availability information of staff members of a Microsoft Bookings calendar. +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/bookingbusiness-getstaffavailability?view=graph-rest-1.0 +func (m *BookingBusinessesItemGetStaffAvailabilityRequestBuilder) PostAsGetStaffAvailabilityPostResponse(ctx context.Context, body BookingBusinessesItemGetStaffAvailabilityPostRequestBodyable, requestConfiguration *BookingBusinessesItemGetStaffAvailabilityRequestBuilderPostRequestConfiguration)(BookingBusinessesItemGetStaffAvailabilityPostResponseable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateBookingBusinessesItemGetStaffAvailabilityPostResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(BookingBusinessesItemGetStaffAvailabilityPostResponseable), nil +} +// ToPostRequestInformation get the availability information of staff members of a Microsoft Bookings calendar. +func (m *BookingBusinessesItemGetStaffAvailabilityRequestBuilder) ToPostRequestInformation(ctx context.Context, body BookingBusinessesItemGetStaffAvailabilityPostRequestBodyable, requestConfiguration *BookingBusinessesItemGetStaffAvailabilityRequestBuilderPostRequestConfiguration)(*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. +func (m *BookingBusinessesItemGetStaffAvailabilityRequestBuilder) WithUrl(rawUrl string)(*BookingBusinessesItemGetStaffAvailabilityRequestBuilder) { + return NewBookingBusinessesItemGetStaffAvailabilityRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/solutions/booking_businesses_item_get_staff_availability_response.go b/solutions/booking_businesses_item_get_staff_availability_response.go new file mode 100644 index 00000000000..f5d5cd11b29 --- /dev/null +++ b/solutions/booking_businesses_item_get_staff_availability_response.go @@ -0,0 +1,28 @@ +package solutions + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BookingBusinessesItemGetStaffAvailabilityResponse +// Deprecated: This class is obsolete. Use getStaffAvailabilityPostResponse instead. +type BookingBusinessesItemGetStaffAvailabilityResponse struct { + BookingBusinessesItemGetStaffAvailabilityPostResponse +} +// NewBookingBusinessesItemGetStaffAvailabilityResponse instantiates a new BookingBusinessesItemGetStaffAvailabilityResponse and sets the default values. +func NewBookingBusinessesItemGetStaffAvailabilityResponse()(*BookingBusinessesItemGetStaffAvailabilityResponse) { + m := &BookingBusinessesItemGetStaffAvailabilityResponse{ + BookingBusinessesItemGetStaffAvailabilityPostResponse: *NewBookingBusinessesItemGetStaffAvailabilityPostResponse(), + } + return m +} +// CreateBookingBusinessesItemGetStaffAvailabilityResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBookingBusinessesItemGetStaffAvailabilityResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBookingBusinessesItemGetStaffAvailabilityResponse(), nil +} +// BookingBusinessesItemGetStaffAvailabilityResponseable +// Deprecated: This class is obsolete. Use getStaffAvailabilityPostResponse instead. +type BookingBusinessesItemGetStaffAvailabilityResponseable interface { + BookingBusinessesItemGetStaffAvailabilityPostResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/solutions/booking_businesses_item_publish_request_builder.go b/solutions/booking_businesses_item_publish_request_builder.go new file mode 100644 index 00000000000..fa08d419fb4 --- /dev/null +++ b/solutions/booking_businesses_item_publish_request_builder.go @@ -0,0 +1,65 @@ +package solutions + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// BookingBusinessesItemPublishRequestBuilder provides operations to call the publish method. +type BookingBusinessesItemPublishRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// BookingBusinessesItemPublishRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type BookingBusinessesItemPublishRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewBookingBusinessesItemPublishRequestBuilderInternal instantiates a new PublishRequestBuilder and sets the default values. +func NewBookingBusinessesItemPublishRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BookingBusinessesItemPublishRequestBuilder) { + m := &BookingBusinessesItemPublishRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/solutions/bookingBusinesses/{bookingBusiness%2Did}/publish", pathParameters), + } + return m +} +// NewBookingBusinessesItemPublishRequestBuilder instantiates a new PublishRequestBuilder and sets the default values. +func NewBookingBusinessesItemPublishRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BookingBusinessesItemPublishRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewBookingBusinessesItemPublishRequestBuilderInternal(urlParams, requestAdapter) +} +// Post make the scheduling page of this business available to external customers. Set the isPublished property to true, and publicUrl property to the URL of the scheduling page. +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/bookingbusiness-publish?view=graph-rest-1.0 +func (m *BookingBusinessesItemPublishRequestBuilder) Post(ctx context.Context, requestConfiguration *BookingBusinessesItemPublishRequestBuilderPostRequestConfiguration)(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation make the scheduling page of this business available to external customers. Set the isPublished property to true, and publicUrl property to the URL of the scheduling page. +func (m *BookingBusinessesItemPublishRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *BookingBusinessesItemPublishRequestBuilderPostRequestConfiguration)(*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. +func (m *BookingBusinessesItemPublishRequestBuilder) WithUrl(rawUrl string)(*BookingBusinessesItemPublishRequestBuilder) { + return NewBookingBusinessesItemPublishRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/solutions/booking_businesses_item_services_booking_service_item_request_builder.go b/solutions/booking_businesses_item_services_booking_service_item_request_builder.go new file mode 100644 index 00000000000..a1ebb1108a6 --- /dev/null +++ b/solutions/booking_businesses_item_services_booking_service_item_request_builder.go @@ -0,0 +1,160 @@ +package solutions + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// BookingBusinessesItemServicesBookingServiceItemRequestBuilder provides operations to manage the services property of the microsoft.graph.bookingBusiness entity. +type BookingBusinessesItemServicesBookingServiceItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// BookingBusinessesItemServicesBookingServiceItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type BookingBusinessesItemServicesBookingServiceItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// BookingBusinessesItemServicesBookingServiceItemRequestBuilderGetQueryParameters get the properties and relationships of a bookingService object in the specified bookingBusiness. +type BookingBusinessesItemServicesBookingServiceItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// BookingBusinessesItemServicesBookingServiceItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type BookingBusinessesItemServicesBookingServiceItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *BookingBusinessesItemServicesBookingServiceItemRequestBuilderGetQueryParameters +} +// BookingBusinessesItemServicesBookingServiceItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type BookingBusinessesItemServicesBookingServiceItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewBookingBusinessesItemServicesBookingServiceItemRequestBuilderInternal instantiates a new BookingServiceItemRequestBuilder and sets the default values. +func NewBookingBusinessesItemServicesBookingServiceItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BookingBusinessesItemServicesBookingServiceItemRequestBuilder) { + m := &BookingBusinessesItemServicesBookingServiceItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/solutions/bookingBusinesses/{bookingBusiness%2Did}/services/{bookingService%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewBookingBusinessesItemServicesBookingServiceItemRequestBuilder instantiates a new BookingServiceItemRequestBuilder and sets the default values. +func NewBookingBusinessesItemServicesBookingServiceItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BookingBusinessesItemServicesBookingServiceItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewBookingBusinessesItemServicesBookingServiceItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete a bookingService object in the specified bookingBusiness. +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/bookingservice-delete?view=graph-rest-1.0 +func (m *BookingBusinessesItemServicesBookingServiceItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *BookingBusinessesItemServicesBookingServiceItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get get the properties and relationships of a bookingService object in the specified bookingBusiness. +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/bookingservice-get?view=graph-rest-1.0 +func (m *BookingBusinessesItemServicesBookingServiceItemRequestBuilder) Get(ctx context.Context, requestConfiguration *BookingBusinessesItemServicesBookingServiceItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingServiceable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateBookingServiceFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingServiceable), nil +} +// Patch update the properties of a bookingService object in the specified bookingBusiness. The following are some examples you can customize for a service:- Price- Typical length of an appointment- Reminders- Any, time buffer to set up before or finish up after the service- Scheduling policy parameters such as minimum notice to book or cancel, and whether customers can select specific staff members for an appointment. +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/bookingservice-update?view=graph-rest-1.0 +func (m *BookingBusinessesItemServicesBookingServiceItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingServiceable, requestConfiguration *BookingBusinessesItemServicesBookingServiceItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingServiceable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateBookingServiceFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingServiceable), nil +} +// ToDeleteRequestInformation delete a bookingService object in the specified bookingBusiness. +func (m *BookingBusinessesItemServicesBookingServiceItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *BookingBusinessesItemServicesBookingServiceItemRequestBuilderDeleteRequestConfiguration)(*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 the properties and relationships of a bookingService object in the specified bookingBusiness. +func (m *BookingBusinessesItemServicesBookingServiceItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *BookingBusinessesItemServicesBookingServiceItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation update the properties of a bookingService object in the specified bookingBusiness. The following are some examples you can customize for a service:- Price- Typical length of an appointment- Reminders- Any, time buffer to set up before or finish up after the service- Scheduling policy parameters such as minimum notice to book or cancel, and whether customers can select specific staff members for an appointment. +func (m *BookingBusinessesItemServicesBookingServiceItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingServiceable, requestConfiguration *BookingBusinessesItemServicesBookingServiceItemRequestBuilderPatchRequestConfiguration)(*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. +func (m *BookingBusinessesItemServicesBookingServiceItemRequestBuilder) WithUrl(rawUrl string)(*BookingBusinessesItemServicesBookingServiceItemRequestBuilder) { + return NewBookingBusinessesItemServicesBookingServiceItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/solutions/booking_businesses_item_services_count_request_builder.go b/solutions/booking_businesses_item_services_count_request_builder.go new file mode 100644 index 00000000000..e8d9f1fbeb3 --- /dev/null +++ b/solutions/booking_businesses_item_services_count_request_builder.go @@ -0,0 +1,77 @@ +package solutions + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// BookingBusinessesItemServicesCountRequestBuilder provides operations to count the resources in the collection. +type BookingBusinessesItemServicesCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// BookingBusinessesItemServicesCountRequestBuilderGetQueryParameters get the number of the resource +type BookingBusinessesItemServicesCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// BookingBusinessesItemServicesCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type BookingBusinessesItemServicesCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *BookingBusinessesItemServicesCountRequestBuilderGetQueryParameters +} +// NewBookingBusinessesItemServicesCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewBookingBusinessesItemServicesCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BookingBusinessesItemServicesCountRequestBuilder) { + m := &BookingBusinessesItemServicesCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/solutions/bookingBusinesses/{bookingBusiness%2Did}/services/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewBookingBusinessesItemServicesCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewBookingBusinessesItemServicesCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BookingBusinessesItemServicesCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewBookingBusinessesItemServicesCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *BookingBusinessesItemServicesCountRequestBuilder) Get(ctx context.Context, requestConfiguration *BookingBusinessesItemServicesCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *BookingBusinessesItemServicesCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *BookingBusinessesItemServicesCountRequestBuilderGetRequestConfiguration)(*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. +func (m *BookingBusinessesItemServicesCountRequestBuilder) WithUrl(rawUrl string)(*BookingBusinessesItemServicesCountRequestBuilder) { + return NewBookingBusinessesItemServicesCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/solutions/booking_businesses_item_services_request_builder.go b/solutions/booking_businesses_item_services_request_builder.go new file mode 100644 index 00000000000..9c546f18ff2 --- /dev/null +++ b/solutions/booking_businesses_item_services_request_builder.go @@ -0,0 +1,151 @@ +package solutions + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// BookingBusinessesItemServicesRequestBuilder provides operations to manage the services property of the microsoft.graph.bookingBusiness entity. +type BookingBusinessesItemServicesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// BookingBusinessesItemServicesRequestBuilderGetQueryParameters get a list of bookingService objects in the specified bookingBusiness. +type BookingBusinessesItemServicesRequestBuilderGetQueryParameters 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"` +} +// BookingBusinessesItemServicesRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type BookingBusinessesItemServicesRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *BookingBusinessesItemServicesRequestBuilderGetQueryParameters +} +// BookingBusinessesItemServicesRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type BookingBusinessesItemServicesRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByBookingServiceId provides operations to manage the services property of the microsoft.graph.bookingBusiness entity. +func (m *BookingBusinessesItemServicesRequestBuilder) ByBookingServiceId(bookingServiceId string)(*BookingBusinessesItemServicesBookingServiceItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if bookingServiceId != "" { + urlTplParams["bookingService%2Did"] = bookingServiceId + } + return NewBookingBusinessesItemServicesBookingServiceItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewBookingBusinessesItemServicesRequestBuilderInternal instantiates a new ServicesRequestBuilder and sets the default values. +func NewBookingBusinessesItemServicesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BookingBusinessesItemServicesRequestBuilder) { + m := &BookingBusinessesItemServicesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/solutions/bookingBusinesses/{bookingBusiness%2Did}/services{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewBookingBusinessesItemServicesRequestBuilder instantiates a new ServicesRequestBuilder and sets the default values. +func NewBookingBusinessesItemServicesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BookingBusinessesItemServicesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewBookingBusinessesItemServicesRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *BookingBusinessesItemServicesRequestBuilder) Count()(*BookingBusinessesItemServicesCountRequestBuilder) { + return NewBookingBusinessesItemServicesCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get get a list of bookingService objects in the specified bookingBusiness. +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/bookingbusiness-list-services?view=graph-rest-1.0 +func (m *BookingBusinessesItemServicesRequestBuilder) Get(ctx context.Context, requestConfiguration *BookingBusinessesItemServicesRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingServiceCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateBookingServiceCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingServiceCollectionResponseable), nil +} +// Post create a new bookingService for the specified bookingBusiness. +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/bookingbusiness-post-services?view=graph-rest-1.0 +func (m *BookingBusinessesItemServicesRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingServiceable, requestConfiguration *BookingBusinessesItemServicesRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingServiceable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateBookingServiceFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingServiceable), nil +} +// ToGetRequestInformation get a list of bookingService objects in the specified bookingBusiness. +func (m *BookingBusinessesItemServicesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *BookingBusinessesItemServicesRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation create a new bookingService for the specified bookingBusiness. +func (m *BookingBusinessesItemServicesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingServiceable, requestConfiguration *BookingBusinessesItemServicesRequestBuilderPostRequestConfiguration)(*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. +func (m *BookingBusinessesItemServicesRequestBuilder) WithUrl(rawUrl string)(*BookingBusinessesItemServicesRequestBuilder) { + return NewBookingBusinessesItemServicesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/solutions/booking_businesses_item_staff_members_booking_staff_member_item_request_builder.go b/solutions/booking_businesses_item_staff_members_booking_staff_member_item_request_builder.go new file mode 100644 index 00000000000..7140bf24a17 --- /dev/null +++ b/solutions/booking_businesses_item_staff_members_booking_staff_member_item_request_builder.go @@ -0,0 +1,160 @@ +package solutions + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// BookingBusinessesItemStaffMembersBookingStaffMemberItemRequestBuilder provides operations to manage the staffMembers property of the microsoft.graph.bookingBusiness entity. +type BookingBusinessesItemStaffMembersBookingStaffMemberItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// BookingBusinessesItemStaffMembersBookingStaffMemberItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type BookingBusinessesItemStaffMembersBookingStaffMemberItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// BookingBusinessesItemStaffMembersBookingStaffMemberItemRequestBuilderGetQueryParameters get the properties and relationships of a bookingStaffMember in the specified bookingBusiness. +type BookingBusinessesItemStaffMembersBookingStaffMemberItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// BookingBusinessesItemStaffMembersBookingStaffMemberItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type BookingBusinessesItemStaffMembersBookingStaffMemberItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *BookingBusinessesItemStaffMembersBookingStaffMemberItemRequestBuilderGetQueryParameters +} +// BookingBusinessesItemStaffMembersBookingStaffMemberItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type BookingBusinessesItemStaffMembersBookingStaffMemberItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewBookingBusinessesItemStaffMembersBookingStaffMemberItemRequestBuilderInternal instantiates a new BookingStaffMemberItemRequestBuilder and sets the default values. +func NewBookingBusinessesItemStaffMembersBookingStaffMemberItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BookingBusinessesItemStaffMembersBookingStaffMemberItemRequestBuilder) { + m := &BookingBusinessesItemStaffMembersBookingStaffMemberItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/solutions/bookingBusinesses/{bookingBusiness%2Did}/staffMembers/{bookingStaffMember%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewBookingBusinessesItemStaffMembersBookingStaffMemberItemRequestBuilder instantiates a new BookingStaffMemberItemRequestBuilder and sets the default values. +func NewBookingBusinessesItemStaffMembersBookingStaffMemberItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BookingBusinessesItemStaffMembersBookingStaffMemberItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewBookingBusinessesItemStaffMembersBookingStaffMemberItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete a staff member in the specified bookingbusiness. +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/bookingstaffmember-delete?view=graph-rest-1.0 +func (m *BookingBusinessesItemStaffMembersBookingStaffMemberItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *BookingBusinessesItemStaffMembersBookingStaffMemberItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get get the properties and relationships of a bookingStaffMember in the specified bookingBusiness. +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/bookingstaffmember-get?view=graph-rest-1.0 +func (m *BookingBusinessesItemStaffMembersBookingStaffMemberItemRequestBuilder) Get(ctx context.Context, requestConfiguration *BookingBusinessesItemStaffMembersBookingStaffMemberItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingStaffMemberable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateBookingStaffMemberFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingStaffMemberable), nil +} +// Patch update the properties of a bookingStaffMember in the specified bookingBusiness. +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/bookingstaffmember-update?view=graph-rest-1.0 +func (m *BookingBusinessesItemStaffMembersBookingStaffMemberItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingStaffMemberable, requestConfiguration *BookingBusinessesItemStaffMembersBookingStaffMemberItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingStaffMemberable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateBookingStaffMemberFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingStaffMemberable), nil +} +// ToDeleteRequestInformation delete a staff member in the specified bookingbusiness. +func (m *BookingBusinessesItemStaffMembersBookingStaffMemberItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *BookingBusinessesItemStaffMembersBookingStaffMemberItemRequestBuilderDeleteRequestConfiguration)(*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 the properties and relationships of a bookingStaffMember in the specified bookingBusiness. +func (m *BookingBusinessesItemStaffMembersBookingStaffMemberItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *BookingBusinessesItemStaffMembersBookingStaffMemberItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPatchRequestInformation update the properties of a bookingStaffMember in the specified bookingBusiness. +func (m *BookingBusinessesItemStaffMembersBookingStaffMemberItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingStaffMemberable, requestConfiguration *BookingBusinessesItemStaffMembersBookingStaffMemberItemRequestBuilderPatchRequestConfiguration)(*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. +func (m *BookingBusinessesItemStaffMembersBookingStaffMemberItemRequestBuilder) WithUrl(rawUrl string)(*BookingBusinessesItemStaffMembersBookingStaffMemberItemRequestBuilder) { + return NewBookingBusinessesItemStaffMembersBookingStaffMemberItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/solutions/booking_businesses_item_staff_members_count_request_builder.go b/solutions/booking_businesses_item_staff_members_count_request_builder.go new file mode 100644 index 00000000000..9d3aa5cdd1a --- /dev/null +++ b/solutions/booking_businesses_item_staff_members_count_request_builder.go @@ -0,0 +1,77 @@ +package solutions + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// BookingBusinessesItemStaffMembersCountRequestBuilder provides operations to count the resources in the collection. +type BookingBusinessesItemStaffMembersCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// BookingBusinessesItemStaffMembersCountRequestBuilderGetQueryParameters get the number of the resource +type BookingBusinessesItemStaffMembersCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// BookingBusinessesItemStaffMembersCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type BookingBusinessesItemStaffMembersCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *BookingBusinessesItemStaffMembersCountRequestBuilderGetQueryParameters +} +// NewBookingBusinessesItemStaffMembersCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewBookingBusinessesItemStaffMembersCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BookingBusinessesItemStaffMembersCountRequestBuilder) { + m := &BookingBusinessesItemStaffMembersCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/solutions/bookingBusinesses/{bookingBusiness%2Did}/staffMembers/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewBookingBusinessesItemStaffMembersCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewBookingBusinessesItemStaffMembersCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BookingBusinessesItemStaffMembersCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewBookingBusinessesItemStaffMembersCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *BookingBusinessesItemStaffMembersCountRequestBuilder) Get(ctx context.Context, requestConfiguration *BookingBusinessesItemStaffMembersCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *BookingBusinessesItemStaffMembersCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *BookingBusinessesItemStaffMembersCountRequestBuilderGetRequestConfiguration)(*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. +func (m *BookingBusinessesItemStaffMembersCountRequestBuilder) WithUrl(rawUrl string)(*BookingBusinessesItemStaffMembersCountRequestBuilder) { + return NewBookingBusinessesItemStaffMembersCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/solutions/booking_businesses_item_staff_members_request_builder.go b/solutions/booking_businesses_item_staff_members_request_builder.go new file mode 100644 index 00000000000..8d0b3dacb97 --- /dev/null +++ b/solutions/booking_businesses_item_staff_members_request_builder.go @@ -0,0 +1,151 @@ +package solutions + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// BookingBusinessesItemStaffMembersRequestBuilder provides operations to manage the staffMembers property of the microsoft.graph.bookingBusiness entity. +type BookingBusinessesItemStaffMembersRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// BookingBusinessesItemStaffMembersRequestBuilderGetQueryParameters get a list of bookingStaffMember objects in the specified bookingBusiness. +type BookingBusinessesItemStaffMembersRequestBuilderGetQueryParameters 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"` +} +// BookingBusinessesItemStaffMembersRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type BookingBusinessesItemStaffMembersRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *BookingBusinessesItemStaffMembersRequestBuilderGetQueryParameters +} +// BookingBusinessesItemStaffMembersRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type BookingBusinessesItemStaffMembersRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByBookingStaffMemberId provides operations to manage the staffMembers property of the microsoft.graph.bookingBusiness entity. +func (m *BookingBusinessesItemStaffMembersRequestBuilder) ByBookingStaffMemberId(bookingStaffMemberId string)(*BookingBusinessesItemStaffMembersBookingStaffMemberItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if bookingStaffMemberId != "" { + urlTplParams["bookingStaffMember%2Did"] = bookingStaffMemberId + } + return NewBookingBusinessesItemStaffMembersBookingStaffMemberItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewBookingBusinessesItemStaffMembersRequestBuilderInternal instantiates a new StaffMembersRequestBuilder and sets the default values. +func NewBookingBusinessesItemStaffMembersRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BookingBusinessesItemStaffMembersRequestBuilder) { + m := &BookingBusinessesItemStaffMembersRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/solutions/bookingBusinesses/{bookingBusiness%2Did}/staffMembers{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewBookingBusinessesItemStaffMembersRequestBuilder instantiates a new StaffMembersRequestBuilder and sets the default values. +func NewBookingBusinessesItemStaffMembersRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BookingBusinessesItemStaffMembersRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewBookingBusinessesItemStaffMembersRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *BookingBusinessesItemStaffMembersRequestBuilder) Count()(*BookingBusinessesItemStaffMembersCountRequestBuilder) { + return NewBookingBusinessesItemStaffMembersCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get get a list of bookingStaffMember objects in the specified bookingBusiness. +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/bookingbusiness-list-staffmembers?view=graph-rest-1.0 +func (m *BookingBusinessesItemStaffMembersRequestBuilder) Get(ctx context.Context, requestConfiguration *BookingBusinessesItemStaffMembersRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingStaffMemberCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateBookingStaffMemberCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingStaffMemberCollectionResponseable), nil +} +// Post create a new staff member in the specified bookingBusiness. +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/bookingbusiness-post-staffmembers?view=graph-rest-1.0 +func (m *BookingBusinessesItemStaffMembersRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingStaffMemberable, requestConfiguration *BookingBusinessesItemStaffMembersRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingStaffMemberable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateBookingStaffMemberFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingStaffMemberable), nil +} +// ToGetRequestInformation get a list of bookingStaffMember objects in the specified bookingBusiness. +func (m *BookingBusinessesItemStaffMembersRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *BookingBusinessesItemStaffMembersRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation create a new staff member in the specified bookingBusiness. +func (m *BookingBusinessesItemStaffMembersRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingStaffMemberable, requestConfiguration *BookingBusinessesItemStaffMembersRequestBuilderPostRequestConfiguration)(*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. +func (m *BookingBusinessesItemStaffMembersRequestBuilder) WithUrl(rawUrl string)(*BookingBusinessesItemStaffMembersRequestBuilder) { + return NewBookingBusinessesItemStaffMembersRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/solutions/booking_businesses_item_unpublish_request_builder.go b/solutions/booking_businesses_item_unpublish_request_builder.go new file mode 100644 index 00000000000..66dab8eb39e --- /dev/null +++ b/solutions/booking_businesses_item_unpublish_request_builder.go @@ -0,0 +1,65 @@ +package solutions + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// BookingBusinessesItemUnpublishRequestBuilder provides operations to call the unpublish method. +type BookingBusinessesItemUnpublishRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// BookingBusinessesItemUnpublishRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type BookingBusinessesItemUnpublishRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewBookingBusinessesItemUnpublishRequestBuilderInternal instantiates a new UnpublishRequestBuilder and sets the default values. +func NewBookingBusinessesItemUnpublishRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BookingBusinessesItemUnpublishRequestBuilder) { + m := &BookingBusinessesItemUnpublishRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/solutions/bookingBusinesses/{bookingBusiness%2Did}/unpublish", pathParameters), + } + return m +} +// NewBookingBusinessesItemUnpublishRequestBuilder instantiates a new UnpublishRequestBuilder and sets the default values. +func NewBookingBusinessesItemUnpublishRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BookingBusinessesItemUnpublishRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewBookingBusinessesItemUnpublishRequestBuilderInternal(urlParams, requestAdapter) +} +// Post make the scheduling page of this business not available to external customers. Set the isPublished property to false, and publicUrl property to null. +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/bookingbusiness-unpublish?view=graph-rest-1.0 +func (m *BookingBusinessesItemUnpublishRequestBuilder) Post(ctx context.Context, requestConfiguration *BookingBusinessesItemUnpublishRequestBuilderPostRequestConfiguration)(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation make the scheduling page of this business not available to external customers. Set the isPublished property to false, and publicUrl property to null. +func (m *BookingBusinessesItemUnpublishRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *BookingBusinessesItemUnpublishRequestBuilderPostRequestConfiguration)(*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. +func (m *BookingBusinessesItemUnpublishRequestBuilder) WithUrl(rawUrl string)(*BookingBusinessesItemUnpublishRequestBuilder) { + return NewBookingBusinessesItemUnpublishRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/solutions/booking_businesses_request_builder.go b/solutions/booking_businesses_request_builder.go new file mode 100644 index 00000000000..69a89d3a61a --- /dev/null +++ b/solutions/booking_businesses_request_builder.go @@ -0,0 +1,145 @@ +package solutions + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// BookingBusinessesRequestBuilder provides operations to manage the bookingBusinesses property of the microsoft.graph.solutionsRoot entity. +type BookingBusinessesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// BookingBusinessesRequestBuilderGetQueryParameters get bookingBusinesses from solutions +type BookingBusinessesRequestBuilderGetQueryParameters 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"` +} +// BookingBusinessesRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type BookingBusinessesRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *BookingBusinessesRequestBuilderGetQueryParameters +} +// BookingBusinessesRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type BookingBusinessesRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByBookingBusinessId provides operations to manage the bookingBusinesses property of the microsoft.graph.solutionsRoot entity. +func (m *BookingBusinessesRequestBuilder) ByBookingBusinessId(bookingBusinessId string)(*BookingBusinessesBookingBusinessItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if bookingBusinessId != "" { + urlTplParams["bookingBusiness%2Did"] = bookingBusinessId + } + return NewBookingBusinessesBookingBusinessItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewBookingBusinessesRequestBuilderInternal instantiates a new BookingBusinessesRequestBuilder and sets the default values. +func NewBookingBusinessesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BookingBusinessesRequestBuilder) { + m := &BookingBusinessesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/solutions/bookingBusinesses{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewBookingBusinessesRequestBuilder instantiates a new BookingBusinessesRequestBuilder and sets the default values. +func NewBookingBusinessesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BookingBusinessesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewBookingBusinessesRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *BookingBusinessesRequestBuilder) Count()(*BookingBusinessesCountRequestBuilder) { + return NewBookingBusinessesCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get get bookingBusinesses from solutions +func (m *BookingBusinessesRequestBuilder) Get(ctx context.Context, requestConfiguration *BookingBusinessesRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingBusinessCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateBookingBusinessCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingBusinessCollectionResponseable), nil +} +// Post create new navigation property to bookingBusinesses for solutions +func (m *BookingBusinessesRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingBusinessable, requestConfiguration *BookingBusinessesRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingBusinessable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateBookingBusinessFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingBusinessable), nil +} +// ToGetRequestInformation get bookingBusinesses from solutions +func (m *BookingBusinessesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *BookingBusinessesRequestBuilderGetRequestConfiguration)(*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 bookingBusinesses for solutions +func (m *BookingBusinessesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingBusinessable, requestConfiguration *BookingBusinessesRequestBuilderPostRequestConfiguration)(*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. +func (m *BookingBusinessesRequestBuilder) WithUrl(rawUrl string)(*BookingBusinessesRequestBuilder) { + return NewBookingBusinessesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/solutions/booking_currencies_booking_currency_item_request_builder.go b/solutions/booking_currencies_booking_currency_item_request_builder.go new file mode 100644 index 00000000000..773fd0c2d41 --- /dev/null +++ b/solutions/booking_currencies_booking_currency_item_request_builder.go @@ -0,0 +1,151 @@ +package solutions + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// BookingCurrenciesBookingCurrencyItemRequestBuilder provides operations to manage the bookingCurrencies property of the microsoft.graph.solutionsRoot entity. +type BookingCurrenciesBookingCurrencyItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// BookingCurrenciesBookingCurrencyItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type BookingCurrenciesBookingCurrencyItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// BookingCurrenciesBookingCurrencyItemRequestBuilderGetQueryParameters get bookingCurrencies from solutions +type BookingCurrenciesBookingCurrencyItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string `uriparametername:"%24expand"` + // Select properties to be returned + Select []string `uriparametername:"%24select"` +} +// BookingCurrenciesBookingCurrencyItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type BookingCurrenciesBookingCurrencyItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *BookingCurrenciesBookingCurrencyItemRequestBuilderGetQueryParameters +} +// BookingCurrenciesBookingCurrencyItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type BookingCurrenciesBookingCurrencyItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewBookingCurrenciesBookingCurrencyItemRequestBuilderInternal instantiates a new BookingCurrencyItemRequestBuilder and sets the default values. +func NewBookingCurrenciesBookingCurrencyItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BookingCurrenciesBookingCurrencyItemRequestBuilder) { + m := &BookingCurrenciesBookingCurrencyItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/solutions/bookingCurrencies/{bookingCurrency%2Did}{?%24select,%24expand}", pathParameters), + } + return m +} +// NewBookingCurrenciesBookingCurrencyItemRequestBuilder instantiates a new BookingCurrencyItemRequestBuilder and sets the default values. +func NewBookingCurrenciesBookingCurrencyItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BookingCurrenciesBookingCurrencyItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewBookingCurrenciesBookingCurrencyItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property bookingCurrencies for solutions +func (m *BookingCurrenciesBookingCurrencyItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *BookingCurrenciesBookingCurrencyItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get get bookingCurrencies from solutions +func (m *BookingCurrenciesBookingCurrencyItemRequestBuilder) Get(ctx context.Context, requestConfiguration *BookingCurrenciesBookingCurrencyItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingCurrencyable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateBookingCurrencyFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingCurrencyable), nil +} +// Patch update the navigation property bookingCurrencies in solutions +func (m *BookingCurrenciesBookingCurrencyItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingCurrencyable, requestConfiguration *BookingCurrenciesBookingCurrencyItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingCurrencyable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateBookingCurrencyFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingCurrencyable), nil +} +// ToDeleteRequestInformation delete navigation property bookingCurrencies for solutions +func (m *BookingCurrenciesBookingCurrencyItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *BookingCurrenciesBookingCurrencyItemRequestBuilderDeleteRequestConfiguration)(*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 bookingCurrencies from solutions +func (m *BookingCurrenciesBookingCurrencyItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *BookingCurrenciesBookingCurrencyItemRequestBuilderGetRequestConfiguration)(*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 bookingCurrencies in solutions +func (m *BookingCurrenciesBookingCurrencyItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingCurrencyable, requestConfiguration *BookingCurrenciesBookingCurrencyItemRequestBuilderPatchRequestConfiguration)(*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. +func (m *BookingCurrenciesBookingCurrencyItemRequestBuilder) WithUrl(rawUrl string)(*BookingCurrenciesBookingCurrencyItemRequestBuilder) { + return NewBookingCurrenciesBookingCurrencyItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/solutions/booking_currencies_count_request_builder.go b/solutions/booking_currencies_count_request_builder.go new file mode 100644 index 00000000000..c6950c5fe39 --- /dev/null +++ b/solutions/booking_currencies_count_request_builder.go @@ -0,0 +1,77 @@ +package solutions + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// BookingCurrenciesCountRequestBuilder provides operations to count the resources in the collection. +type BookingCurrenciesCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// BookingCurrenciesCountRequestBuilderGetQueryParameters get the number of the resource +type BookingCurrenciesCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string `uriparametername:"%24filter"` + // Search items by search phrases + Search *string `uriparametername:"%24search"` +} +// BookingCurrenciesCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type BookingCurrenciesCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *BookingCurrenciesCountRequestBuilderGetQueryParameters +} +// NewBookingCurrenciesCountRequestBuilderInternal instantiates a new CountRequestBuilder and sets the default values. +func NewBookingCurrenciesCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BookingCurrenciesCountRequestBuilder) { + m := &BookingCurrenciesCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/solutions/bookingCurrencies/$count{?%24search,%24filter}", pathParameters), + } + return m +} +// NewBookingCurrenciesCountRequestBuilder instantiates a new CountRequestBuilder and sets the default values. +func NewBookingCurrenciesCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BookingCurrenciesCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewBookingCurrenciesCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +func (m *BookingCurrenciesCountRequestBuilder) Get(ctx context.Context, requestConfiguration *BookingCurrenciesCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +func (m *BookingCurrenciesCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *BookingCurrenciesCountRequestBuilderGetRequestConfiguration)(*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. +func (m *BookingCurrenciesCountRequestBuilder) WithUrl(rawUrl string)(*BookingCurrenciesCountRequestBuilder) { + return NewBookingCurrenciesCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/solutions/booking_currencies_request_builder.go b/solutions/booking_currencies_request_builder.go new file mode 100644 index 00000000000..36c94817bb5 --- /dev/null +++ b/solutions/booking_currencies_request_builder.go @@ -0,0 +1,145 @@ +package solutions + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// BookingCurrenciesRequestBuilder provides operations to manage the bookingCurrencies property of the microsoft.graph.solutionsRoot entity. +type BookingCurrenciesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// BookingCurrenciesRequestBuilderGetQueryParameters get bookingCurrencies from solutions +type BookingCurrenciesRequestBuilderGetQueryParameters 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"` +} +// BookingCurrenciesRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type BookingCurrenciesRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *BookingCurrenciesRequestBuilderGetQueryParameters +} +// BookingCurrenciesRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type BookingCurrenciesRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByBookingCurrencyId provides operations to manage the bookingCurrencies property of the microsoft.graph.solutionsRoot entity. +func (m *BookingCurrenciesRequestBuilder) ByBookingCurrencyId(bookingCurrencyId string)(*BookingCurrenciesBookingCurrencyItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if bookingCurrencyId != "" { + urlTplParams["bookingCurrency%2Did"] = bookingCurrencyId + } + return NewBookingCurrenciesBookingCurrencyItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewBookingCurrenciesRequestBuilderInternal instantiates a new BookingCurrenciesRequestBuilder and sets the default values. +func NewBookingCurrenciesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BookingCurrenciesRequestBuilder) { + m := &BookingCurrenciesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/solutions/bookingCurrencies{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters), + } + return m +} +// NewBookingCurrenciesRequestBuilder instantiates a new BookingCurrenciesRequestBuilder and sets the default values. +func NewBookingCurrenciesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*BookingCurrenciesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewBookingCurrenciesRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +func (m *BookingCurrenciesRequestBuilder) Count()(*BookingCurrenciesCountRequestBuilder) { + return NewBookingCurrenciesCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get get bookingCurrencies from solutions +func (m *BookingCurrenciesRequestBuilder) Get(ctx context.Context, requestConfiguration *BookingCurrenciesRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingCurrencyCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateBookingCurrencyCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingCurrencyCollectionResponseable), nil +} +// Post create new navigation property to bookingCurrencies for solutions +func (m *BookingCurrenciesRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingCurrencyable, requestConfiguration *BookingCurrenciesRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingCurrencyable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateBookingCurrencyFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingCurrencyable), nil +} +// ToGetRequestInformation get bookingCurrencies from solutions +func (m *BookingCurrenciesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *BookingCurrenciesRequestBuilderGetRequestConfiguration)(*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 bookingCurrencies for solutions +func (m *BookingCurrenciesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.BookingCurrencyable, requestConfiguration *BookingCurrenciesRequestBuilderPostRequestConfiguration)(*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. +func (m *BookingCurrenciesRequestBuilder) WithUrl(rawUrl string)(*BookingCurrenciesRequestBuilder) { + return NewBookingCurrenciesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/solutions/solutions_request_builder.go b/solutions/solutions_request_builder.go index a376cd4b031..d9ad8adfe44 100644 --- a/solutions/solutions_request_builder.go +++ b/solutions/solutions_request_builder.go @@ -34,6 +34,14 @@ type SolutionsRequestBuilderPatchRequestConfiguration struct { // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } +// BookingBusinesses provides operations to manage the bookingBusinesses property of the microsoft.graph.solutionsRoot entity. +func (m *SolutionsRequestBuilder) BookingBusinesses()(*BookingBusinessesRequestBuilder) { + return NewBookingBusinessesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// BookingCurrencies provides operations to manage the bookingCurrencies property of the microsoft.graph.solutionsRoot entity. +func (m *SolutionsRequestBuilder) BookingCurrencies()(*BookingCurrenciesRequestBuilder) { + return NewBookingCurrenciesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // BusinessScenarios provides operations to manage the businessScenarios property of the microsoft.graph.solutionsRoot entity. func (m *SolutionsRequestBuilder) BusinessScenarios()(*BusinessScenariosRequestBuilder) { return NewBusinessScenariosRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) diff --git a/solutions/virtual_events_events_item_presenters_request_builder.go b/solutions/virtual_events_events_item_presenters_request_builder.go index 94df66998dd..f4fa9561ce6 100644 --- a/solutions/virtual_events_events_item_presenters_request_builder.go +++ b/solutions/virtual_events_events_item_presenters_request_builder.go @@ -11,7 +11,7 @@ import ( type VirtualEventsEventsItemPresentersRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// VirtualEventsEventsItemPresentersRequestBuilderGetQueryParameters presenters' information of the virtual event. +// VirtualEventsEventsItemPresentersRequestBuilderGetQueryParameters the virtual event presenters. type VirtualEventsEventsItemPresentersRequestBuilderGetQueryParameters struct { // Include count of items Count *bool `uriparametername:"%24count"` @@ -74,7 +74,7 @@ func NewVirtualEventsEventsItemPresentersRequestBuilder(rawUrl string, requestAd func (m *VirtualEventsEventsItemPresentersRequestBuilder) Count()(*VirtualEventsEventsItemPresentersCountRequestBuilder) { return NewVirtualEventsEventsItemPresentersCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Get presenters' information of the virtual event. +// Get the virtual event presenters. func (m *VirtualEventsEventsItemPresentersRequestBuilder) Get(ctx context.Context, requestConfiguration *VirtualEventsEventsItemPresentersRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualEventPresenterCollectionResponseable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -112,7 +112,7 @@ func (m *VirtualEventsEventsItemPresentersRequestBuilder) Post(ctx context.Conte } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualEventPresenterable), nil } -// ToGetRequestInformation presenters' information of the virtual event. +// ToGetRequestInformation the virtual event presenters. func (m *VirtualEventsEventsItemPresentersRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *VirtualEventsEventsItemPresentersRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/solutions/virtual_events_events_item_presenters_virtual_event_presenter_item_request_builder.go b/solutions/virtual_events_events_item_presenters_virtual_event_presenter_item_request_builder.go index a1845b4668a..5853c7c1b28 100644 --- a/solutions/virtual_events_events_item_presenters_virtual_event_presenter_item_request_builder.go +++ b/solutions/virtual_events_events_item_presenters_virtual_event_presenter_item_request_builder.go @@ -18,7 +18,7 @@ type VirtualEventsEventsItemPresentersVirtualEventPresenterItemRequestBuilderDel // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// VirtualEventsEventsItemPresentersVirtualEventPresenterItemRequestBuilderGetQueryParameters presenters' information of the virtual event. +// VirtualEventsEventsItemPresentersVirtualEventPresenterItemRequestBuilderGetQueryParameters the virtual event presenters. type VirtualEventsEventsItemPresentersVirtualEventPresenterItemRequestBuilderGetQueryParameters struct { // Expand related entities Expand []string `uriparametername:"%24expand"` @@ -70,7 +70,7 @@ func (m *VirtualEventsEventsItemPresentersVirtualEventPresenterItemRequestBuilde } return nil } -// Get presenters' information of the virtual event. +// Get the virtual event presenters. func (m *VirtualEventsEventsItemPresentersVirtualEventPresenterItemRequestBuilder) Get(ctx context.Context, requestConfiguration *VirtualEventsEventsItemPresentersVirtualEventPresenterItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualEventPresenterable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -126,7 +126,7 @@ func (m *VirtualEventsEventsItemPresentersVirtualEventPresenterItemRequestBuilde requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToGetRequestInformation presenters' information of the virtual event. +// ToGetRequestInformation the virtual event presenters. func (m *VirtualEventsEventsItemPresentersVirtualEventPresenterItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *VirtualEventsEventsItemPresentersVirtualEventPresenterItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/solutions/virtual_events_events_item_sessions_request_builder.go b/solutions/virtual_events_events_item_sessions_request_builder.go index 6cddf7fc38a..d9fecc46de5 100644 --- a/solutions/virtual_events_events_item_sessions_request_builder.go +++ b/solutions/virtual_events_events_item_sessions_request_builder.go @@ -11,7 +11,7 @@ import ( type VirtualEventsEventsItemSessionsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// VirtualEventsEventsItemSessionsRequestBuilderGetQueryParameters sessions of the virtual event. +// VirtualEventsEventsItemSessionsRequestBuilderGetQueryParameters sessions for the virtual event. type VirtualEventsEventsItemSessionsRequestBuilderGetQueryParameters struct { // Include count of items Count *bool `uriparametername:"%24count"` @@ -74,7 +74,7 @@ func NewVirtualEventsEventsItemSessionsRequestBuilder(rawUrl string, requestAdap func (m *VirtualEventsEventsItemSessionsRequestBuilder) Count()(*VirtualEventsEventsItemSessionsCountRequestBuilder) { return NewVirtualEventsEventsItemSessionsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Get sessions of the virtual event. +// Get sessions for the virtual event. func (m *VirtualEventsEventsItemSessionsRequestBuilder) Get(ctx context.Context, requestConfiguration *VirtualEventsEventsItemSessionsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualEventSessionCollectionResponseable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -112,7 +112,7 @@ func (m *VirtualEventsEventsItemSessionsRequestBuilder) Post(ctx context.Context } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualEventSessionable), nil } -// ToGetRequestInformation sessions of the virtual event. +// ToGetRequestInformation sessions for the virtual event. func (m *VirtualEventsEventsItemSessionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *VirtualEventsEventsItemSessionsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/solutions/virtual_events_events_item_sessions_virtual_event_session_item_request_builder.go b/solutions/virtual_events_events_item_sessions_virtual_event_session_item_request_builder.go index 4977f2628df..55683317b98 100644 --- a/solutions/virtual_events_events_item_sessions_virtual_event_session_item_request_builder.go +++ b/solutions/virtual_events_events_item_sessions_virtual_event_session_item_request_builder.go @@ -18,7 +18,7 @@ type VirtualEventsEventsItemSessionsVirtualEventSessionItemRequestBuilderDeleteR // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// VirtualEventsEventsItemSessionsVirtualEventSessionItemRequestBuilderGetQueryParameters sessions of the virtual event. +// VirtualEventsEventsItemSessionsVirtualEventSessionItemRequestBuilderGetQueryParameters sessions for the virtual event. type VirtualEventsEventsItemSessionsVirtualEventSessionItemRequestBuilderGetQueryParameters struct { // Expand related entities Expand []string `uriparametername:"%24expand"` @@ -74,7 +74,7 @@ func (m *VirtualEventsEventsItemSessionsVirtualEventSessionItemRequestBuilder) D } return nil } -// Get sessions of the virtual event. +// Get sessions for the virtual event. func (m *VirtualEventsEventsItemSessionsVirtualEventSessionItemRequestBuilder) Get(ctx context.Context, requestConfiguration *VirtualEventsEventsItemSessionsVirtualEventSessionItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualEventSessionable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -130,7 +130,7 @@ func (m *VirtualEventsEventsItemSessionsVirtualEventSessionItemRequestBuilder) T requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToGetRequestInformation sessions of the virtual event. +// ToGetRequestInformation sessions for the virtual event. func (m *VirtualEventsEventsItemSessionsVirtualEventSessionItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *VirtualEventsEventsItemSessionsVirtualEventSessionItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/solutions/virtual_events_townhalls_item_presenters_request_builder.go b/solutions/virtual_events_townhalls_item_presenters_request_builder.go index 30dae98b7fe..db8b3789efe 100644 --- a/solutions/virtual_events_townhalls_item_presenters_request_builder.go +++ b/solutions/virtual_events_townhalls_item_presenters_request_builder.go @@ -11,7 +11,7 @@ import ( type VirtualEventsTownhallsItemPresentersRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// VirtualEventsTownhallsItemPresentersRequestBuilderGetQueryParameters presenters' information of the virtual event. +// VirtualEventsTownhallsItemPresentersRequestBuilderGetQueryParameters the virtual event presenters. type VirtualEventsTownhallsItemPresentersRequestBuilderGetQueryParameters struct { // Include count of items Count *bool `uriparametername:"%24count"` @@ -74,7 +74,7 @@ func NewVirtualEventsTownhallsItemPresentersRequestBuilder(rawUrl string, reques func (m *VirtualEventsTownhallsItemPresentersRequestBuilder) Count()(*VirtualEventsTownhallsItemPresentersCountRequestBuilder) { return NewVirtualEventsTownhallsItemPresentersCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Get presenters' information of the virtual event. +// Get the virtual event presenters. func (m *VirtualEventsTownhallsItemPresentersRequestBuilder) Get(ctx context.Context, requestConfiguration *VirtualEventsTownhallsItemPresentersRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualEventPresenterCollectionResponseable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -112,7 +112,7 @@ func (m *VirtualEventsTownhallsItemPresentersRequestBuilder) Post(ctx context.Co } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualEventPresenterable), nil } -// ToGetRequestInformation presenters' information of the virtual event. +// ToGetRequestInformation the virtual event presenters. func (m *VirtualEventsTownhallsItemPresentersRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *VirtualEventsTownhallsItemPresentersRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/solutions/virtual_events_townhalls_item_presenters_virtual_event_presenter_item_request_builder.go b/solutions/virtual_events_townhalls_item_presenters_virtual_event_presenter_item_request_builder.go index 6ffa2e6d35a..6e326c4f99c 100644 --- a/solutions/virtual_events_townhalls_item_presenters_virtual_event_presenter_item_request_builder.go +++ b/solutions/virtual_events_townhalls_item_presenters_virtual_event_presenter_item_request_builder.go @@ -18,7 +18,7 @@ type VirtualEventsTownhallsItemPresentersVirtualEventPresenterItemRequestBuilder // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// VirtualEventsTownhallsItemPresentersVirtualEventPresenterItemRequestBuilderGetQueryParameters presenters' information of the virtual event. +// VirtualEventsTownhallsItemPresentersVirtualEventPresenterItemRequestBuilderGetQueryParameters the virtual event presenters. type VirtualEventsTownhallsItemPresentersVirtualEventPresenterItemRequestBuilderGetQueryParameters struct { // Expand related entities Expand []string `uriparametername:"%24expand"` @@ -70,7 +70,7 @@ func (m *VirtualEventsTownhallsItemPresentersVirtualEventPresenterItemRequestBui } return nil } -// Get presenters' information of the virtual event. +// Get the virtual event presenters. func (m *VirtualEventsTownhallsItemPresentersVirtualEventPresenterItemRequestBuilder) Get(ctx context.Context, requestConfiguration *VirtualEventsTownhallsItemPresentersVirtualEventPresenterItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualEventPresenterable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -126,7 +126,7 @@ func (m *VirtualEventsTownhallsItemPresentersVirtualEventPresenterItemRequestBui requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToGetRequestInformation presenters' information of the virtual event. +// ToGetRequestInformation the virtual event presenters. func (m *VirtualEventsTownhallsItemPresentersVirtualEventPresenterItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *VirtualEventsTownhallsItemPresentersVirtualEventPresenterItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/solutions/virtual_events_townhalls_item_sessions_request_builder.go b/solutions/virtual_events_townhalls_item_sessions_request_builder.go index 10984067ea3..922b675065e 100644 --- a/solutions/virtual_events_townhalls_item_sessions_request_builder.go +++ b/solutions/virtual_events_townhalls_item_sessions_request_builder.go @@ -11,7 +11,7 @@ import ( type VirtualEventsTownhallsItemSessionsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// VirtualEventsTownhallsItemSessionsRequestBuilderGetQueryParameters sessions of the virtual event. +// VirtualEventsTownhallsItemSessionsRequestBuilderGetQueryParameters sessions for the virtual event. type VirtualEventsTownhallsItemSessionsRequestBuilderGetQueryParameters struct { // Include count of items Count *bool `uriparametername:"%24count"` @@ -74,7 +74,7 @@ func NewVirtualEventsTownhallsItemSessionsRequestBuilder(rawUrl string, requestA func (m *VirtualEventsTownhallsItemSessionsRequestBuilder) Count()(*VirtualEventsTownhallsItemSessionsCountRequestBuilder) { return NewVirtualEventsTownhallsItemSessionsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Get sessions of the virtual event. +// Get sessions for the virtual event. func (m *VirtualEventsTownhallsItemSessionsRequestBuilder) Get(ctx context.Context, requestConfiguration *VirtualEventsTownhallsItemSessionsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualEventSessionCollectionResponseable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -112,7 +112,7 @@ func (m *VirtualEventsTownhallsItemSessionsRequestBuilder) Post(ctx context.Cont } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualEventSessionable), nil } -// ToGetRequestInformation sessions of the virtual event. +// ToGetRequestInformation sessions for the virtual event. func (m *VirtualEventsTownhallsItemSessionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *VirtualEventsTownhallsItemSessionsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/solutions/virtual_events_townhalls_item_sessions_virtual_event_session_item_request_builder.go b/solutions/virtual_events_townhalls_item_sessions_virtual_event_session_item_request_builder.go index 842a285585c..7a3add47dec 100644 --- a/solutions/virtual_events_townhalls_item_sessions_virtual_event_session_item_request_builder.go +++ b/solutions/virtual_events_townhalls_item_sessions_virtual_event_session_item_request_builder.go @@ -18,7 +18,7 @@ type VirtualEventsTownhallsItemSessionsVirtualEventSessionItemRequestBuilderDele // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// VirtualEventsTownhallsItemSessionsVirtualEventSessionItemRequestBuilderGetQueryParameters sessions of the virtual event. +// VirtualEventsTownhallsItemSessionsVirtualEventSessionItemRequestBuilderGetQueryParameters sessions for the virtual event. type VirtualEventsTownhallsItemSessionsVirtualEventSessionItemRequestBuilderGetQueryParameters struct { // Expand related entities Expand []string `uriparametername:"%24expand"` @@ -74,7 +74,7 @@ func (m *VirtualEventsTownhallsItemSessionsVirtualEventSessionItemRequestBuilder } return nil } -// Get sessions of the virtual event. +// Get sessions for the virtual event. func (m *VirtualEventsTownhallsItemSessionsVirtualEventSessionItemRequestBuilder) Get(ctx context.Context, requestConfiguration *VirtualEventsTownhallsItemSessionsVirtualEventSessionItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualEventSessionable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -130,7 +130,7 @@ func (m *VirtualEventsTownhallsItemSessionsVirtualEventSessionItemRequestBuilder requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToGetRequestInformation sessions of the virtual event. +// ToGetRequestInformation sessions for the virtual event. func (m *VirtualEventsTownhallsItemSessionsVirtualEventSessionItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *VirtualEventsTownhallsItemSessionsVirtualEventSessionItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/solutions/virtual_events_webinars_item_presenters_request_builder.go b/solutions/virtual_events_webinars_item_presenters_request_builder.go index b563d171bc1..e6671134f50 100644 --- a/solutions/virtual_events_webinars_item_presenters_request_builder.go +++ b/solutions/virtual_events_webinars_item_presenters_request_builder.go @@ -11,7 +11,7 @@ import ( type VirtualEventsWebinarsItemPresentersRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// VirtualEventsWebinarsItemPresentersRequestBuilderGetQueryParameters presenters' information of the virtual event. +// VirtualEventsWebinarsItemPresentersRequestBuilderGetQueryParameters the virtual event presenters. type VirtualEventsWebinarsItemPresentersRequestBuilderGetQueryParameters struct { // Include count of items Count *bool `uriparametername:"%24count"` @@ -74,7 +74,7 @@ func NewVirtualEventsWebinarsItemPresentersRequestBuilder(rawUrl string, request func (m *VirtualEventsWebinarsItemPresentersRequestBuilder) Count()(*VirtualEventsWebinarsItemPresentersCountRequestBuilder) { return NewVirtualEventsWebinarsItemPresentersCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Get presenters' information of the virtual event. +// Get the virtual event presenters. func (m *VirtualEventsWebinarsItemPresentersRequestBuilder) Get(ctx context.Context, requestConfiguration *VirtualEventsWebinarsItemPresentersRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualEventPresenterCollectionResponseable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -112,7 +112,7 @@ func (m *VirtualEventsWebinarsItemPresentersRequestBuilder) Post(ctx context.Con } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualEventPresenterable), nil } -// ToGetRequestInformation presenters' information of the virtual event. +// ToGetRequestInformation the virtual event presenters. func (m *VirtualEventsWebinarsItemPresentersRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *VirtualEventsWebinarsItemPresentersRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/solutions/virtual_events_webinars_item_presenters_virtual_event_presenter_item_request_builder.go b/solutions/virtual_events_webinars_item_presenters_virtual_event_presenter_item_request_builder.go index 368f67c8952..5982111ee1b 100644 --- a/solutions/virtual_events_webinars_item_presenters_virtual_event_presenter_item_request_builder.go +++ b/solutions/virtual_events_webinars_item_presenters_virtual_event_presenter_item_request_builder.go @@ -18,7 +18,7 @@ type VirtualEventsWebinarsItemPresentersVirtualEventPresenterItemRequestBuilderD // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// VirtualEventsWebinarsItemPresentersVirtualEventPresenterItemRequestBuilderGetQueryParameters presenters' information of the virtual event. +// VirtualEventsWebinarsItemPresentersVirtualEventPresenterItemRequestBuilderGetQueryParameters the virtual event presenters. type VirtualEventsWebinarsItemPresentersVirtualEventPresenterItemRequestBuilderGetQueryParameters struct { // Expand related entities Expand []string `uriparametername:"%24expand"` @@ -70,7 +70,7 @@ func (m *VirtualEventsWebinarsItemPresentersVirtualEventPresenterItemRequestBuil } return nil } -// Get presenters' information of the virtual event. +// Get the virtual event presenters. func (m *VirtualEventsWebinarsItemPresentersVirtualEventPresenterItemRequestBuilder) Get(ctx context.Context, requestConfiguration *VirtualEventsWebinarsItemPresentersVirtualEventPresenterItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualEventPresenterable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -126,7 +126,7 @@ func (m *VirtualEventsWebinarsItemPresentersVirtualEventPresenterItemRequestBuil requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToGetRequestInformation presenters' information of the virtual event. +// ToGetRequestInformation the virtual event presenters. func (m *VirtualEventsWebinarsItemPresentersVirtualEventPresenterItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *VirtualEventsWebinarsItemPresentersVirtualEventPresenterItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/solutions/virtual_events_webinars_item_sessions_request_builder.go b/solutions/virtual_events_webinars_item_sessions_request_builder.go index 23ddda2bc17..d6e08f21231 100644 --- a/solutions/virtual_events_webinars_item_sessions_request_builder.go +++ b/solutions/virtual_events_webinars_item_sessions_request_builder.go @@ -11,7 +11,7 @@ import ( type VirtualEventsWebinarsItemSessionsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// VirtualEventsWebinarsItemSessionsRequestBuilderGetQueryParameters sessions of the virtual event. +// VirtualEventsWebinarsItemSessionsRequestBuilderGetQueryParameters sessions for the virtual event. type VirtualEventsWebinarsItemSessionsRequestBuilderGetQueryParameters struct { // Include count of items Count *bool `uriparametername:"%24count"` @@ -74,7 +74,7 @@ func NewVirtualEventsWebinarsItemSessionsRequestBuilder(rawUrl string, requestAd func (m *VirtualEventsWebinarsItemSessionsRequestBuilder) Count()(*VirtualEventsWebinarsItemSessionsCountRequestBuilder) { return NewVirtualEventsWebinarsItemSessionsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Get sessions of the virtual event. +// Get sessions for the virtual event. func (m *VirtualEventsWebinarsItemSessionsRequestBuilder) Get(ctx context.Context, requestConfiguration *VirtualEventsWebinarsItemSessionsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualEventSessionCollectionResponseable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -112,7 +112,7 @@ func (m *VirtualEventsWebinarsItemSessionsRequestBuilder) Post(ctx context.Conte } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualEventSessionable), nil } -// ToGetRequestInformation sessions of the virtual event. +// ToGetRequestInformation sessions for the virtual event. func (m *VirtualEventsWebinarsItemSessionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *VirtualEventsWebinarsItemSessionsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/solutions/virtual_events_webinars_item_sessions_virtual_event_session_item_request_builder.go b/solutions/virtual_events_webinars_item_sessions_virtual_event_session_item_request_builder.go index 7a03187fe33..a2060e2f9c0 100644 --- a/solutions/virtual_events_webinars_item_sessions_virtual_event_session_item_request_builder.go +++ b/solutions/virtual_events_webinars_item_sessions_virtual_event_session_item_request_builder.go @@ -18,7 +18,7 @@ type VirtualEventsWebinarsItemSessionsVirtualEventSessionItemRequestBuilderDelet // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// VirtualEventsWebinarsItemSessionsVirtualEventSessionItemRequestBuilderGetQueryParameters sessions of the virtual event. +// VirtualEventsWebinarsItemSessionsVirtualEventSessionItemRequestBuilderGetQueryParameters sessions for the virtual event. type VirtualEventsWebinarsItemSessionsVirtualEventSessionItemRequestBuilderGetQueryParameters struct { // Expand related entities Expand []string `uriparametername:"%24expand"` @@ -74,7 +74,7 @@ func (m *VirtualEventsWebinarsItemSessionsVirtualEventSessionItemRequestBuilder) } return nil } -// Get sessions of the virtual event. +// Get sessions for the virtual event. func (m *VirtualEventsWebinarsItemSessionsVirtualEventSessionItemRequestBuilder) Get(ctx context.Context, requestConfiguration *VirtualEventsWebinarsItemSessionsVirtualEventSessionItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualEventSessionable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -130,7 +130,7 @@ func (m *VirtualEventsWebinarsItemSessionsVirtualEventSessionItemRequestBuilder) requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToGetRequestInformation sessions of the virtual event. +// ToGetRequestInformation sessions for the virtual event. func (m *VirtualEventsWebinarsItemSessionsVirtualEventSessionItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *VirtualEventsWebinarsItemSessionsVirtualEventSessionItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/solutions/virtual_events_webinars_request_builder.go b/solutions/virtual_events_webinars_request_builder.go index ffb07c56f73..f3f6605e393 100644 --- a/solutions/virtual_events_webinars_request_builder.go +++ b/solutions/virtual_events_webinars_request_builder.go @@ -11,7 +11,7 @@ import ( type VirtualEventsWebinarsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// VirtualEventsWebinarsRequestBuilderGetQueryParameters get the list of all virtualEventWebinar objects created in a tenant. +// VirtualEventsWebinarsRequestBuilderGetQueryParameters get the list of all virtualEventWebinar objects created in the tenant. type VirtualEventsWebinarsRequestBuilderGetQueryParameters struct { // Include count of items Count *bool `uriparametername:"%24count"` @@ -74,7 +74,7 @@ func NewVirtualEventsWebinarsRequestBuilder(rawUrl string, requestAdapter i2ae41 func (m *VirtualEventsWebinarsRequestBuilder) Count()(*VirtualEventsWebinarsCountRequestBuilder) { return NewVirtualEventsWebinarsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Get get the list of all virtualEventWebinar objects created in a tenant. +// Get get the list of all virtualEventWebinar objects created in the tenant. // [Find more info here] // // [Find more info here]: https://learn.microsoft.com/graph/api/virtualeventsroot-list-webinars?view=graph-rest-1.0 @@ -123,7 +123,7 @@ func (m *VirtualEventsWebinarsRequestBuilder) Post(ctx context.Context, body ie2 } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualEventWebinarable), nil } -// ToGetRequestInformation get the list of all virtualEventWebinar objects created in a tenant. +// ToGetRequestInformation get the list of all virtualEventWebinar objects created in the tenant. func (m *VirtualEventsWebinarsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *VirtualEventsWebinarsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/teams/item_channels_channel_item_request_builder.go b/teams/item_channels_channel_item_request_builder.go index 5fe46145504..6df9ac21ac5 100644 --- a/teams/item_channels_channel_item_request_builder.go +++ b/teams/item_channels_channel_item_request_builder.go @@ -41,6 +41,10 @@ type ItemChannelsChannelItemRequestBuilderPatchRequestConfiguration struct { // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } +// Archive provides operations to call the archive method. +func (m *ItemChannelsChannelItemRequestBuilder) Archive()(*ItemChannelsItemArchiveRequestBuilder) { + return NewItemChannelsItemArchiveRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // CompleteMigration provides operations to call the completeMigration method. func (m *ItemChannelsChannelItemRequestBuilder) CompleteMigration()(*ItemChannelsItemCompleteMigrationRequestBuilder) { return NewItemChannelsItemCompleteMigrationRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) @@ -190,6 +194,10 @@ func (m *ItemChannelsChannelItemRequestBuilder) ToPatchRequestInformation(ctx co } return requestInfo, nil } +// Unarchive provides operations to call the unarchive method. +func (m *ItemChannelsChannelItemRequestBuilder) Unarchive()(*ItemChannelsItemUnarchiveRequestBuilder) { + return NewItemChannelsItemUnarchiveRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. func (m *ItemChannelsChannelItemRequestBuilder) WithUrl(rawUrl string)(*ItemChannelsChannelItemRequestBuilder) { return NewItemChannelsChannelItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); diff --git a/teams/item_channels_item_archive_post_request_body.go b/teams/item_channels_item_archive_post_request_body.go new file mode 100644 index 00000000000..a7de30e8603 --- /dev/null +++ b/teams/item_channels_item_archive_post_request_body.go @@ -0,0 +1,110 @@ +package teams + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +// ItemChannelsItemArchivePostRequestBody +type ItemChannelsItemArchivePostRequestBody struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewItemChannelsItemArchivePostRequestBody instantiates a new ItemChannelsItemArchivePostRequestBody and sets the default values. +func NewItemChannelsItemArchivePostRequestBody()(*ItemChannelsItemArchivePostRequestBody) { + m := &ItemChannelsItemArchivePostRequestBody{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemChannelsItemArchivePostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateItemChannelsItemArchivePostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemChannelsItemArchivePostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemChannelsItemArchivePostRequestBody) GetAdditionalData()(map[string]any) { + val , err := m.backingStore.Get("additionalData") + if err != nil { + panic(err) + } + if val == nil { + var value = make(map[string]any); + m.SetAdditionalData(value); + } + return val.(map[string]any) +} +// GetBackingStore gets the BackingStore property value. Stores model information. +func (m *ItemChannelsItemArchivePostRequestBody) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ItemChannelsItemArchivePostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["shouldSetSpoSiteReadOnlyForMembers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetShouldSetSpoSiteReadOnlyForMembers(val) + } + return nil + } + return res +} +// GetShouldSetSpoSiteReadOnlyForMembers gets the shouldSetSpoSiteReadOnlyForMembers property value. The shouldSetSpoSiteReadOnlyForMembers property +func (m *ItemChannelsItemArchivePostRequestBody) GetShouldSetSpoSiteReadOnlyForMembers()(*bool) { + val, err := m.GetBackingStore().Get("shouldSetSpoSiteReadOnlyForMembers") + if err != nil { + panic(err) + } + if val != nil { + return val.(*bool) + } + return nil +} +// Serialize serializes information the current object +func (m *ItemChannelsItemArchivePostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("shouldSetSpoSiteReadOnlyForMembers", m.GetShouldSetSpoSiteReadOnlyForMembers()) + 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 *ItemChannelsItemArchivePostRequestBody) 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 *ItemChannelsItemArchivePostRequestBody) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetShouldSetSpoSiteReadOnlyForMembers sets the shouldSetSpoSiteReadOnlyForMembers property value. The shouldSetSpoSiteReadOnlyForMembers property +func (m *ItemChannelsItemArchivePostRequestBody) SetShouldSetSpoSiteReadOnlyForMembers(value *bool)() { + err := m.GetBackingStore().Set("shouldSetSpoSiteReadOnlyForMembers", value) + if err != nil { + panic(err) + } +} +// ItemChannelsItemArchivePostRequestBodyable +type ItemChannelsItemArchivePostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetShouldSetSpoSiteReadOnlyForMembers()(*bool) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetShouldSetSpoSiteReadOnlyForMembers(value *bool)() +} diff --git a/teams/item_channels_item_archive_request_builder.go b/teams/item_channels_item_archive_request_builder.go new file mode 100644 index 00000000000..20c4198670d --- /dev/null +++ b/teams/item_channels_item_archive_request_builder.go @@ -0,0 +1,66 @@ +package teams + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemChannelsItemArchiveRequestBuilder provides operations to call the archive method. +type ItemChannelsItemArchiveRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemChannelsItemArchiveRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemChannelsItemArchiveRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewItemChannelsItemArchiveRequestBuilderInternal instantiates a new ArchiveRequestBuilder and sets the default values. +func NewItemChannelsItemArchiveRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemChannelsItemArchiveRequestBuilder) { + m := &ItemChannelsItemArchiveRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teams/{team%2Did}/channels/{channel%2Did}/archive", pathParameters), + } + return m +} +// NewItemChannelsItemArchiveRequestBuilder instantiates a new ArchiveRequestBuilder and sets the default values. +func NewItemChannelsItemArchiveRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemChannelsItemArchiveRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemChannelsItemArchiveRequestBuilderInternal(urlParams, requestAdapter) +} +// Post invoke action archive +func (m *ItemChannelsItemArchiveRequestBuilder) Post(ctx context.Context, body ItemChannelsItemArchivePostRequestBodyable, requestConfiguration *ItemChannelsItemArchiveRequestBuilderPostRequestConfiguration)(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation invoke action archive +func (m *ItemChannelsItemArchiveRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemChannelsItemArchivePostRequestBodyable, requestConfiguration *ItemChannelsItemArchiveRequestBuilderPostRequestConfiguration)(*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. +func (m *ItemChannelsItemArchiveRequestBuilder) WithUrl(rawUrl string)(*ItemChannelsItemArchiveRequestBuilder) { + return NewItemChannelsItemArchiveRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/teams/item_channels_item_members_conversation_member_item_request_builder.go b/teams/item_channels_item_members_conversation_member_item_request_builder.go index fa6c2d00b70..28bac9f8a7b 100644 --- a/teams/item_channels_item_members_conversation_member_item_request_builder.go +++ b/teams/item_channels_item_members_conversation_member_item_request_builder.go @@ -95,10 +95,10 @@ func (m *ItemChannelsItemMembersConversationMemberItemRequestBuilder) Get(ctx co } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable), nil } -// Patch update the role of a conversationMember in a team.or channel. +// Patch update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/conversationmember-update?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/channel-update-members?view=graph-rest-1.0 func (m *ItemChannelsItemMembersConversationMemberItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable, requestConfiguration *ItemChannelsItemMembersConversationMemberItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable, error) { requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -140,7 +140,7 @@ func (m *ItemChannelsItemMembersConversationMemberItemRequestBuilder) ToGetReque requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPatchRequestInformation update the role of a conversationMember in a team.or channel. +// ToPatchRequestInformation update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. func (m *ItemChannelsItemMembersConversationMemberItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable, requestConfiguration *ItemChannelsItemMembersConversationMemberItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/teams/item_channels_item_messages_request_builder.go b/teams/item_channels_item_messages_request_builder.go index d720229c99a..b5a71c9ee73 100644 --- a/teams/item_channels_item_messages_request_builder.go +++ b/teams/item_channels_item_messages_request_builder.go @@ -100,10 +100,10 @@ func (m *ItemChannelsItemMessagesRequestBuilder) Get(ctx context.Context, reques } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageCollectionResponseable), nil } -// Post send a new chatMessage in the specified channel or a chat. +// Post send a new chatMessage in the specified channel. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/chatmessage-post?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/channel-post-messages?view=graph-rest-1.0 func (m *ItemChannelsItemMessagesRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, requestConfiguration *ItemChannelsItemMessagesRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -135,7 +135,7 @@ func (m *ItemChannelsItemMessagesRequestBuilder) ToGetRequestInformation(ctx con requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation send a new chatMessage in the specified channel or a chat. +// ToPostRequestInformation send a new chatMessage in the specified channel. func (m *ItemChannelsItemMessagesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, requestConfiguration *ItemChannelsItemMessagesRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/teams/item_channels_item_unarchive_request_builder.go b/teams/item_channels_item_unarchive_request_builder.go new file mode 100644 index 00000000000..755caddfa4b --- /dev/null +++ b/teams/item_channels_item_unarchive_request_builder.go @@ -0,0 +1,62 @@ +package teams + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemChannelsItemUnarchiveRequestBuilder provides operations to call the unarchive method. +type ItemChannelsItemUnarchiveRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemChannelsItemUnarchiveRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemChannelsItemUnarchiveRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewItemChannelsItemUnarchiveRequestBuilderInternal instantiates a new UnarchiveRequestBuilder and sets the default values. +func NewItemChannelsItemUnarchiveRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemChannelsItemUnarchiveRequestBuilder) { + m := &ItemChannelsItemUnarchiveRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teams/{team%2Did}/channels/{channel%2Did}/unarchive", pathParameters), + } + return m +} +// NewItemChannelsItemUnarchiveRequestBuilder instantiates a new UnarchiveRequestBuilder and sets the default values. +func NewItemChannelsItemUnarchiveRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemChannelsItemUnarchiveRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemChannelsItemUnarchiveRequestBuilderInternal(urlParams, requestAdapter) +} +// Post invoke action unarchive +func (m *ItemChannelsItemUnarchiveRequestBuilder) Post(ctx context.Context, requestConfiguration *ItemChannelsItemUnarchiveRequestBuilderPostRequestConfiguration)(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation invoke action unarchive +func (m *ItemChannelsItemUnarchiveRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *ItemChannelsItemUnarchiveRequestBuilderPostRequestConfiguration)(*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. +func (m *ItemChannelsItemUnarchiveRequestBuilder) WithUrl(rawUrl string)(*ItemChannelsItemUnarchiveRequestBuilder) { + return NewItemChannelsItemUnarchiveRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/teams/item_primary_channel_archive_post_request_body.go b/teams/item_primary_channel_archive_post_request_body.go new file mode 100644 index 00000000000..dab2549ce40 --- /dev/null +++ b/teams/item_primary_channel_archive_post_request_body.go @@ -0,0 +1,110 @@ +package teams + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +// ItemPrimaryChannelArchivePostRequestBody +type ItemPrimaryChannelArchivePostRequestBody struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewItemPrimaryChannelArchivePostRequestBody instantiates a new ItemPrimaryChannelArchivePostRequestBody and sets the default values. +func NewItemPrimaryChannelArchivePostRequestBody()(*ItemPrimaryChannelArchivePostRequestBody) { + m := &ItemPrimaryChannelArchivePostRequestBody{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemPrimaryChannelArchivePostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateItemPrimaryChannelArchivePostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemPrimaryChannelArchivePostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemPrimaryChannelArchivePostRequestBody) GetAdditionalData()(map[string]any) { + val , err := m.backingStore.Get("additionalData") + if err != nil { + panic(err) + } + if val == nil { + var value = make(map[string]any); + m.SetAdditionalData(value); + } + return val.(map[string]any) +} +// GetBackingStore gets the BackingStore property value. Stores model information. +func (m *ItemPrimaryChannelArchivePostRequestBody) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ItemPrimaryChannelArchivePostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["shouldSetSpoSiteReadOnlyForMembers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetShouldSetSpoSiteReadOnlyForMembers(val) + } + return nil + } + return res +} +// GetShouldSetSpoSiteReadOnlyForMembers gets the shouldSetSpoSiteReadOnlyForMembers property value. The shouldSetSpoSiteReadOnlyForMembers property +func (m *ItemPrimaryChannelArchivePostRequestBody) GetShouldSetSpoSiteReadOnlyForMembers()(*bool) { + val, err := m.GetBackingStore().Get("shouldSetSpoSiteReadOnlyForMembers") + if err != nil { + panic(err) + } + if val != nil { + return val.(*bool) + } + return nil +} +// Serialize serializes information the current object +func (m *ItemPrimaryChannelArchivePostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("shouldSetSpoSiteReadOnlyForMembers", m.GetShouldSetSpoSiteReadOnlyForMembers()) + 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 *ItemPrimaryChannelArchivePostRequestBody) 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 *ItemPrimaryChannelArchivePostRequestBody) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetShouldSetSpoSiteReadOnlyForMembers sets the shouldSetSpoSiteReadOnlyForMembers property value. The shouldSetSpoSiteReadOnlyForMembers property +func (m *ItemPrimaryChannelArchivePostRequestBody) SetShouldSetSpoSiteReadOnlyForMembers(value *bool)() { + err := m.GetBackingStore().Set("shouldSetSpoSiteReadOnlyForMembers", value) + if err != nil { + panic(err) + } +} +// ItemPrimaryChannelArchivePostRequestBodyable +type ItemPrimaryChannelArchivePostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetShouldSetSpoSiteReadOnlyForMembers()(*bool) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetShouldSetSpoSiteReadOnlyForMembers(value *bool)() +} diff --git a/teams/item_primary_channel_archive_request_builder.go b/teams/item_primary_channel_archive_request_builder.go new file mode 100644 index 00000000000..d58036ed03b --- /dev/null +++ b/teams/item_primary_channel_archive_request_builder.go @@ -0,0 +1,66 @@ +package teams + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemPrimaryChannelArchiveRequestBuilder provides operations to call the archive method. +type ItemPrimaryChannelArchiveRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemPrimaryChannelArchiveRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemPrimaryChannelArchiveRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewItemPrimaryChannelArchiveRequestBuilderInternal instantiates a new ArchiveRequestBuilder and sets the default values. +func NewItemPrimaryChannelArchiveRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPrimaryChannelArchiveRequestBuilder) { + m := &ItemPrimaryChannelArchiveRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teams/{team%2Did}/primaryChannel/archive", pathParameters), + } + return m +} +// NewItemPrimaryChannelArchiveRequestBuilder instantiates a new ArchiveRequestBuilder and sets the default values. +func NewItemPrimaryChannelArchiveRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPrimaryChannelArchiveRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemPrimaryChannelArchiveRequestBuilderInternal(urlParams, requestAdapter) +} +// Post invoke action archive +func (m *ItemPrimaryChannelArchiveRequestBuilder) Post(ctx context.Context, body ItemPrimaryChannelArchivePostRequestBodyable, requestConfiguration *ItemPrimaryChannelArchiveRequestBuilderPostRequestConfiguration)(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation invoke action archive +func (m *ItemPrimaryChannelArchiveRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemPrimaryChannelArchivePostRequestBodyable, requestConfiguration *ItemPrimaryChannelArchiveRequestBuilderPostRequestConfiguration)(*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. +func (m *ItemPrimaryChannelArchiveRequestBuilder) WithUrl(rawUrl string)(*ItemPrimaryChannelArchiveRequestBuilder) { + return NewItemPrimaryChannelArchiveRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/teams/item_primary_channel_members_conversation_member_item_request_builder.go b/teams/item_primary_channel_members_conversation_member_item_request_builder.go index 9f9496304eb..edac2b6a930 100644 --- a/teams/item_primary_channel_members_conversation_member_item_request_builder.go +++ b/teams/item_primary_channel_members_conversation_member_item_request_builder.go @@ -95,10 +95,10 @@ func (m *ItemPrimaryChannelMembersConversationMemberItemRequestBuilder) Get(ctx } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable), nil } -// Patch update the role of a conversationMember in a team.or channel. +// Patch update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/conversationmember-update?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/channel-update-members?view=graph-rest-1.0 func (m *ItemPrimaryChannelMembersConversationMemberItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable, requestConfiguration *ItemPrimaryChannelMembersConversationMemberItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable, error) { requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -140,7 +140,7 @@ func (m *ItemPrimaryChannelMembersConversationMemberItemRequestBuilder) ToGetReq requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPatchRequestInformation update the role of a conversationMember in a team.or channel. +// ToPatchRequestInformation update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. func (m *ItemPrimaryChannelMembersConversationMemberItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable, requestConfiguration *ItemPrimaryChannelMembersConversationMemberItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/teams/item_primary_channel_messages_request_builder.go b/teams/item_primary_channel_messages_request_builder.go index 9bf9a4f863f..dc5b1f12c0e 100644 --- a/teams/item_primary_channel_messages_request_builder.go +++ b/teams/item_primary_channel_messages_request_builder.go @@ -100,10 +100,10 @@ func (m *ItemPrimaryChannelMessagesRequestBuilder) Get(ctx context.Context, requ } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageCollectionResponseable), nil } -// Post send a new chatMessage in the specified channel or a chat. +// Post send a new chatMessage in the specified channel. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/chatmessage-post?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/channel-post-messages?view=graph-rest-1.0 func (m *ItemPrimaryChannelMessagesRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, requestConfiguration *ItemPrimaryChannelMessagesRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -135,7 +135,7 @@ func (m *ItemPrimaryChannelMessagesRequestBuilder) ToGetRequestInformation(ctx c requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation send a new chatMessage in the specified channel or a chat. +// ToPostRequestInformation send a new chatMessage in the specified channel. func (m *ItemPrimaryChannelMessagesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, requestConfiguration *ItemPrimaryChannelMessagesRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/teams/item_primary_channel_request_builder.go b/teams/item_primary_channel_request_builder.go index 3a08d405c5f..7e10b6ab498 100644 --- a/teams/item_primary_channel_request_builder.go +++ b/teams/item_primary_channel_request_builder.go @@ -41,6 +41,10 @@ type ItemPrimaryChannelRequestBuilderPatchRequestConfiguration struct { // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } +// Archive provides operations to call the archive method. +func (m *ItemPrimaryChannelRequestBuilder) Archive()(*ItemPrimaryChannelArchiveRequestBuilder) { + return NewItemPrimaryChannelArchiveRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // CompleteMigration provides operations to call the completeMigration method. func (m *ItemPrimaryChannelRequestBuilder) CompleteMigration()(*ItemPrimaryChannelCompleteMigrationRequestBuilder) { return NewItemPrimaryChannelCompleteMigrationRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) @@ -184,6 +188,10 @@ func (m *ItemPrimaryChannelRequestBuilder) ToPatchRequestInformation(ctx context } return requestInfo, nil } +// Unarchive provides operations to call the unarchive method. +func (m *ItemPrimaryChannelRequestBuilder) Unarchive()(*ItemPrimaryChannelUnarchiveRequestBuilder) { + return NewItemPrimaryChannelUnarchiveRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. func (m *ItemPrimaryChannelRequestBuilder) WithUrl(rawUrl string)(*ItemPrimaryChannelRequestBuilder) { return NewItemPrimaryChannelRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); diff --git a/teams/item_primary_channel_unarchive_request_builder.go b/teams/item_primary_channel_unarchive_request_builder.go new file mode 100644 index 00000000000..826c00a8262 --- /dev/null +++ b/teams/item_primary_channel_unarchive_request_builder.go @@ -0,0 +1,62 @@ +package teams + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemPrimaryChannelUnarchiveRequestBuilder provides operations to call the unarchive method. +type ItemPrimaryChannelUnarchiveRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemPrimaryChannelUnarchiveRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemPrimaryChannelUnarchiveRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewItemPrimaryChannelUnarchiveRequestBuilderInternal instantiates a new UnarchiveRequestBuilder and sets the default values. +func NewItemPrimaryChannelUnarchiveRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPrimaryChannelUnarchiveRequestBuilder) { + m := &ItemPrimaryChannelUnarchiveRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teams/{team%2Did}/primaryChannel/unarchive", pathParameters), + } + return m +} +// NewItemPrimaryChannelUnarchiveRequestBuilder instantiates a new UnarchiveRequestBuilder and sets the default values. +func NewItemPrimaryChannelUnarchiveRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPrimaryChannelUnarchiveRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemPrimaryChannelUnarchiveRequestBuilderInternal(urlParams, requestAdapter) +} +// Post invoke action unarchive +func (m *ItemPrimaryChannelUnarchiveRequestBuilder) Post(ctx context.Context, requestConfiguration *ItemPrimaryChannelUnarchiveRequestBuilderPostRequestConfiguration)(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation invoke action unarchive +func (m *ItemPrimaryChannelUnarchiveRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *ItemPrimaryChannelUnarchiveRequestBuilderPostRequestConfiguration)(*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. +func (m *ItemPrimaryChannelUnarchiveRequestBuilder) WithUrl(rawUrl string)(*ItemPrimaryChannelUnarchiveRequestBuilder) { + return NewItemPrimaryChannelUnarchiveRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/teamtemplatedefinition/item_team_definition_channels_channel_item_request_builder.go b/teamtemplatedefinition/item_team_definition_channels_channel_item_request_builder.go index 3a95b52ff6a..176baadd93b 100644 --- a/teamtemplatedefinition/item_team_definition_channels_channel_item_request_builder.go +++ b/teamtemplatedefinition/item_team_definition_channels_channel_item_request_builder.go @@ -41,6 +41,10 @@ type ItemTeamDefinitionChannelsChannelItemRequestBuilderPatchRequestConfiguratio // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } +// Archive provides operations to call the archive method. +func (m *ItemTeamDefinitionChannelsChannelItemRequestBuilder) Archive()(*ItemTeamDefinitionChannelsItemArchiveRequestBuilder) { + return NewItemTeamDefinitionChannelsItemArchiveRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // CompleteMigration provides operations to call the completeMigration method. func (m *ItemTeamDefinitionChannelsChannelItemRequestBuilder) CompleteMigration()(*ItemTeamDefinitionChannelsItemCompleteMigrationRequestBuilder) { return NewItemTeamDefinitionChannelsItemCompleteMigrationRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) @@ -190,6 +194,10 @@ func (m *ItemTeamDefinitionChannelsChannelItemRequestBuilder) ToPatchRequestInfo } return requestInfo, nil } +// Unarchive provides operations to call the unarchive method. +func (m *ItemTeamDefinitionChannelsChannelItemRequestBuilder) Unarchive()(*ItemTeamDefinitionChannelsItemUnarchiveRequestBuilder) { + return NewItemTeamDefinitionChannelsItemUnarchiveRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. func (m *ItemTeamDefinitionChannelsChannelItemRequestBuilder) WithUrl(rawUrl string)(*ItemTeamDefinitionChannelsChannelItemRequestBuilder) { return NewItemTeamDefinitionChannelsChannelItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); diff --git a/teamtemplatedefinition/item_team_definition_channels_item_archive_post_request_body.go b/teamtemplatedefinition/item_team_definition_channels_item_archive_post_request_body.go new file mode 100644 index 00000000000..f1eb7dc9ca8 --- /dev/null +++ b/teamtemplatedefinition/item_team_definition_channels_item_archive_post_request_body.go @@ -0,0 +1,110 @@ +package teamtemplatedefinition + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +// ItemTeamDefinitionChannelsItemArchivePostRequestBody +type ItemTeamDefinitionChannelsItemArchivePostRequestBody struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewItemTeamDefinitionChannelsItemArchivePostRequestBody instantiates a new ItemTeamDefinitionChannelsItemArchivePostRequestBody and sets the default values. +func NewItemTeamDefinitionChannelsItemArchivePostRequestBody()(*ItemTeamDefinitionChannelsItemArchivePostRequestBody) { + m := &ItemTeamDefinitionChannelsItemArchivePostRequestBody{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemTeamDefinitionChannelsItemArchivePostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateItemTeamDefinitionChannelsItemArchivePostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemTeamDefinitionChannelsItemArchivePostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemTeamDefinitionChannelsItemArchivePostRequestBody) GetAdditionalData()(map[string]any) { + val , err := m.backingStore.Get("additionalData") + if err != nil { + panic(err) + } + if val == nil { + var value = make(map[string]any); + m.SetAdditionalData(value); + } + return val.(map[string]any) +} +// GetBackingStore gets the BackingStore property value. Stores model information. +func (m *ItemTeamDefinitionChannelsItemArchivePostRequestBody) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ItemTeamDefinitionChannelsItemArchivePostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["shouldSetSpoSiteReadOnlyForMembers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetShouldSetSpoSiteReadOnlyForMembers(val) + } + return nil + } + return res +} +// GetShouldSetSpoSiteReadOnlyForMembers gets the shouldSetSpoSiteReadOnlyForMembers property value. The shouldSetSpoSiteReadOnlyForMembers property +func (m *ItemTeamDefinitionChannelsItemArchivePostRequestBody) GetShouldSetSpoSiteReadOnlyForMembers()(*bool) { + val, err := m.GetBackingStore().Get("shouldSetSpoSiteReadOnlyForMembers") + if err != nil { + panic(err) + } + if val != nil { + return val.(*bool) + } + return nil +} +// Serialize serializes information the current object +func (m *ItemTeamDefinitionChannelsItemArchivePostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("shouldSetSpoSiteReadOnlyForMembers", m.GetShouldSetSpoSiteReadOnlyForMembers()) + 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 *ItemTeamDefinitionChannelsItemArchivePostRequestBody) 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 *ItemTeamDefinitionChannelsItemArchivePostRequestBody) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetShouldSetSpoSiteReadOnlyForMembers sets the shouldSetSpoSiteReadOnlyForMembers property value. The shouldSetSpoSiteReadOnlyForMembers property +func (m *ItemTeamDefinitionChannelsItemArchivePostRequestBody) SetShouldSetSpoSiteReadOnlyForMembers(value *bool)() { + err := m.GetBackingStore().Set("shouldSetSpoSiteReadOnlyForMembers", value) + if err != nil { + panic(err) + } +} +// ItemTeamDefinitionChannelsItemArchivePostRequestBodyable +type ItemTeamDefinitionChannelsItemArchivePostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetShouldSetSpoSiteReadOnlyForMembers()(*bool) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetShouldSetSpoSiteReadOnlyForMembers(value *bool)() +} diff --git a/teamtemplatedefinition/item_team_definition_channels_item_archive_request_builder.go b/teamtemplatedefinition/item_team_definition_channels_item_archive_request_builder.go new file mode 100644 index 00000000000..e7e9e138797 --- /dev/null +++ b/teamtemplatedefinition/item_team_definition_channels_item_archive_request_builder.go @@ -0,0 +1,66 @@ +package teamtemplatedefinition + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemTeamDefinitionChannelsItemArchiveRequestBuilder provides operations to call the archive method. +type ItemTeamDefinitionChannelsItemArchiveRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemTeamDefinitionChannelsItemArchiveRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemTeamDefinitionChannelsItemArchiveRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewItemTeamDefinitionChannelsItemArchiveRequestBuilderInternal instantiates a new ArchiveRequestBuilder and sets the default values. +func NewItemTeamDefinitionChannelsItemArchiveRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamDefinitionChannelsItemArchiveRequestBuilder) { + m := &ItemTeamDefinitionChannelsItemArchiveRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teamTemplateDefinition/{teamTemplateDefinition%2Did}/teamDefinition/channels/{channel%2Did}/archive", pathParameters), + } + return m +} +// NewItemTeamDefinitionChannelsItemArchiveRequestBuilder instantiates a new ArchiveRequestBuilder and sets the default values. +func NewItemTeamDefinitionChannelsItemArchiveRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamDefinitionChannelsItemArchiveRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamDefinitionChannelsItemArchiveRequestBuilderInternal(urlParams, requestAdapter) +} +// Post invoke action archive +func (m *ItemTeamDefinitionChannelsItemArchiveRequestBuilder) Post(ctx context.Context, body ItemTeamDefinitionChannelsItemArchivePostRequestBodyable, requestConfiguration *ItemTeamDefinitionChannelsItemArchiveRequestBuilderPostRequestConfiguration)(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation invoke action archive +func (m *ItemTeamDefinitionChannelsItemArchiveRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemTeamDefinitionChannelsItemArchivePostRequestBodyable, requestConfiguration *ItemTeamDefinitionChannelsItemArchiveRequestBuilderPostRequestConfiguration)(*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. +func (m *ItemTeamDefinitionChannelsItemArchiveRequestBuilder) WithUrl(rawUrl string)(*ItemTeamDefinitionChannelsItemArchiveRequestBuilder) { + return NewItemTeamDefinitionChannelsItemArchiveRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/teamtemplatedefinition/item_team_definition_channels_item_members_conversation_member_item_request_builder.go b/teamtemplatedefinition/item_team_definition_channels_item_members_conversation_member_item_request_builder.go index 536007b9790..c9c21123d30 100644 --- a/teamtemplatedefinition/item_team_definition_channels_item_members_conversation_member_item_request_builder.go +++ b/teamtemplatedefinition/item_team_definition_channels_item_members_conversation_member_item_request_builder.go @@ -95,10 +95,10 @@ func (m *ItemTeamDefinitionChannelsItemMembersConversationMemberItemRequestBuild } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable), nil } -// Patch update the role of a conversationMember in a team.or channel. +// Patch update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/conversationmember-update?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/channel-update-members?view=graph-rest-1.0 func (m *ItemTeamDefinitionChannelsItemMembersConversationMemberItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable, requestConfiguration *ItemTeamDefinitionChannelsItemMembersConversationMemberItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable, error) { requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -140,7 +140,7 @@ func (m *ItemTeamDefinitionChannelsItemMembersConversationMemberItemRequestBuild requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPatchRequestInformation update the role of a conversationMember in a team.or channel. +// ToPatchRequestInformation update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. func (m *ItemTeamDefinitionChannelsItemMembersConversationMemberItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable, requestConfiguration *ItemTeamDefinitionChannelsItemMembersConversationMemberItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/teamtemplatedefinition/item_team_definition_channels_item_messages_request_builder.go b/teamtemplatedefinition/item_team_definition_channels_item_messages_request_builder.go index 55348464ea8..1606ce337ed 100644 --- a/teamtemplatedefinition/item_team_definition_channels_item_messages_request_builder.go +++ b/teamtemplatedefinition/item_team_definition_channels_item_messages_request_builder.go @@ -100,10 +100,10 @@ func (m *ItemTeamDefinitionChannelsItemMessagesRequestBuilder) Get(ctx context.C } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageCollectionResponseable), nil } -// Post send a new chatMessage in the specified channel or a chat. +// Post send a new chatMessage in the specified channel. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/chatmessage-post?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/channel-post-messages?view=graph-rest-1.0 func (m *ItemTeamDefinitionChannelsItemMessagesRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, requestConfiguration *ItemTeamDefinitionChannelsItemMessagesRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -135,7 +135,7 @@ func (m *ItemTeamDefinitionChannelsItemMessagesRequestBuilder) ToGetRequestInfor requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation send a new chatMessage in the specified channel or a chat. +// ToPostRequestInformation send a new chatMessage in the specified channel. func (m *ItemTeamDefinitionChannelsItemMessagesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, requestConfiguration *ItemTeamDefinitionChannelsItemMessagesRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/teamtemplatedefinition/item_team_definition_channels_item_unarchive_request_builder.go b/teamtemplatedefinition/item_team_definition_channels_item_unarchive_request_builder.go new file mode 100644 index 00000000000..ff3b00cab93 --- /dev/null +++ b/teamtemplatedefinition/item_team_definition_channels_item_unarchive_request_builder.go @@ -0,0 +1,62 @@ +package teamtemplatedefinition + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemTeamDefinitionChannelsItemUnarchiveRequestBuilder provides operations to call the unarchive method. +type ItemTeamDefinitionChannelsItemUnarchiveRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemTeamDefinitionChannelsItemUnarchiveRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemTeamDefinitionChannelsItemUnarchiveRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewItemTeamDefinitionChannelsItemUnarchiveRequestBuilderInternal instantiates a new UnarchiveRequestBuilder and sets the default values. +func NewItemTeamDefinitionChannelsItemUnarchiveRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamDefinitionChannelsItemUnarchiveRequestBuilder) { + m := &ItemTeamDefinitionChannelsItemUnarchiveRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teamTemplateDefinition/{teamTemplateDefinition%2Did}/teamDefinition/channels/{channel%2Did}/unarchive", pathParameters), + } + return m +} +// NewItemTeamDefinitionChannelsItemUnarchiveRequestBuilder instantiates a new UnarchiveRequestBuilder and sets the default values. +func NewItemTeamDefinitionChannelsItemUnarchiveRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamDefinitionChannelsItemUnarchiveRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamDefinitionChannelsItemUnarchiveRequestBuilderInternal(urlParams, requestAdapter) +} +// Post invoke action unarchive +func (m *ItemTeamDefinitionChannelsItemUnarchiveRequestBuilder) Post(ctx context.Context, requestConfiguration *ItemTeamDefinitionChannelsItemUnarchiveRequestBuilderPostRequestConfiguration)(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation invoke action unarchive +func (m *ItemTeamDefinitionChannelsItemUnarchiveRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *ItemTeamDefinitionChannelsItemUnarchiveRequestBuilderPostRequestConfiguration)(*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. +func (m *ItemTeamDefinitionChannelsItemUnarchiveRequestBuilder) WithUrl(rawUrl string)(*ItemTeamDefinitionChannelsItemUnarchiveRequestBuilder) { + return NewItemTeamDefinitionChannelsItemUnarchiveRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/teamtemplatedefinition/item_team_definition_primary_channel_archive_post_request_body.go b/teamtemplatedefinition/item_team_definition_primary_channel_archive_post_request_body.go new file mode 100644 index 00000000000..9322d8960bb --- /dev/null +++ b/teamtemplatedefinition/item_team_definition_primary_channel_archive_post_request_body.go @@ -0,0 +1,110 @@ +package teamtemplatedefinition + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +// ItemTeamDefinitionPrimaryChannelArchivePostRequestBody +type ItemTeamDefinitionPrimaryChannelArchivePostRequestBody struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewItemTeamDefinitionPrimaryChannelArchivePostRequestBody instantiates a new ItemTeamDefinitionPrimaryChannelArchivePostRequestBody and sets the default values. +func NewItemTeamDefinitionPrimaryChannelArchivePostRequestBody()(*ItemTeamDefinitionPrimaryChannelArchivePostRequestBody) { + m := &ItemTeamDefinitionPrimaryChannelArchivePostRequestBody{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemTeamDefinitionPrimaryChannelArchivePostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateItemTeamDefinitionPrimaryChannelArchivePostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemTeamDefinitionPrimaryChannelArchivePostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemTeamDefinitionPrimaryChannelArchivePostRequestBody) GetAdditionalData()(map[string]any) { + val , err := m.backingStore.Get("additionalData") + if err != nil { + panic(err) + } + if val == nil { + var value = make(map[string]any); + m.SetAdditionalData(value); + } + return val.(map[string]any) +} +// GetBackingStore gets the BackingStore property value. Stores model information. +func (m *ItemTeamDefinitionPrimaryChannelArchivePostRequestBody) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ItemTeamDefinitionPrimaryChannelArchivePostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["shouldSetSpoSiteReadOnlyForMembers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetShouldSetSpoSiteReadOnlyForMembers(val) + } + return nil + } + return res +} +// GetShouldSetSpoSiteReadOnlyForMembers gets the shouldSetSpoSiteReadOnlyForMembers property value. The shouldSetSpoSiteReadOnlyForMembers property +func (m *ItemTeamDefinitionPrimaryChannelArchivePostRequestBody) GetShouldSetSpoSiteReadOnlyForMembers()(*bool) { + val, err := m.GetBackingStore().Get("shouldSetSpoSiteReadOnlyForMembers") + if err != nil { + panic(err) + } + if val != nil { + return val.(*bool) + } + return nil +} +// Serialize serializes information the current object +func (m *ItemTeamDefinitionPrimaryChannelArchivePostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("shouldSetSpoSiteReadOnlyForMembers", m.GetShouldSetSpoSiteReadOnlyForMembers()) + 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 *ItemTeamDefinitionPrimaryChannelArchivePostRequestBody) 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 *ItemTeamDefinitionPrimaryChannelArchivePostRequestBody) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetShouldSetSpoSiteReadOnlyForMembers sets the shouldSetSpoSiteReadOnlyForMembers property value. The shouldSetSpoSiteReadOnlyForMembers property +func (m *ItemTeamDefinitionPrimaryChannelArchivePostRequestBody) SetShouldSetSpoSiteReadOnlyForMembers(value *bool)() { + err := m.GetBackingStore().Set("shouldSetSpoSiteReadOnlyForMembers", value) + if err != nil { + panic(err) + } +} +// ItemTeamDefinitionPrimaryChannelArchivePostRequestBodyable +type ItemTeamDefinitionPrimaryChannelArchivePostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetShouldSetSpoSiteReadOnlyForMembers()(*bool) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetShouldSetSpoSiteReadOnlyForMembers(value *bool)() +} diff --git a/teamtemplatedefinition/item_team_definition_primary_channel_archive_request_builder.go b/teamtemplatedefinition/item_team_definition_primary_channel_archive_request_builder.go new file mode 100644 index 00000000000..a73d5aa03d1 --- /dev/null +++ b/teamtemplatedefinition/item_team_definition_primary_channel_archive_request_builder.go @@ -0,0 +1,66 @@ +package teamtemplatedefinition + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemTeamDefinitionPrimaryChannelArchiveRequestBuilder provides operations to call the archive method. +type ItemTeamDefinitionPrimaryChannelArchiveRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemTeamDefinitionPrimaryChannelArchiveRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemTeamDefinitionPrimaryChannelArchiveRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewItemTeamDefinitionPrimaryChannelArchiveRequestBuilderInternal instantiates a new ArchiveRequestBuilder and sets the default values. +func NewItemTeamDefinitionPrimaryChannelArchiveRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamDefinitionPrimaryChannelArchiveRequestBuilder) { + m := &ItemTeamDefinitionPrimaryChannelArchiveRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teamTemplateDefinition/{teamTemplateDefinition%2Did}/teamDefinition/primaryChannel/archive", pathParameters), + } + return m +} +// NewItemTeamDefinitionPrimaryChannelArchiveRequestBuilder instantiates a new ArchiveRequestBuilder and sets the default values. +func NewItemTeamDefinitionPrimaryChannelArchiveRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamDefinitionPrimaryChannelArchiveRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamDefinitionPrimaryChannelArchiveRequestBuilderInternal(urlParams, requestAdapter) +} +// Post invoke action archive +func (m *ItemTeamDefinitionPrimaryChannelArchiveRequestBuilder) Post(ctx context.Context, body ItemTeamDefinitionPrimaryChannelArchivePostRequestBodyable, requestConfiguration *ItemTeamDefinitionPrimaryChannelArchiveRequestBuilderPostRequestConfiguration)(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation invoke action archive +func (m *ItemTeamDefinitionPrimaryChannelArchiveRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemTeamDefinitionPrimaryChannelArchivePostRequestBodyable, requestConfiguration *ItemTeamDefinitionPrimaryChannelArchiveRequestBuilderPostRequestConfiguration)(*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. +func (m *ItemTeamDefinitionPrimaryChannelArchiveRequestBuilder) WithUrl(rawUrl string)(*ItemTeamDefinitionPrimaryChannelArchiveRequestBuilder) { + return NewItemTeamDefinitionPrimaryChannelArchiveRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/teamtemplatedefinition/item_team_definition_primary_channel_members_conversation_member_item_request_builder.go b/teamtemplatedefinition/item_team_definition_primary_channel_members_conversation_member_item_request_builder.go index 17e8741bf28..c13593f40eb 100644 --- a/teamtemplatedefinition/item_team_definition_primary_channel_members_conversation_member_item_request_builder.go +++ b/teamtemplatedefinition/item_team_definition_primary_channel_members_conversation_member_item_request_builder.go @@ -95,10 +95,10 @@ func (m *ItemTeamDefinitionPrimaryChannelMembersConversationMemberItemRequestBui } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable), nil } -// Patch update the role of a conversationMember in a team.or channel. +// Patch update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/conversationmember-update?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/channel-update-members?view=graph-rest-1.0 func (m *ItemTeamDefinitionPrimaryChannelMembersConversationMemberItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable, requestConfiguration *ItemTeamDefinitionPrimaryChannelMembersConversationMemberItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable, error) { requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -140,7 +140,7 @@ func (m *ItemTeamDefinitionPrimaryChannelMembersConversationMemberItemRequestBui requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPatchRequestInformation update the role of a conversationMember in a team.or channel. +// ToPatchRequestInformation update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. func (m *ItemTeamDefinitionPrimaryChannelMembersConversationMemberItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable, requestConfiguration *ItemTeamDefinitionPrimaryChannelMembersConversationMemberItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/teamtemplatedefinition/item_team_definition_primary_channel_messages_request_builder.go b/teamtemplatedefinition/item_team_definition_primary_channel_messages_request_builder.go index ac7a70f9e7c..bee97c46bb4 100644 --- a/teamtemplatedefinition/item_team_definition_primary_channel_messages_request_builder.go +++ b/teamtemplatedefinition/item_team_definition_primary_channel_messages_request_builder.go @@ -100,10 +100,10 @@ func (m *ItemTeamDefinitionPrimaryChannelMessagesRequestBuilder) Get(ctx context } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageCollectionResponseable), nil } -// Post send a new chatMessage in the specified channel or a chat. +// Post send a new chatMessage in the specified channel. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/chatmessage-post?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/channel-post-messages?view=graph-rest-1.0 func (m *ItemTeamDefinitionPrimaryChannelMessagesRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, requestConfiguration *ItemTeamDefinitionPrimaryChannelMessagesRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -135,7 +135,7 @@ func (m *ItemTeamDefinitionPrimaryChannelMessagesRequestBuilder) ToGetRequestInf requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation send a new chatMessage in the specified channel or a chat. +// ToPostRequestInformation send a new chatMessage in the specified channel. func (m *ItemTeamDefinitionPrimaryChannelMessagesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, requestConfiguration *ItemTeamDefinitionPrimaryChannelMessagesRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/teamtemplatedefinition/item_team_definition_primary_channel_request_builder.go b/teamtemplatedefinition/item_team_definition_primary_channel_request_builder.go index 8a9282d6d42..41422f0ba48 100644 --- a/teamtemplatedefinition/item_team_definition_primary_channel_request_builder.go +++ b/teamtemplatedefinition/item_team_definition_primary_channel_request_builder.go @@ -41,6 +41,10 @@ type ItemTeamDefinitionPrimaryChannelRequestBuilderPatchRequestConfiguration str // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } +// Archive provides operations to call the archive method. +func (m *ItemTeamDefinitionPrimaryChannelRequestBuilder) Archive()(*ItemTeamDefinitionPrimaryChannelArchiveRequestBuilder) { + return NewItemTeamDefinitionPrimaryChannelArchiveRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // CompleteMigration provides operations to call the completeMigration method. func (m *ItemTeamDefinitionPrimaryChannelRequestBuilder) CompleteMigration()(*ItemTeamDefinitionPrimaryChannelCompleteMigrationRequestBuilder) { return NewItemTeamDefinitionPrimaryChannelCompleteMigrationRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) @@ -184,6 +188,10 @@ func (m *ItemTeamDefinitionPrimaryChannelRequestBuilder) ToPatchRequestInformati } return requestInfo, nil } +// Unarchive provides operations to call the unarchive method. +func (m *ItemTeamDefinitionPrimaryChannelRequestBuilder) Unarchive()(*ItemTeamDefinitionPrimaryChannelUnarchiveRequestBuilder) { + return NewItemTeamDefinitionPrimaryChannelUnarchiveRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. func (m *ItemTeamDefinitionPrimaryChannelRequestBuilder) WithUrl(rawUrl string)(*ItemTeamDefinitionPrimaryChannelRequestBuilder) { return NewItemTeamDefinitionPrimaryChannelRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); diff --git a/teamtemplatedefinition/item_team_definition_primary_channel_unarchive_request_builder.go b/teamtemplatedefinition/item_team_definition_primary_channel_unarchive_request_builder.go new file mode 100644 index 00000000000..f89306b5a3e --- /dev/null +++ b/teamtemplatedefinition/item_team_definition_primary_channel_unarchive_request_builder.go @@ -0,0 +1,62 @@ +package teamtemplatedefinition + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemTeamDefinitionPrimaryChannelUnarchiveRequestBuilder provides operations to call the unarchive method. +type ItemTeamDefinitionPrimaryChannelUnarchiveRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemTeamDefinitionPrimaryChannelUnarchiveRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemTeamDefinitionPrimaryChannelUnarchiveRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewItemTeamDefinitionPrimaryChannelUnarchiveRequestBuilderInternal instantiates a new UnarchiveRequestBuilder and sets the default values. +func NewItemTeamDefinitionPrimaryChannelUnarchiveRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamDefinitionPrimaryChannelUnarchiveRequestBuilder) { + m := &ItemTeamDefinitionPrimaryChannelUnarchiveRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teamTemplateDefinition/{teamTemplateDefinition%2Did}/teamDefinition/primaryChannel/unarchive", pathParameters), + } + return m +} +// NewItemTeamDefinitionPrimaryChannelUnarchiveRequestBuilder instantiates a new UnarchiveRequestBuilder and sets the default values. +func NewItemTeamDefinitionPrimaryChannelUnarchiveRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamDefinitionPrimaryChannelUnarchiveRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamDefinitionPrimaryChannelUnarchiveRequestBuilderInternal(urlParams, requestAdapter) +} +// Post invoke action unarchive +func (m *ItemTeamDefinitionPrimaryChannelUnarchiveRequestBuilder) Post(ctx context.Context, requestConfiguration *ItemTeamDefinitionPrimaryChannelUnarchiveRequestBuilderPostRequestConfiguration)(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation invoke action unarchive +func (m *ItemTeamDefinitionPrimaryChannelUnarchiveRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *ItemTeamDefinitionPrimaryChannelUnarchiveRequestBuilderPostRequestConfiguration)(*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. +func (m *ItemTeamDefinitionPrimaryChannelUnarchiveRequestBuilder) WithUrl(rawUrl string)(*ItemTeamDefinitionPrimaryChannelUnarchiveRequestBuilder) { + return NewItemTeamDefinitionPrimaryChannelUnarchiveRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/teamwork/deleted_teams_item_channels_channel_item_request_builder.go b/teamwork/deleted_teams_item_channels_channel_item_request_builder.go index 451d9732778..5aebab7b3a6 100644 --- a/teamwork/deleted_teams_item_channels_channel_item_request_builder.go +++ b/teamwork/deleted_teams_item_channels_channel_item_request_builder.go @@ -41,6 +41,10 @@ type DeletedTeamsItemChannelsChannelItemRequestBuilderPatchRequestConfiguration // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } +// Archive provides operations to call the archive method. +func (m *DeletedTeamsItemChannelsChannelItemRequestBuilder) Archive()(*DeletedTeamsItemChannelsItemArchiveRequestBuilder) { + return NewDeletedTeamsItemChannelsItemArchiveRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // CompleteMigration provides operations to call the completeMigration method. func (m *DeletedTeamsItemChannelsChannelItemRequestBuilder) CompleteMigration()(*DeletedTeamsItemChannelsItemCompleteMigrationRequestBuilder) { return NewDeletedTeamsItemChannelsItemCompleteMigrationRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) @@ -181,6 +185,10 @@ func (m *DeletedTeamsItemChannelsChannelItemRequestBuilder) ToPatchRequestInform } return requestInfo, nil } +// Unarchive provides operations to call the unarchive method. +func (m *DeletedTeamsItemChannelsChannelItemRequestBuilder) Unarchive()(*DeletedTeamsItemChannelsItemUnarchiveRequestBuilder) { + return NewDeletedTeamsItemChannelsItemUnarchiveRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. func (m *DeletedTeamsItemChannelsChannelItemRequestBuilder) WithUrl(rawUrl string)(*DeletedTeamsItemChannelsChannelItemRequestBuilder) { return NewDeletedTeamsItemChannelsChannelItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); diff --git a/teamwork/deleted_teams_item_channels_item_archive_post_request_body.go b/teamwork/deleted_teams_item_channels_item_archive_post_request_body.go new file mode 100644 index 00000000000..feab813fcca --- /dev/null +++ b/teamwork/deleted_teams_item_channels_item_archive_post_request_body.go @@ -0,0 +1,110 @@ +package teamwork + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +// DeletedTeamsItemChannelsItemArchivePostRequestBody +type DeletedTeamsItemChannelsItemArchivePostRequestBody struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewDeletedTeamsItemChannelsItemArchivePostRequestBody instantiates a new DeletedTeamsItemChannelsItemArchivePostRequestBody and sets the default values. +func NewDeletedTeamsItemChannelsItemArchivePostRequestBody()(*DeletedTeamsItemChannelsItemArchivePostRequestBody) { + m := &DeletedTeamsItemChannelsItemArchivePostRequestBody{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateDeletedTeamsItemChannelsItemArchivePostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeletedTeamsItemChannelsItemArchivePostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeletedTeamsItemChannelsItemArchivePostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *DeletedTeamsItemChannelsItemArchivePostRequestBody) GetAdditionalData()(map[string]any) { + val , err := m.backingStore.Get("additionalData") + if err != nil { + panic(err) + } + if val == nil { + var value = make(map[string]any); + m.SetAdditionalData(value); + } + return val.(map[string]any) +} +// GetBackingStore gets the BackingStore property value. Stores model information. +func (m *DeletedTeamsItemChannelsItemArchivePostRequestBody) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeletedTeamsItemChannelsItemArchivePostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["shouldSetSpoSiteReadOnlyForMembers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetShouldSetSpoSiteReadOnlyForMembers(val) + } + return nil + } + return res +} +// GetShouldSetSpoSiteReadOnlyForMembers gets the shouldSetSpoSiteReadOnlyForMembers property value. The shouldSetSpoSiteReadOnlyForMembers property +func (m *DeletedTeamsItemChannelsItemArchivePostRequestBody) GetShouldSetSpoSiteReadOnlyForMembers()(*bool) { + val, err := m.GetBackingStore().Get("shouldSetSpoSiteReadOnlyForMembers") + if err != nil { + panic(err) + } + if val != nil { + return val.(*bool) + } + return nil +} +// Serialize serializes information the current object +func (m *DeletedTeamsItemChannelsItemArchivePostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("shouldSetSpoSiteReadOnlyForMembers", m.GetShouldSetSpoSiteReadOnlyForMembers()) + 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 *DeletedTeamsItemChannelsItemArchivePostRequestBody) 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 *DeletedTeamsItemChannelsItemArchivePostRequestBody) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetShouldSetSpoSiteReadOnlyForMembers sets the shouldSetSpoSiteReadOnlyForMembers property value. The shouldSetSpoSiteReadOnlyForMembers property +func (m *DeletedTeamsItemChannelsItemArchivePostRequestBody) SetShouldSetSpoSiteReadOnlyForMembers(value *bool)() { + err := m.GetBackingStore().Set("shouldSetSpoSiteReadOnlyForMembers", value) + if err != nil { + panic(err) + } +} +// DeletedTeamsItemChannelsItemArchivePostRequestBodyable +type DeletedTeamsItemChannelsItemArchivePostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetShouldSetSpoSiteReadOnlyForMembers()(*bool) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetShouldSetSpoSiteReadOnlyForMembers(value *bool)() +} diff --git a/teamwork/deleted_teams_item_channels_item_archive_request_builder.go b/teamwork/deleted_teams_item_channels_item_archive_request_builder.go new file mode 100644 index 00000000000..9f8ed60f698 --- /dev/null +++ b/teamwork/deleted_teams_item_channels_item_archive_request_builder.go @@ -0,0 +1,66 @@ +package teamwork + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// DeletedTeamsItemChannelsItemArchiveRequestBuilder provides operations to call the archive method. +type DeletedTeamsItemChannelsItemArchiveRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// DeletedTeamsItemChannelsItemArchiveRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type DeletedTeamsItemChannelsItemArchiveRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewDeletedTeamsItemChannelsItemArchiveRequestBuilderInternal instantiates a new ArchiveRequestBuilder and sets the default values. +func NewDeletedTeamsItemChannelsItemArchiveRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*DeletedTeamsItemChannelsItemArchiveRequestBuilder) { + m := &DeletedTeamsItemChannelsItemArchiveRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teamwork/deletedTeams/{deletedTeam%2Did}/channels/{channel%2Did}/archive", pathParameters), + } + return m +} +// NewDeletedTeamsItemChannelsItemArchiveRequestBuilder instantiates a new ArchiveRequestBuilder and sets the default values. +func NewDeletedTeamsItemChannelsItemArchiveRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*DeletedTeamsItemChannelsItemArchiveRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewDeletedTeamsItemChannelsItemArchiveRequestBuilderInternal(urlParams, requestAdapter) +} +// Post invoke action archive +func (m *DeletedTeamsItemChannelsItemArchiveRequestBuilder) Post(ctx context.Context, body DeletedTeamsItemChannelsItemArchivePostRequestBodyable, requestConfiguration *DeletedTeamsItemChannelsItemArchiveRequestBuilderPostRequestConfiguration)(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation invoke action archive +func (m *DeletedTeamsItemChannelsItemArchiveRequestBuilder) ToPostRequestInformation(ctx context.Context, body DeletedTeamsItemChannelsItemArchivePostRequestBodyable, requestConfiguration *DeletedTeamsItemChannelsItemArchiveRequestBuilderPostRequestConfiguration)(*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. +func (m *DeletedTeamsItemChannelsItemArchiveRequestBuilder) WithUrl(rawUrl string)(*DeletedTeamsItemChannelsItemArchiveRequestBuilder) { + return NewDeletedTeamsItemChannelsItemArchiveRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/teamwork/deleted_teams_item_channels_item_members_conversation_member_item_request_builder.go b/teamwork/deleted_teams_item_channels_item_members_conversation_member_item_request_builder.go index e459ea0e6b9..38f5abd2d57 100644 --- a/teamwork/deleted_teams_item_channels_item_members_conversation_member_item_request_builder.go +++ b/teamwork/deleted_teams_item_channels_item_members_conversation_member_item_request_builder.go @@ -95,10 +95,10 @@ func (m *DeletedTeamsItemChannelsItemMembersConversationMemberItemRequestBuilder } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable), nil } -// Patch update the role of a conversationMember in a team.or channel. +// Patch update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/conversationmember-update?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/channel-update-members?view=graph-rest-1.0 func (m *DeletedTeamsItemChannelsItemMembersConversationMemberItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable, requestConfiguration *DeletedTeamsItemChannelsItemMembersConversationMemberItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable, error) { requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -140,7 +140,7 @@ func (m *DeletedTeamsItemChannelsItemMembersConversationMemberItemRequestBuilder requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPatchRequestInformation update the role of a conversationMember in a team.or channel. +// ToPatchRequestInformation update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. func (m *DeletedTeamsItemChannelsItemMembersConversationMemberItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable, requestConfiguration *DeletedTeamsItemChannelsItemMembersConversationMemberItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/teamwork/deleted_teams_item_channels_item_messages_request_builder.go b/teamwork/deleted_teams_item_channels_item_messages_request_builder.go index 3e3204ac094..d435a2b0969 100644 --- a/teamwork/deleted_teams_item_channels_item_messages_request_builder.go +++ b/teamwork/deleted_teams_item_channels_item_messages_request_builder.go @@ -100,10 +100,10 @@ func (m *DeletedTeamsItemChannelsItemMessagesRequestBuilder) Get(ctx context.Con } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageCollectionResponseable), nil } -// Post send a new chatMessage in the specified channel or a chat. +// Post send a new chatMessage in the specified channel. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/chatmessage-post?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/channel-post-messages?view=graph-rest-1.0 func (m *DeletedTeamsItemChannelsItemMessagesRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, requestConfiguration *DeletedTeamsItemChannelsItemMessagesRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -135,7 +135,7 @@ func (m *DeletedTeamsItemChannelsItemMessagesRequestBuilder) ToGetRequestInforma requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation send a new chatMessage in the specified channel or a chat. +// ToPostRequestInformation send a new chatMessage in the specified channel. func (m *DeletedTeamsItemChannelsItemMessagesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, requestConfiguration *DeletedTeamsItemChannelsItemMessagesRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/teamwork/deleted_teams_item_channels_item_unarchive_request_builder.go b/teamwork/deleted_teams_item_channels_item_unarchive_request_builder.go new file mode 100644 index 00000000000..438113a2fb9 --- /dev/null +++ b/teamwork/deleted_teams_item_channels_item_unarchive_request_builder.go @@ -0,0 +1,62 @@ +package teamwork + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// DeletedTeamsItemChannelsItemUnarchiveRequestBuilder provides operations to call the unarchive method. +type DeletedTeamsItemChannelsItemUnarchiveRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// DeletedTeamsItemChannelsItemUnarchiveRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type DeletedTeamsItemChannelsItemUnarchiveRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewDeletedTeamsItemChannelsItemUnarchiveRequestBuilderInternal instantiates a new UnarchiveRequestBuilder and sets the default values. +func NewDeletedTeamsItemChannelsItemUnarchiveRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*DeletedTeamsItemChannelsItemUnarchiveRequestBuilder) { + m := &DeletedTeamsItemChannelsItemUnarchiveRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teamwork/deletedTeams/{deletedTeam%2Did}/channels/{channel%2Did}/unarchive", pathParameters), + } + return m +} +// NewDeletedTeamsItemChannelsItemUnarchiveRequestBuilder instantiates a new UnarchiveRequestBuilder and sets the default values. +func NewDeletedTeamsItemChannelsItemUnarchiveRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*DeletedTeamsItemChannelsItemUnarchiveRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewDeletedTeamsItemChannelsItemUnarchiveRequestBuilderInternal(urlParams, requestAdapter) +} +// Post invoke action unarchive +func (m *DeletedTeamsItemChannelsItemUnarchiveRequestBuilder) Post(ctx context.Context, requestConfiguration *DeletedTeamsItemChannelsItemUnarchiveRequestBuilderPostRequestConfiguration)(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation invoke action unarchive +func (m *DeletedTeamsItemChannelsItemUnarchiveRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *DeletedTeamsItemChannelsItemUnarchiveRequestBuilderPostRequestConfiguration)(*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. +func (m *DeletedTeamsItemChannelsItemUnarchiveRequestBuilder) WithUrl(rawUrl string)(*DeletedTeamsItemChannelsItemUnarchiveRequestBuilder) { + return NewDeletedTeamsItemChannelsItemUnarchiveRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/teamwork/team_templates_item_definitions_item_team_definition_channels_channel_item_request_builder.go b/teamwork/team_templates_item_definitions_item_team_definition_channels_channel_item_request_builder.go index e0d3c345a24..1c3cd016dcb 100644 --- a/teamwork/team_templates_item_definitions_item_team_definition_channels_channel_item_request_builder.go +++ b/teamwork/team_templates_item_definitions_item_team_definition_channels_channel_item_request_builder.go @@ -41,6 +41,10 @@ type TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsChannelItemRequestBui // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } +// Archive provides operations to call the archive method. +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsChannelItemRequestBuilder) Archive()(*TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemArchiveRequestBuilder) { + return NewTeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemArchiveRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // CompleteMigration provides operations to call the completeMigration method. func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsChannelItemRequestBuilder) CompleteMigration()(*TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemCompleteMigrationRequestBuilder) { return NewTeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemCompleteMigrationRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) @@ -190,6 +194,10 @@ func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsChannelItemReques } return requestInfo, nil } +// Unarchive provides operations to call the unarchive method. +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsChannelItemRequestBuilder) Unarchive()(*TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemUnarchiveRequestBuilder) { + return NewTeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemUnarchiveRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsChannelItemRequestBuilder) WithUrl(rawUrl string)(*TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsChannelItemRequestBuilder) { return NewTeamTemplatesItemDefinitionsItemTeamDefinitionChannelsChannelItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); diff --git a/teamwork/team_templates_item_definitions_item_team_definition_channels_item_archive_post_request_body.go b/teamwork/team_templates_item_definitions_item_team_definition_channels_item_archive_post_request_body.go new file mode 100644 index 00000000000..6a80b18f892 --- /dev/null +++ b/teamwork/team_templates_item_definitions_item_team_definition_channels_item_archive_post_request_body.go @@ -0,0 +1,110 @@ +package teamwork + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +// TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemArchivePostRequestBody +type TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemArchivePostRequestBody struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewTeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemArchivePostRequestBody instantiates a new TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemArchivePostRequestBody and sets the default values. +func NewTeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemArchivePostRequestBody()(*TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemArchivePostRequestBody) { + m := &TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemArchivePostRequestBody{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemArchivePostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateTeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemArchivePostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemArchivePostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemArchivePostRequestBody) GetAdditionalData()(map[string]any) { + val , err := m.backingStore.Get("additionalData") + if err != nil { + panic(err) + } + if val == nil { + var value = make(map[string]any); + m.SetAdditionalData(value); + } + return val.(map[string]any) +} +// GetBackingStore gets the BackingStore property value. Stores model information. +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemArchivePostRequestBody) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetFieldDeserializers the deserialization information for the current model +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemArchivePostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["shouldSetSpoSiteReadOnlyForMembers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetShouldSetSpoSiteReadOnlyForMembers(val) + } + return nil + } + return res +} +// GetShouldSetSpoSiteReadOnlyForMembers gets the shouldSetSpoSiteReadOnlyForMembers property value. The shouldSetSpoSiteReadOnlyForMembers property +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemArchivePostRequestBody) GetShouldSetSpoSiteReadOnlyForMembers()(*bool) { + val, err := m.GetBackingStore().Get("shouldSetSpoSiteReadOnlyForMembers") + if err != nil { + panic(err) + } + if val != nil { + return val.(*bool) + } + return nil +} +// Serialize serializes information the current object +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemArchivePostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("shouldSetSpoSiteReadOnlyForMembers", m.GetShouldSetSpoSiteReadOnlyForMembers()) + 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 *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemArchivePostRequestBody) 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 *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemArchivePostRequestBody) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetShouldSetSpoSiteReadOnlyForMembers sets the shouldSetSpoSiteReadOnlyForMembers property value. The shouldSetSpoSiteReadOnlyForMembers property +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemArchivePostRequestBody) SetShouldSetSpoSiteReadOnlyForMembers(value *bool)() { + err := m.GetBackingStore().Set("shouldSetSpoSiteReadOnlyForMembers", value) + if err != nil { + panic(err) + } +} +// TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemArchivePostRequestBodyable +type TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemArchivePostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetShouldSetSpoSiteReadOnlyForMembers()(*bool) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetShouldSetSpoSiteReadOnlyForMembers(value *bool)() +} diff --git a/teamwork/team_templates_item_definitions_item_team_definition_channels_item_archive_request_builder.go b/teamwork/team_templates_item_definitions_item_team_definition_channels_item_archive_request_builder.go new file mode 100644 index 00000000000..6274609fa15 --- /dev/null +++ b/teamwork/team_templates_item_definitions_item_team_definition_channels_item_archive_request_builder.go @@ -0,0 +1,66 @@ +package teamwork + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemArchiveRequestBuilder provides operations to call the archive method. +type TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemArchiveRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemArchiveRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemArchiveRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewTeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemArchiveRequestBuilderInternal instantiates a new ArchiveRequestBuilder and sets the default values. +func NewTeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemArchiveRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemArchiveRequestBuilder) { + m := &TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemArchiveRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teamwork/teamTemplates/{teamTemplate%2Did}/definitions/{teamTemplateDefinition%2Did}/teamDefinition/channels/{channel%2Did}/archive", pathParameters), + } + return m +} +// NewTeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemArchiveRequestBuilder instantiates a new ArchiveRequestBuilder and sets the default values. +func NewTeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemArchiveRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemArchiveRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewTeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemArchiveRequestBuilderInternal(urlParams, requestAdapter) +} +// Post invoke action archive +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemArchiveRequestBuilder) Post(ctx context.Context, body TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemArchivePostRequestBodyable, requestConfiguration *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemArchiveRequestBuilderPostRequestConfiguration)(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation invoke action archive +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemArchiveRequestBuilder) ToPostRequestInformation(ctx context.Context, body TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemArchivePostRequestBodyable, requestConfiguration *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemArchiveRequestBuilderPostRequestConfiguration)(*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. +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemArchiveRequestBuilder) WithUrl(rawUrl string)(*TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemArchiveRequestBuilder) { + return NewTeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemArchiveRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/teamwork/team_templates_item_definitions_item_team_definition_channels_item_members_conversation_member_item_request_builder.go b/teamwork/team_templates_item_definitions_item_team_definition_channels_item_members_conversation_member_item_request_builder.go index 529c8566520..52b824894a2 100644 --- a/teamwork/team_templates_item_definitions_item_team_definition_channels_item_members_conversation_member_item_request_builder.go +++ b/teamwork/team_templates_item_definitions_item_team_definition_channels_item_members_conversation_member_item_request_builder.go @@ -95,10 +95,10 @@ func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemMembersConver } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable), nil } -// Patch update the role of a conversationMember in a team.or channel. +// Patch update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/conversationmember-update?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/channel-update-members?view=graph-rest-1.0 func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemMembersConversationMemberItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable, requestConfiguration *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemMembersConversationMemberItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable, error) { requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -140,7 +140,7 @@ func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemMembersConver requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPatchRequestInformation update the role of a conversationMember in a team.or channel. +// ToPatchRequestInformation update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemMembersConversationMemberItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable, requestConfiguration *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemMembersConversationMemberItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/teamwork/team_templates_item_definitions_item_team_definition_channels_item_messages_request_builder.go b/teamwork/team_templates_item_definitions_item_team_definition_channels_item_messages_request_builder.go index f63145389f8..3aa5dc9b5c7 100644 --- a/teamwork/team_templates_item_definitions_item_team_definition_channels_item_messages_request_builder.go +++ b/teamwork/team_templates_item_definitions_item_team_definition_channels_item_messages_request_builder.go @@ -100,10 +100,10 @@ func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemMessagesReque } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageCollectionResponseable), nil } -// Post send a new chatMessage in the specified channel or a chat. +// Post send a new chatMessage in the specified channel. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/chatmessage-post?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/channel-post-messages?view=graph-rest-1.0 func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemMessagesRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, requestConfiguration *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemMessagesRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -135,7 +135,7 @@ func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemMessagesReque requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation send a new chatMessage in the specified channel or a chat. +// ToPostRequestInformation send a new chatMessage in the specified channel. func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemMessagesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, requestConfiguration *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemMessagesRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/teamwork/team_templates_item_definitions_item_team_definition_channels_item_unarchive_request_builder.go b/teamwork/team_templates_item_definitions_item_team_definition_channels_item_unarchive_request_builder.go new file mode 100644 index 00000000000..c0e7219fcb7 --- /dev/null +++ b/teamwork/team_templates_item_definitions_item_team_definition_channels_item_unarchive_request_builder.go @@ -0,0 +1,62 @@ +package teamwork + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemUnarchiveRequestBuilder provides operations to call the unarchive method. +type TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemUnarchiveRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemUnarchiveRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemUnarchiveRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewTeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemUnarchiveRequestBuilderInternal instantiates a new UnarchiveRequestBuilder and sets the default values. +func NewTeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemUnarchiveRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemUnarchiveRequestBuilder) { + m := &TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemUnarchiveRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teamwork/teamTemplates/{teamTemplate%2Did}/definitions/{teamTemplateDefinition%2Did}/teamDefinition/channels/{channel%2Did}/unarchive", pathParameters), + } + return m +} +// NewTeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemUnarchiveRequestBuilder instantiates a new UnarchiveRequestBuilder and sets the default values. +func NewTeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemUnarchiveRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemUnarchiveRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewTeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemUnarchiveRequestBuilderInternal(urlParams, requestAdapter) +} +// Post invoke action unarchive +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemUnarchiveRequestBuilder) Post(ctx context.Context, requestConfiguration *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemUnarchiveRequestBuilderPostRequestConfiguration)(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation invoke action unarchive +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemUnarchiveRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemUnarchiveRequestBuilderPostRequestConfiguration)(*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. +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemUnarchiveRequestBuilder) WithUrl(rawUrl string)(*TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemUnarchiveRequestBuilder) { + return NewTeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemUnarchiveRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/teamwork/team_templates_item_definitions_item_team_definition_primary_channel_archive_post_request_body.go b/teamwork/team_templates_item_definitions_item_team_definition_primary_channel_archive_post_request_body.go new file mode 100644 index 00000000000..fed3f4094a9 --- /dev/null +++ b/teamwork/team_templates_item_definitions_item_team_definition_primary_channel_archive_post_request_body.go @@ -0,0 +1,110 @@ +package teamwork + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +// TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelArchivePostRequestBody +type TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelArchivePostRequestBody struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewTeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelArchivePostRequestBody instantiates a new TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelArchivePostRequestBody and sets the default values. +func NewTeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelArchivePostRequestBody()(*TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelArchivePostRequestBody) { + m := &TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelArchivePostRequestBody{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateTeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelArchivePostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateTeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelArchivePostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelArchivePostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelArchivePostRequestBody) GetAdditionalData()(map[string]any) { + val , err := m.backingStore.Get("additionalData") + if err != nil { + panic(err) + } + if val == nil { + var value = make(map[string]any); + m.SetAdditionalData(value); + } + return val.(map[string]any) +} +// GetBackingStore gets the BackingStore property value. Stores model information. +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelArchivePostRequestBody) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetFieldDeserializers the deserialization information for the current model +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelArchivePostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["shouldSetSpoSiteReadOnlyForMembers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetShouldSetSpoSiteReadOnlyForMembers(val) + } + return nil + } + return res +} +// GetShouldSetSpoSiteReadOnlyForMembers gets the shouldSetSpoSiteReadOnlyForMembers property value. The shouldSetSpoSiteReadOnlyForMembers property +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelArchivePostRequestBody) GetShouldSetSpoSiteReadOnlyForMembers()(*bool) { + val, err := m.GetBackingStore().Get("shouldSetSpoSiteReadOnlyForMembers") + if err != nil { + panic(err) + } + if val != nil { + return val.(*bool) + } + return nil +} +// Serialize serializes information the current object +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelArchivePostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("shouldSetSpoSiteReadOnlyForMembers", m.GetShouldSetSpoSiteReadOnlyForMembers()) + 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 *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelArchivePostRequestBody) 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 *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelArchivePostRequestBody) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetShouldSetSpoSiteReadOnlyForMembers sets the shouldSetSpoSiteReadOnlyForMembers property value. The shouldSetSpoSiteReadOnlyForMembers property +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelArchivePostRequestBody) SetShouldSetSpoSiteReadOnlyForMembers(value *bool)() { + err := m.GetBackingStore().Set("shouldSetSpoSiteReadOnlyForMembers", value) + if err != nil { + panic(err) + } +} +// TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelArchivePostRequestBodyable +type TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelArchivePostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetShouldSetSpoSiteReadOnlyForMembers()(*bool) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetShouldSetSpoSiteReadOnlyForMembers(value *bool)() +} diff --git a/teamwork/team_templates_item_definitions_item_team_definition_primary_channel_archive_request_builder.go b/teamwork/team_templates_item_definitions_item_team_definition_primary_channel_archive_request_builder.go new file mode 100644 index 00000000000..cecb5b95f98 --- /dev/null +++ b/teamwork/team_templates_item_definitions_item_team_definition_primary_channel_archive_request_builder.go @@ -0,0 +1,66 @@ +package teamwork + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelArchiveRequestBuilder provides operations to call the archive method. +type TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelArchiveRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelArchiveRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelArchiveRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewTeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelArchiveRequestBuilderInternal instantiates a new ArchiveRequestBuilder and sets the default values. +func NewTeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelArchiveRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelArchiveRequestBuilder) { + m := &TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelArchiveRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teamwork/teamTemplates/{teamTemplate%2Did}/definitions/{teamTemplateDefinition%2Did}/teamDefinition/primaryChannel/archive", pathParameters), + } + return m +} +// NewTeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelArchiveRequestBuilder instantiates a new ArchiveRequestBuilder and sets the default values. +func NewTeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelArchiveRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelArchiveRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewTeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelArchiveRequestBuilderInternal(urlParams, requestAdapter) +} +// Post invoke action archive +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelArchiveRequestBuilder) Post(ctx context.Context, body TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelArchivePostRequestBodyable, requestConfiguration *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelArchiveRequestBuilderPostRequestConfiguration)(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation invoke action archive +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelArchiveRequestBuilder) ToPostRequestInformation(ctx context.Context, body TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelArchivePostRequestBodyable, requestConfiguration *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelArchiveRequestBuilderPostRequestConfiguration)(*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. +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelArchiveRequestBuilder) WithUrl(rawUrl string)(*TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelArchiveRequestBuilder) { + return NewTeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelArchiveRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/teamwork/team_templates_item_definitions_item_team_definition_primary_channel_members_conversation_member_item_request_builder.go b/teamwork/team_templates_item_definitions_item_team_definition_primary_channel_members_conversation_member_item_request_builder.go index d81b0894299..9d080f2be55 100644 --- a/teamwork/team_templates_item_definitions_item_team_definition_primary_channel_members_conversation_member_item_request_builder.go +++ b/teamwork/team_templates_item_definitions_item_team_definition_primary_channel_members_conversation_member_item_request_builder.go @@ -95,10 +95,10 @@ func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelMembersConv } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable), nil } -// Patch update the role of a conversationMember in a team.or channel. +// Patch update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/conversationmember-update?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/channel-update-members?view=graph-rest-1.0 func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelMembersConversationMemberItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable, requestConfiguration *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelMembersConversationMemberItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable, error) { requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -140,7 +140,7 @@ func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelMembersConv requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPatchRequestInformation update the role of a conversationMember in a team.or channel. +// ToPatchRequestInformation update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelMembersConversationMemberItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ConversationMemberable, requestConfiguration *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelMembersConversationMemberItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/teamwork/team_templates_item_definitions_item_team_definition_primary_channel_messages_request_builder.go b/teamwork/team_templates_item_definitions_item_team_definition_primary_channel_messages_request_builder.go index 9318a3fb0e4..0c8d7fe2086 100644 --- a/teamwork/team_templates_item_definitions_item_team_definition_primary_channel_messages_request_builder.go +++ b/teamwork/team_templates_item_definitions_item_team_definition_primary_channel_messages_request_builder.go @@ -100,10 +100,10 @@ func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelMessagesReq } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageCollectionResponseable), nil } -// Post send a new chatMessage in the specified channel or a chat. +// Post send a new chatMessage in the specified channel. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/chatmessage-post?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/channel-post-messages?view=graph-rest-1.0 func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelMessagesRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, requestConfiguration *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelMessagesRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -135,7 +135,7 @@ func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelMessagesReq requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation send a new chatMessage in the specified channel or a chat. +// ToPostRequestInformation send a new chatMessage in the specified channel. func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelMessagesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, requestConfiguration *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelMessagesRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/teamwork/team_templates_item_definitions_item_team_definition_primary_channel_request_builder.go b/teamwork/team_templates_item_definitions_item_team_definition_primary_channel_request_builder.go index 48243ffe482..b06c453ffe7 100644 --- a/teamwork/team_templates_item_definitions_item_team_definition_primary_channel_request_builder.go +++ b/teamwork/team_templates_item_definitions_item_team_definition_primary_channel_request_builder.go @@ -41,6 +41,10 @@ type TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelRequestBuilderP // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } +// Archive provides operations to call the archive method. +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelRequestBuilder) Archive()(*TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelArchiveRequestBuilder) { + return NewTeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelArchiveRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // CompleteMigration provides operations to call the completeMigration method. func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelRequestBuilder) CompleteMigration()(*TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelCompleteMigrationRequestBuilder) { return NewTeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelCompleteMigrationRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) @@ -184,6 +188,10 @@ func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelRequestBuil } return requestInfo, nil } +// Unarchive provides operations to call the unarchive method. +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelRequestBuilder) Unarchive()(*TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelUnarchiveRequestBuilder) { + return NewTeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelUnarchiveRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelRequestBuilder) WithUrl(rawUrl string)(*TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelRequestBuilder) { return NewTeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); diff --git a/teamwork/team_templates_item_definitions_item_team_definition_primary_channel_unarchive_request_builder.go b/teamwork/team_templates_item_definitions_item_team_definition_primary_channel_unarchive_request_builder.go new file mode 100644 index 00000000000..390bbf13de1 --- /dev/null +++ b/teamwork/team_templates_item_definitions_item_team_definition_primary_channel_unarchive_request_builder.go @@ -0,0 +1,62 @@ +package teamwork + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelUnarchiveRequestBuilder provides operations to call the unarchive method. +type TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelUnarchiveRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelUnarchiveRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelUnarchiveRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewTeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelUnarchiveRequestBuilderInternal instantiates a new UnarchiveRequestBuilder and sets the default values. +func NewTeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelUnarchiveRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelUnarchiveRequestBuilder) { + m := &TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelUnarchiveRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teamwork/teamTemplates/{teamTemplate%2Did}/definitions/{teamTemplateDefinition%2Did}/teamDefinition/primaryChannel/unarchive", pathParameters), + } + return m +} +// NewTeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelUnarchiveRequestBuilder instantiates a new UnarchiveRequestBuilder and sets the default values. +func NewTeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelUnarchiveRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelUnarchiveRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewTeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelUnarchiveRequestBuilderInternal(urlParams, requestAdapter) +} +// Post invoke action unarchive +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelUnarchiveRequestBuilder) Post(ctx context.Context, requestConfiguration *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelUnarchiveRequestBuilderPostRequestConfiguration)(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation invoke action unarchive +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelUnarchiveRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelUnarchiveRequestBuilderPostRequestConfiguration)(*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. +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelUnarchiveRequestBuilder) WithUrl(rawUrl string)(*TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelUnarchiveRequestBuilder) { + return NewTeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelUnarchiveRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/teamwork/team_templates_request_builder.go b/teamwork/team_templates_request_builder.go index 79606c0ea7c..d5ee33abf5e 100644 --- a/teamwork/team_templates_request_builder.go +++ b/teamwork/team_templates_request_builder.go @@ -11,7 +11,7 @@ import ( type TeamTemplatesRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// TeamTemplatesRequestBuilderGetQueryParameters get the list of teamTemplate objects that are available for a tenant. +// TeamTemplatesRequestBuilderGetQueryParameters list the teamTemplateDefinition objects associated with a teamTemplate. type TeamTemplatesRequestBuilderGetQueryParameters struct { // Include count of items Count *bool `uriparametername:"%24count"` @@ -74,10 +74,10 @@ func NewTeamTemplatesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee func (m *TeamTemplatesRequestBuilder) Count()(*TeamTemplatesCountRequestBuilder) { return NewTeamTemplatesCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Get get the list of teamTemplate objects that are available for a tenant. +// Get list the teamTemplateDefinition objects associated with a teamTemplate. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/teamwork-list-teamtemplates?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/teamtemplate-list-definitions?view=graph-rest-1.0 func (m *TeamTemplatesRequestBuilder) Get(ctx context.Context, requestConfiguration *TeamTemplatesRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.TeamTemplateCollectionResponseable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -115,7 +115,7 @@ func (m *TeamTemplatesRequestBuilder) Post(ctx context.Context, body ie233ee762e } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.TeamTemplateable), nil } -// ToGetRequestInformation get the list of teamTemplate objects that are available for a tenant. +// ToGetRequestInformation list the teamTemplateDefinition objects associated with a teamTemplate. func (m *TeamTemplatesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *TeamTemplatesRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/teamwork/teamwork_request_builder.go b/teamwork/teamwork_request_builder.go index 8e076dcf57a..f2152026a02 100644 --- a/teamwork/teamwork_request_builder.go +++ b/teamwork/teamwork_request_builder.go @@ -11,7 +11,7 @@ import ( type TeamworkRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// TeamworkRequestBuilderGetQueryParameters get teamwork +// TeamworkRequestBuilderGetQueryParameters get the properties and relationships of a teamwork object, such as the region of the organization and whether Microsoft Teams is enabled. type TeamworkRequestBuilderGetQueryParameters struct { // Expand related entities Expand []string `uriparametername:"%24expand"` @@ -59,7 +59,10 @@ func (m *TeamworkRequestBuilder) DeletedTeams()(*DeletedTeamsRequestBuilder) { func (m *TeamworkRequestBuilder) Devices()(*DevicesRequestBuilder) { return NewDevicesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Get get teamwork +// Get get the properties and relationships of a teamwork object, such as the region of the organization and whether Microsoft Teams is enabled. +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/teamwork-get?view=graph-rest-1.0 func (m *TeamworkRequestBuilder) Get(ctx context.Context, requestConfiguration *TeamworkRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Teamworkable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -109,7 +112,7 @@ func (m *TeamworkRequestBuilder) TeamsAppSettings()(*TeamsAppSettingsRequestBuil func (m *TeamworkRequestBuilder) TeamTemplates()(*TeamTemplatesRequestBuilder) { return NewTeamTemplatesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// ToGetRequestInformation get teamwork +// ToGetRequestInformation get the properties and relationships of a teamwork object, such as the region of the organization and whether Microsoft Teams is enabled. func (m *TeamworkRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *TeamworkRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/tenantrelationships/multi_tenant_organization_request_builder.go b/tenantrelationships/multi_tenant_organization_request_builder.go index 95ba1b5e2e3..1debbc0fb3a 100644 --- a/tenantrelationships/multi_tenant_organization_request_builder.go +++ b/tenantrelationships/multi_tenant_organization_request_builder.go @@ -73,10 +73,10 @@ func (m *MultiTenantOrganizationRequestBuilder) Get(ctx context.Context, request func (m *MultiTenantOrganizationRequestBuilder) JoinRequest()(*MultiTenantOrganizationJoinRequestRequestBuilder) { return NewMultiTenantOrganizationJoinRequestRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Patch update the properties of a multi-tenant organization. +// Patch create a new multi-tenant organization. By default, the creator tenant becomes an owner tenant upon successful creation. Only owner tenants can manage a multi-tenant organization. To allow for asynchronous processing, you must wait a minimum of 2 hours between creation and joining a multi-tenant organization. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/multitenantorganization-update?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/tenantrelationship-put-multitenantorganization?view=graph-rest-1.0 func (m *MultiTenantOrganizationRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MultiTenantOrganizationable, requestConfiguration *MultiTenantOrganizationRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MultiTenantOrganizationable, error) { requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -112,7 +112,7 @@ func (m *MultiTenantOrganizationRequestBuilder) ToGetRequestInformation(ctx cont requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPatchRequestInformation update the properties of a multi-tenant organization. +// ToPatchRequestInformation create a new multi-tenant organization. By default, the creator tenant becomes an owner tenant upon successful creation. Only owner tenants can manage a multi-tenant organization. To allow for asynchronous processing, you must wait a minimum of 2 hours between creation and joining a multi-tenant organization. func (m *MultiTenantOrganizationRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MultiTenantOrganizationable, requestConfiguration *MultiTenantOrganizationRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/users/item_calendar_calendar_view_item_attachments_request_builder.go b/users/item_calendar_calendar_view_item_attachments_request_builder.go index 59c438d9ca0..a246fd15356 100644 --- a/users/item_calendar_calendar_view_item_attachments_request_builder.go +++ b/users/item_calendar_calendar_view_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarCalendarViewItemAttachmentsRequestBuilder) Get(ctx context. } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarCalendarViewItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarCalendarViewItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -133,7 +133,7 @@ func (m *ItemCalendarCalendarViewItemAttachmentsRequestBuilder) ToGetRequestInfo requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemCalendarCalendarViewItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarCalendarViewItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/users/item_calendar_calendar_view_item_exception_occurrences_item_attachments_request_builder.go b/users/item_calendar_calendar_view_item_exception_occurrences_item_attachments_request_builder.go index a793ff7b51d..eadeb0ce0db 100644 --- a/users/item_calendar_calendar_view_item_exception_occurrences_item_attachments_request_builder.go +++ b/users/item_calendar_calendar_view_item_exception_occurrences_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarCalendarViewItemExceptionOccurrencesItemAttachmentsRequestB } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarCalendarViewItemExceptionOccurrencesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarCalendarViewItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -133,7 +133,7 @@ func (m *ItemCalendarCalendarViewItemExceptionOccurrencesItemAttachmentsRequestB requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemCalendarCalendarViewItemExceptionOccurrencesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarCalendarViewItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/users/item_calendar_calendar_view_item_exception_occurrences_item_instances_item_attachments_request_builder.go b/users/item_calendar_calendar_view_item_exception_occurrences_item_instances_item_attachments_request_builder.go index 5018e092283..e2cb55b29fd 100644 --- a/users/item_calendar_calendar_view_item_exception_occurrences_item_instances_item_attachments_request_builder.go +++ b/users/item_calendar_calendar_view_item_exception_occurrences_item_instances_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarCalendarViewItemExceptionOccurrencesItemInstancesItemAttach } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarCalendarViewItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarCalendarViewItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -133,7 +133,7 @@ func (m *ItemCalendarCalendarViewItemExceptionOccurrencesItemInstancesItemAttach requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemCalendarCalendarViewItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarCalendarViewItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/users/item_calendar_calendar_view_item_instances_item_attachments_request_builder.go b/users/item_calendar_calendar_view_item_instances_item_attachments_request_builder.go index aa5088458c4..b7ffb1d1903 100644 --- a/users/item_calendar_calendar_view_item_instances_item_attachments_request_builder.go +++ b/users/item_calendar_calendar_view_item_instances_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarCalendarViewItemInstancesItemAttachmentsRequestBuilder) Get } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarCalendarViewItemInstancesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarCalendarViewItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -133,7 +133,7 @@ func (m *ItemCalendarCalendarViewItemInstancesItemAttachmentsRequestBuilder) ToG requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemCalendarCalendarViewItemInstancesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarCalendarViewItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/users/item_calendar_calendar_view_item_instances_item_exception_occurrences_item_attachments_request_builder.go b/users/item_calendar_calendar_view_item_instances_item_exception_occurrences_item_attachments_request_builder.go index eeef3add039..62c6d29cb1d 100644 --- a/users/item_calendar_calendar_view_item_instances_item_exception_occurrences_item_attachments_request_builder.go +++ b/users/item_calendar_calendar_view_item_instances_item_exception_occurrences_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarCalendarViewItemInstancesItemExceptionOccurrencesItemAttach } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarCalendarViewItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarCalendarViewItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -133,7 +133,7 @@ func (m *ItemCalendarCalendarViewItemInstancesItemExceptionOccurrencesItemAttach requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemCalendarCalendarViewItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarCalendarViewItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/users/item_calendar_events_item_attachments_request_builder.go b/users/item_calendar_events_item_attachments_request_builder.go index c03109fd47f..e75d31eb632 100644 --- a/users/item_calendar_events_item_attachments_request_builder.go +++ b/users/item_calendar_events_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarEventsItemAttachmentsRequestBuilder) Get(ctx context.Contex } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarEventsItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarEventsItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -133,7 +133,7 @@ func (m *ItemCalendarEventsItemAttachmentsRequestBuilder) ToGetRequestInformatio requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemCalendarEventsItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarEventsItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/users/item_calendar_events_item_exception_occurrences_item_attachments_request_builder.go b/users/item_calendar_events_item_exception_occurrences_item_attachments_request_builder.go index 60a000f5822..43d57b754e2 100644 --- a/users/item_calendar_events_item_exception_occurrences_item_attachments_request_builder.go +++ b/users/item_calendar_events_item_exception_occurrences_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarEventsItemExceptionOccurrencesItemAttachmentsRequestBuilder } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarEventsItemExceptionOccurrencesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarEventsItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -133,7 +133,7 @@ func (m *ItemCalendarEventsItemExceptionOccurrencesItemAttachmentsRequestBuilder requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemCalendarEventsItemExceptionOccurrencesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarEventsItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/users/item_calendar_events_item_exception_occurrences_item_instances_item_attachments_request_builder.go b/users/item_calendar_events_item_exception_occurrences_item_instances_item_attachments_request_builder.go index b3b6468d998..48618f96f76 100644 --- a/users/item_calendar_events_item_exception_occurrences_item_instances_item_attachments_request_builder.go +++ b/users/item_calendar_events_item_exception_occurrences_item_instances_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarEventsItemExceptionOccurrencesItemInstancesItemAttachmentsR } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarEventsItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarEventsItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -133,7 +133,7 @@ func (m *ItemCalendarEventsItemExceptionOccurrencesItemInstancesItemAttachmentsR requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemCalendarEventsItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarEventsItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/users/item_calendar_events_item_instances_item_attachments_request_builder.go b/users/item_calendar_events_item_instances_item_attachments_request_builder.go index c6aed9e8485..394901da841 100644 --- a/users/item_calendar_events_item_instances_item_attachments_request_builder.go +++ b/users/item_calendar_events_item_instances_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarEventsItemInstancesItemAttachmentsRequestBuilder) Get(ctx c } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarEventsItemInstancesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarEventsItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -133,7 +133,7 @@ func (m *ItemCalendarEventsItemInstancesItemAttachmentsRequestBuilder) ToGetRequ requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemCalendarEventsItemInstancesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarEventsItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/users/item_calendar_events_item_instances_item_exception_occurrences_item_attachments_request_builder.go b/users/item_calendar_events_item_instances_item_exception_occurrences_item_attachments_request_builder.go index 13f5de7969d..bcbc86229d0 100644 --- a/users/item_calendar_events_item_instances_item_exception_occurrences_item_attachments_request_builder.go +++ b/users/item_calendar_events_item_instances_item_exception_occurrences_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarEventsItemInstancesItemExceptionOccurrencesItemAttachmentsR } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarEventsItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarEventsItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -133,7 +133,7 @@ func (m *ItemCalendarEventsItemInstancesItemExceptionOccurrencesItemAttachmentsR requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemCalendarEventsItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarEventsItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/users/item_calendar_groups_item_calendars_item_calendar_view_item_attachments_request_builder.go b/users/item_calendar_groups_item_calendars_item_calendar_view_item_attachments_request_builder.go index 0bcadb50e1d..76c8f54f834 100644 --- a/users/item_calendar_groups_item_calendars_item_calendar_view_item_attachments_request_builder.go +++ b/users/item_calendar_groups_item_calendars_item_calendar_view_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarGroupsItemCalendarsItemCalendarViewItemAttachmentsRequestBu } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarGroupsItemCalendarsItemCalendarViewItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarGroupsItemCalendarsItemCalendarViewItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -133,7 +133,7 @@ func (m *ItemCalendarGroupsItemCalendarsItemCalendarViewItemAttachmentsRequestBu requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemCalendarGroupsItemCalendarsItemCalendarViewItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarGroupsItemCalendarsItemCalendarViewItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/users/item_calendar_groups_item_calendars_item_calendar_view_item_exception_occurrences_item_attachments_request_builder.go b/users/item_calendar_groups_item_calendars_item_calendar_view_item_exception_occurrences_item_attachments_request_builder.go index 38cb1954a7b..6af4f986a7b 100644 --- a/users/item_calendar_groups_item_calendars_item_calendar_view_item_exception_occurrences_item_attachments_request_builder.go +++ b/users/item_calendar_groups_item_calendars_item_calendar_view_item_exception_occurrences_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarGroupsItemCalendarsItemCalendarViewItemExceptionOccurrences } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarGroupsItemCalendarsItemCalendarViewItemExceptionOccurrencesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarGroupsItemCalendarsItemCalendarViewItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -133,7 +133,7 @@ func (m *ItemCalendarGroupsItemCalendarsItemCalendarViewItemExceptionOccurrences requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemCalendarGroupsItemCalendarsItemCalendarViewItemExceptionOccurrencesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarGroupsItemCalendarsItemCalendarViewItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/users/item_calendar_groups_item_calendars_item_calendar_view_item_exception_occurrences_item_instances_item_attachments_request_builder.go b/users/item_calendar_groups_item_calendars_item_calendar_view_item_exception_occurrences_item_instances_item_attachments_request_builder.go index 55da006899a..bc3a22e3f99 100644 --- a/users/item_calendar_groups_item_calendars_item_calendar_view_item_exception_occurrences_item_instances_item_attachments_request_builder.go +++ b/users/item_calendar_groups_item_calendars_item_calendar_view_item_exception_occurrences_item_instances_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarGroupsItemCalendarsItemCalendarViewItemExceptionOccurrences } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarGroupsItemCalendarsItemCalendarViewItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarGroupsItemCalendarsItemCalendarViewItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -133,7 +133,7 @@ func (m *ItemCalendarGroupsItemCalendarsItemCalendarViewItemExceptionOccurrences requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemCalendarGroupsItemCalendarsItemCalendarViewItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarGroupsItemCalendarsItemCalendarViewItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/users/item_calendar_groups_item_calendars_item_calendar_view_item_instances_item_attachments_request_builder.go b/users/item_calendar_groups_item_calendars_item_calendar_view_item_instances_item_attachments_request_builder.go index 5210b5a564b..a9b33b9636a 100644 --- a/users/item_calendar_groups_item_calendars_item_calendar_view_item_instances_item_attachments_request_builder.go +++ b/users/item_calendar_groups_item_calendars_item_calendar_view_item_instances_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarGroupsItemCalendarsItemCalendarViewItemInstancesItemAttachm } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarGroupsItemCalendarsItemCalendarViewItemInstancesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarGroupsItemCalendarsItemCalendarViewItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -133,7 +133,7 @@ func (m *ItemCalendarGroupsItemCalendarsItemCalendarViewItemInstancesItemAttachm requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemCalendarGroupsItemCalendarsItemCalendarViewItemInstancesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarGroupsItemCalendarsItemCalendarViewItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/users/item_calendar_groups_item_calendars_item_calendar_view_item_instances_item_exception_occurrences_item_attachments_request_builder.go b/users/item_calendar_groups_item_calendars_item_calendar_view_item_instances_item_exception_occurrences_item_attachments_request_builder.go index 27c030e5c4a..3ad82d70267 100644 --- a/users/item_calendar_groups_item_calendars_item_calendar_view_item_instances_item_exception_occurrences_item_attachments_request_builder.go +++ b/users/item_calendar_groups_item_calendars_item_calendar_view_item_instances_item_exception_occurrences_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarGroupsItemCalendarsItemCalendarViewItemInstancesItemExcepti } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarGroupsItemCalendarsItemCalendarViewItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarGroupsItemCalendarsItemCalendarViewItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -133,7 +133,7 @@ func (m *ItemCalendarGroupsItemCalendarsItemCalendarViewItemInstancesItemExcepti requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemCalendarGroupsItemCalendarsItemCalendarViewItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarGroupsItemCalendarsItemCalendarViewItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/users/item_calendar_groups_item_calendars_item_events_item_attachments_request_builder.go b/users/item_calendar_groups_item_calendars_item_events_item_attachments_request_builder.go index 52fd750e147..88cb2082437 100644 --- a/users/item_calendar_groups_item_calendars_item_events_item_attachments_request_builder.go +++ b/users/item_calendar_groups_item_calendars_item_events_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarGroupsItemCalendarsItemEventsItemAttachmentsRequestBuilder) } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarGroupsItemCalendarsItemEventsItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarGroupsItemCalendarsItemEventsItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -133,7 +133,7 @@ func (m *ItemCalendarGroupsItemCalendarsItemEventsItemAttachmentsRequestBuilder) requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemCalendarGroupsItemCalendarsItemEventsItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarGroupsItemCalendarsItemEventsItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/users/item_calendar_groups_item_calendars_item_events_item_exception_occurrences_item_attachments_request_builder.go b/users/item_calendar_groups_item_calendars_item_events_item_exception_occurrences_item_attachments_request_builder.go index b2a7c159b3a..fcc2938f32e 100644 --- a/users/item_calendar_groups_item_calendars_item_events_item_exception_occurrences_item_attachments_request_builder.go +++ b/users/item_calendar_groups_item_calendars_item_events_item_exception_occurrences_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarGroupsItemCalendarsItemEventsItemExceptionOccurrencesItemAt } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarGroupsItemCalendarsItemEventsItemExceptionOccurrencesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarGroupsItemCalendarsItemEventsItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -133,7 +133,7 @@ func (m *ItemCalendarGroupsItemCalendarsItemEventsItemExceptionOccurrencesItemAt requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemCalendarGroupsItemCalendarsItemEventsItemExceptionOccurrencesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarGroupsItemCalendarsItemEventsItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/users/item_calendar_groups_item_calendars_item_events_item_exception_occurrences_item_instances_item_attachments_request_builder.go b/users/item_calendar_groups_item_calendars_item_events_item_exception_occurrences_item_instances_item_attachments_request_builder.go index 1383e4119fc..dc22f49904c 100644 --- a/users/item_calendar_groups_item_calendars_item_events_item_exception_occurrences_item_instances_item_attachments_request_builder.go +++ b/users/item_calendar_groups_item_calendars_item_events_item_exception_occurrences_item_instances_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarGroupsItemCalendarsItemEventsItemExceptionOccurrencesItemIn } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarGroupsItemCalendarsItemEventsItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarGroupsItemCalendarsItemEventsItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -133,7 +133,7 @@ func (m *ItemCalendarGroupsItemCalendarsItemEventsItemExceptionOccurrencesItemIn requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemCalendarGroupsItemCalendarsItemEventsItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarGroupsItemCalendarsItemEventsItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/users/item_calendar_groups_item_calendars_item_events_item_instances_item_attachments_request_builder.go b/users/item_calendar_groups_item_calendars_item_events_item_instances_item_attachments_request_builder.go index cf4a1e62284..8ca97b6ae8c 100644 --- a/users/item_calendar_groups_item_calendars_item_events_item_instances_item_attachments_request_builder.go +++ b/users/item_calendar_groups_item_calendars_item_events_item_instances_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarGroupsItemCalendarsItemEventsItemInstancesItemAttachmentsRe } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarGroupsItemCalendarsItemEventsItemInstancesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarGroupsItemCalendarsItemEventsItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -133,7 +133,7 @@ func (m *ItemCalendarGroupsItemCalendarsItemEventsItemInstancesItemAttachmentsRe requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemCalendarGroupsItemCalendarsItemEventsItemInstancesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarGroupsItemCalendarsItemEventsItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/users/item_calendar_groups_item_calendars_item_events_item_instances_item_exception_occurrences_item_attachments_request_builder.go b/users/item_calendar_groups_item_calendars_item_events_item_instances_item_exception_occurrences_item_attachments_request_builder.go index 58df38981ba..6fdc6d1bc35 100644 --- a/users/item_calendar_groups_item_calendars_item_events_item_instances_item_exception_occurrences_item_attachments_request_builder.go +++ b/users/item_calendar_groups_item_calendars_item_events_item_instances_item_exception_occurrences_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarGroupsItemCalendarsItemEventsItemInstancesItemExceptionOccu } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarGroupsItemCalendarsItemEventsItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarGroupsItemCalendarsItemEventsItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -133,7 +133,7 @@ func (m *ItemCalendarGroupsItemCalendarsItemEventsItemInstancesItemExceptionOccu requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemCalendarGroupsItemCalendarsItemEventsItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarGroupsItemCalendarsItemEventsItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/users/item_calendar_view_item_attachments_request_builder.go b/users/item_calendar_view_item_attachments_request_builder.go index 39627521faa..49b6289cbe8 100644 --- a/users/item_calendar_view_item_attachments_request_builder.go +++ b/users/item_calendar_view_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarViewItemAttachmentsRequestBuilder) Get(ctx context.Context, } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarViewItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarViewItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -133,7 +133,7 @@ func (m *ItemCalendarViewItemAttachmentsRequestBuilder) ToGetRequestInformation( requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemCalendarViewItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarViewItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/users/item_calendar_view_item_exception_occurrences_item_attachments_request_builder.go b/users/item_calendar_view_item_exception_occurrences_item_attachments_request_builder.go index 23dfab72dfd..522a012b8dc 100644 --- a/users/item_calendar_view_item_exception_occurrences_item_attachments_request_builder.go +++ b/users/item_calendar_view_item_exception_occurrences_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarViewItemExceptionOccurrencesItemAttachmentsRequestBuilder) } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarViewItemExceptionOccurrencesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarViewItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -133,7 +133,7 @@ func (m *ItemCalendarViewItemExceptionOccurrencesItemAttachmentsRequestBuilder) requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemCalendarViewItemExceptionOccurrencesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarViewItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/users/item_calendar_view_item_exception_occurrences_item_instances_item_attachments_request_builder.go b/users/item_calendar_view_item_exception_occurrences_item_instances_item_attachments_request_builder.go index 45814f095b6..3f07cc632e1 100644 --- a/users/item_calendar_view_item_exception_occurrences_item_instances_item_attachments_request_builder.go +++ b/users/item_calendar_view_item_exception_occurrences_item_instances_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarViewItemExceptionOccurrencesItemInstancesItemAttachmentsReq } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarViewItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarViewItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -133,7 +133,7 @@ func (m *ItemCalendarViewItemExceptionOccurrencesItemInstancesItemAttachmentsReq requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemCalendarViewItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarViewItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/users/item_calendar_view_item_instances_item_attachments_request_builder.go b/users/item_calendar_view_item_instances_item_attachments_request_builder.go index fa3bbd3c567..9d0c1629edf 100644 --- a/users/item_calendar_view_item_instances_item_attachments_request_builder.go +++ b/users/item_calendar_view_item_instances_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarViewItemInstancesItemAttachmentsRequestBuilder) Get(ctx con } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarViewItemInstancesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarViewItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -133,7 +133,7 @@ func (m *ItemCalendarViewItemInstancesItemAttachmentsRequestBuilder) ToGetReques requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemCalendarViewItemInstancesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarViewItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/users/item_calendar_view_item_instances_item_exception_occurrences_item_attachments_request_builder.go b/users/item_calendar_view_item_instances_item_exception_occurrences_item_attachments_request_builder.go index 21bb089bb61..bb254cca000 100644 --- a/users/item_calendar_view_item_instances_item_exception_occurrences_item_attachments_request_builder.go +++ b/users/item_calendar_view_item_instances_item_exception_occurrences_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarViewItemInstancesItemExceptionOccurrencesItemAttachmentsReq } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarViewItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarViewItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -133,7 +133,7 @@ func (m *ItemCalendarViewItemInstancesItemExceptionOccurrencesItemAttachmentsReq requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemCalendarViewItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarViewItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/users/item_calendars_item_calendar_view_item_attachments_request_builder.go b/users/item_calendars_item_calendar_view_item_attachments_request_builder.go index 3e622b5b4f2..a3e65aaf2ba 100644 --- a/users/item_calendars_item_calendar_view_item_attachments_request_builder.go +++ b/users/item_calendars_item_calendar_view_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarsItemCalendarViewItemAttachmentsRequestBuilder) Get(ctx con } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarsItemCalendarViewItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarsItemCalendarViewItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -133,7 +133,7 @@ func (m *ItemCalendarsItemCalendarViewItemAttachmentsRequestBuilder) ToGetReques requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemCalendarsItemCalendarViewItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarsItemCalendarViewItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/users/item_calendars_item_calendar_view_item_exception_occurrences_item_attachments_request_builder.go b/users/item_calendars_item_calendar_view_item_exception_occurrences_item_attachments_request_builder.go index 9e3e8805699..acf7ab76bab 100644 --- a/users/item_calendars_item_calendar_view_item_exception_occurrences_item_attachments_request_builder.go +++ b/users/item_calendars_item_calendar_view_item_exception_occurrences_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarsItemCalendarViewItemExceptionOccurrencesItemAttachmentsReq } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarsItemCalendarViewItemExceptionOccurrencesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarsItemCalendarViewItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -133,7 +133,7 @@ func (m *ItemCalendarsItemCalendarViewItemExceptionOccurrencesItemAttachmentsReq requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemCalendarsItemCalendarViewItemExceptionOccurrencesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarsItemCalendarViewItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/users/item_calendars_item_calendar_view_item_exception_occurrences_item_instances_item_attachments_request_builder.go b/users/item_calendars_item_calendar_view_item_exception_occurrences_item_instances_item_attachments_request_builder.go index 0c787d0f9ee..4d1dd777014 100644 --- a/users/item_calendars_item_calendar_view_item_exception_occurrences_item_instances_item_attachments_request_builder.go +++ b/users/item_calendars_item_calendar_view_item_exception_occurrences_item_instances_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarsItemCalendarViewItemExceptionOccurrencesItemInstancesItemA } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarsItemCalendarViewItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarsItemCalendarViewItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -133,7 +133,7 @@ func (m *ItemCalendarsItemCalendarViewItemExceptionOccurrencesItemInstancesItemA requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemCalendarsItemCalendarViewItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarsItemCalendarViewItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/users/item_calendars_item_calendar_view_item_instances_item_attachments_request_builder.go b/users/item_calendars_item_calendar_view_item_instances_item_attachments_request_builder.go index 0cb004ab294..b8b5da42f14 100644 --- a/users/item_calendars_item_calendar_view_item_instances_item_attachments_request_builder.go +++ b/users/item_calendars_item_calendar_view_item_instances_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarsItemCalendarViewItemInstancesItemAttachmentsRequestBuilder } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarsItemCalendarViewItemInstancesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarsItemCalendarViewItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -133,7 +133,7 @@ func (m *ItemCalendarsItemCalendarViewItemInstancesItemAttachmentsRequestBuilder requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemCalendarsItemCalendarViewItemInstancesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarsItemCalendarViewItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/users/item_calendars_item_calendar_view_item_instances_item_exception_occurrences_item_attachments_request_builder.go b/users/item_calendars_item_calendar_view_item_instances_item_exception_occurrences_item_attachments_request_builder.go index bd39d1fac64..eb49a2253f6 100644 --- a/users/item_calendars_item_calendar_view_item_instances_item_exception_occurrences_item_attachments_request_builder.go +++ b/users/item_calendars_item_calendar_view_item_instances_item_exception_occurrences_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarsItemCalendarViewItemInstancesItemExceptionOccurrencesItemA } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarsItemCalendarViewItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarsItemCalendarViewItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -133,7 +133,7 @@ func (m *ItemCalendarsItemCalendarViewItemInstancesItemExceptionOccurrencesItemA requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemCalendarsItemCalendarViewItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarsItemCalendarViewItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/users/item_calendars_item_events_item_attachments_request_builder.go b/users/item_calendars_item_events_item_attachments_request_builder.go index 2f897a16e55..c2fbac68228 100644 --- a/users/item_calendars_item_events_item_attachments_request_builder.go +++ b/users/item_calendars_item_events_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarsItemEventsItemAttachmentsRequestBuilder) Get(ctx context.C } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarsItemEventsItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarsItemEventsItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -133,7 +133,7 @@ func (m *ItemCalendarsItemEventsItemAttachmentsRequestBuilder) ToGetRequestInfor requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemCalendarsItemEventsItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarsItemEventsItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/users/item_calendars_item_events_item_exception_occurrences_item_attachments_request_builder.go b/users/item_calendars_item_events_item_exception_occurrences_item_attachments_request_builder.go index 1c01e0128b1..1f384f9dd6d 100644 --- a/users/item_calendars_item_events_item_exception_occurrences_item_attachments_request_builder.go +++ b/users/item_calendars_item_events_item_exception_occurrences_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarsItemEventsItemExceptionOccurrencesItemAttachmentsRequestBu } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarsItemEventsItemExceptionOccurrencesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarsItemEventsItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -133,7 +133,7 @@ func (m *ItemCalendarsItemEventsItemExceptionOccurrencesItemAttachmentsRequestBu requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemCalendarsItemEventsItemExceptionOccurrencesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarsItemEventsItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/users/item_calendars_item_events_item_exception_occurrences_item_instances_item_attachments_request_builder.go b/users/item_calendars_item_events_item_exception_occurrences_item_instances_item_attachments_request_builder.go index 3580abc45d6..844a968d0f5 100644 --- a/users/item_calendars_item_events_item_exception_occurrences_item_instances_item_attachments_request_builder.go +++ b/users/item_calendars_item_events_item_exception_occurrences_item_instances_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarsItemEventsItemExceptionOccurrencesItemInstancesItemAttachm } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarsItemEventsItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarsItemEventsItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -133,7 +133,7 @@ func (m *ItemCalendarsItemEventsItemExceptionOccurrencesItemInstancesItemAttachm requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemCalendarsItemEventsItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarsItemEventsItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/users/item_calendars_item_events_item_instances_item_attachments_request_builder.go b/users/item_calendars_item_events_item_instances_item_attachments_request_builder.go index 9575fa44d7b..2f6cfb0b697 100644 --- a/users/item_calendars_item_events_item_instances_item_attachments_request_builder.go +++ b/users/item_calendars_item_events_item_instances_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarsItemEventsItemInstancesItemAttachmentsRequestBuilder) Get( } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarsItemEventsItemInstancesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarsItemEventsItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -133,7 +133,7 @@ func (m *ItemCalendarsItemEventsItemInstancesItemAttachmentsRequestBuilder) ToGe requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemCalendarsItemEventsItemInstancesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarsItemEventsItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/users/item_calendars_item_events_item_instances_item_exception_occurrences_item_attachments_request_builder.go b/users/item_calendars_item_events_item_instances_item_exception_occurrences_item_attachments_request_builder.go index 10d94ca2acc..18e8be1152d 100644 --- a/users/item_calendars_item_events_item_instances_item_exception_occurrences_item_attachments_request_builder.go +++ b/users/item_calendars_item_events_item_instances_item_exception_occurrences_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemCalendarsItemEventsItemInstancesItemExceptionOccurrencesItemAttachm } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemCalendarsItemEventsItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarsItemEventsItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -133,7 +133,7 @@ func (m *ItemCalendarsItemEventsItemInstancesItemExceptionOccurrencesItemAttachm requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemCalendarsItemEventsItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemCalendarsItemEventsItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/users/item_chats_item_messages_request_builder.go b/users/item_chats_item_messages_request_builder.go index 6a11dcb7850..d3b088b0677 100644 --- a/users/item_chats_item_messages_request_builder.go +++ b/users/item_chats_item_messages_request_builder.go @@ -100,10 +100,10 @@ func (m *ItemChatsItemMessagesRequestBuilder) Get(ctx context.Context, requestCo } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageCollectionResponseable), nil } -// Post send a new chatMessage in the specified channel or a chat. +// Post send a new chatMessage in the specified chat. This API cannot create a new chat; you must use the list chats method to retrieve the ID of an existing chat before creating a chat message. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/chatmessage-post?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/chat-post-messages?view=graph-rest-1.0 func (m *ItemChatsItemMessagesRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, requestConfiguration *ItemChatsItemMessagesRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -135,7 +135,7 @@ func (m *ItemChatsItemMessagesRequestBuilder) ToGetRequestInformation(ctx contex requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation send a new chatMessage in the specified channel or a chat. +// ToPostRequestInformation send a new chatMessage in the specified chat. This API cannot create a new chat; you must use the list chats method to retrieve the ID of an existing chat before creating a chat message. func (m *ItemChatsItemMessagesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ChatMessageable, requestConfiguration *ItemChatsItemMessagesRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/users/item_events_item_attachments_request_builder.go b/users/item_events_item_attachments_request_builder.go index 4788d1185f5..f34c2c710d4 100644 --- a/users/item_events_item_attachments_request_builder.go +++ b/users/item_events_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemEventsItemAttachmentsRequestBuilder) Get(ctx context.Context, reque } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemEventsItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemEventsItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -133,7 +133,7 @@ func (m *ItemEventsItemAttachmentsRequestBuilder) ToGetRequestInformation(ctx co requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemEventsItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemEventsItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/users/item_events_item_exception_occurrences_item_attachments_request_builder.go b/users/item_events_item_exception_occurrences_item_attachments_request_builder.go index bec9cb61e91..134ea7bd3c5 100644 --- a/users/item_events_item_exception_occurrences_item_attachments_request_builder.go +++ b/users/item_events_item_exception_occurrences_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemEventsItemExceptionOccurrencesItemAttachmentsRequestBuilder) Get(ct } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemEventsItemExceptionOccurrencesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemEventsItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -133,7 +133,7 @@ func (m *ItemEventsItemExceptionOccurrencesItemAttachmentsRequestBuilder) ToGetR requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemEventsItemExceptionOccurrencesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemEventsItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/users/item_events_item_exception_occurrences_item_instances_item_attachments_request_builder.go b/users/item_events_item_exception_occurrences_item_instances_item_attachments_request_builder.go index ed2faed3f9b..ba9ffe4e0cd 100644 --- a/users/item_events_item_exception_occurrences_item_instances_item_attachments_request_builder.go +++ b/users/item_events_item_exception_occurrences_item_instances_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemEventsItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBu } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemEventsItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemEventsItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -133,7 +133,7 @@ func (m *ItemEventsItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBu requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemEventsItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemEventsItemExceptionOccurrencesItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/users/item_events_item_instances_item_attachments_request_builder.go b/users/item_events_item_instances_item_attachments_request_builder.go index 990d14c298e..b718a75b63f 100644 --- a/users/item_events_item_instances_item_attachments_request_builder.go +++ b/users/item_events_item_instances_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemEventsItemInstancesItemAttachmentsRequestBuilder) Get(ctx context.C } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemEventsItemInstancesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemEventsItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -133,7 +133,7 @@ func (m *ItemEventsItemInstancesItemAttachmentsRequestBuilder) ToGetRequestInfor requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemEventsItemInstancesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemEventsItemInstancesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/users/item_events_item_instances_item_exception_occurrences_item_attachments_request_builder.go b/users/item_events_item_instances_item_exception_occurrences_item_attachments_request_builder.go index c73ccecbb6c..bea73535f76 100644 --- a/users/item_events_item_instances_item_exception_occurrences_item_attachments_request_builder.go +++ b/users/item_events_item_instances_item_exception_occurrences_item_attachments_request_builder.go @@ -98,10 +98,10 @@ func (m *ItemEventsItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBu } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/event-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemEventsItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemEventsItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -133,7 +133,7 @@ func (m *ItemEventsItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBu requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemEventsItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemEventsItemInstancesItemExceptionOccurrencesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/users/item_license_details_get_teams_licensing_details_request_builder.go b/users/item_license_details_get_teams_licensing_details_request_builder.go new file mode 100644 index 00000000000..342a7138397 --- /dev/null +++ b/users/item_license_details_get_teams_licensing_details_request_builder.go @@ -0,0 +1,66 @@ +package users + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemLicenseDetailsGetTeamsLicensingDetailsRequestBuilder provides operations to call the getTeamsLicensingDetails method. +type ItemLicenseDetailsGetTeamsLicensingDetailsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemLicenseDetailsGetTeamsLicensingDetailsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemLicenseDetailsGetTeamsLicensingDetailsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewItemLicenseDetailsGetTeamsLicensingDetailsRequestBuilderInternal instantiates a new GetTeamsLicensingDetailsRequestBuilder and sets the default values. +func NewItemLicenseDetailsGetTeamsLicensingDetailsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemLicenseDetailsGetTeamsLicensingDetailsRequestBuilder) { + m := &ItemLicenseDetailsGetTeamsLicensingDetailsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/users/{user%2Did}/licenseDetails/getTeamsLicensingDetails()", pathParameters), + } + return m +} +// NewItemLicenseDetailsGetTeamsLicensingDetailsRequestBuilder instantiates a new GetTeamsLicensingDetailsRequestBuilder and sets the default values. +func NewItemLicenseDetailsGetTeamsLicensingDetailsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemLicenseDetailsGetTeamsLicensingDetailsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemLicenseDetailsGetTeamsLicensingDetailsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get invoke function getTeamsLicensingDetails +func (m *ItemLicenseDetailsGetTeamsLicensingDetailsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemLicenseDetailsGetTeamsLicensingDetailsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.TeamsLicensingDetailsable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateTeamsLicensingDetailsFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.TeamsLicensingDetailsable), nil +} +// ToGetRequestInformation invoke function getTeamsLicensingDetails +func (m *ItemLicenseDetailsGetTeamsLicensingDetailsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemLicenseDetailsGetTeamsLicensingDetailsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *ItemLicenseDetailsGetTeamsLicensingDetailsRequestBuilder) WithUrl(rawUrl string)(*ItemLicenseDetailsGetTeamsLicensingDetailsRequestBuilder) { + return NewItemLicenseDetailsGetTeamsLicensingDetailsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/users/item_license_details_request_builder.go b/users/item_license_details_request_builder.go index a6e7de19de8..3237f30e21c 100644 --- a/users/item_license_details_request_builder.go +++ b/users/item_license_details_request_builder.go @@ -96,6 +96,10 @@ func (m *ItemLicenseDetailsRequestBuilder) Get(ctx context.Context, requestConfi } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.LicenseDetailsCollectionResponseable), nil } +// GetTeamsLicensingDetails provides operations to call the getTeamsLicensingDetails method. +func (m *ItemLicenseDetailsRequestBuilder) GetTeamsLicensingDetails()(*ItemLicenseDetailsGetTeamsLicensingDetailsRequestBuilder) { + return NewItemLicenseDetailsGetTeamsLicensingDetailsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // Post create new navigation property to licenseDetails for users func (m *ItemLicenseDetailsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.LicenseDetailsable, requestConfiguration *ItemLicenseDetailsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.LicenseDetailsable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); diff --git a/users/item_mail_folders_item_child_folders_item_messages_item_attachments_request_builder.go b/users/item_mail_folders_item_child_folders_item_messages_item_attachments_request_builder.go index 0f08de5e7fc..38ae4e7d1dd 100644 --- a/users/item_mail_folders_item_child_folders_item_messages_item_attachments_request_builder.go +++ b/users/item_mail_folders_item_child_folders_item_messages_item_attachments_request_builder.go @@ -94,10 +94,10 @@ func (m *ItemMailFoldersItemChildFoldersItemMessagesItemAttachmentsRequestBuilde } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to a message. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. You can add an attachment to an existing message by posting to its attachments collection, or to a newmessage that is being drafted, or created and sent on the fly. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/message-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemMailFoldersItemChildFoldersItemMessagesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemMailFoldersItemChildFoldersItemMessagesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -129,7 +129,7 @@ func (m *ItemMailFoldersItemChildFoldersItemMessagesItemAttachmentsRequestBuilde requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to a message. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. You can add an attachment to an existing message by posting to its attachments collection, or to a newmessage that is being drafted, or created and sent on the fly. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemMailFoldersItemChildFoldersItemMessagesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemMailFoldersItemChildFoldersItemMessagesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/users/item_mail_folders_item_messages_item_attachments_request_builder.go b/users/item_mail_folders_item_messages_item_attachments_request_builder.go index 0819b977a9e..3820d048813 100644 --- a/users/item_mail_folders_item_messages_item_attachments_request_builder.go +++ b/users/item_mail_folders_item_messages_item_attachments_request_builder.go @@ -94,10 +94,10 @@ func (m *ItemMailFoldersItemMessagesItemAttachmentsRequestBuilder) Get(ctx conte } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to a message. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. You can add an attachment to an existing message by posting to its attachments collection, or to a newmessage that is being drafted, or created and sent on the fly. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/message-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemMailFoldersItemMessagesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemMailFoldersItemMessagesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -129,7 +129,7 @@ func (m *ItemMailFoldersItemMessagesItemAttachmentsRequestBuilder) ToGetRequestI requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to a message. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. You can add an attachment to an existing message by posting to its attachments collection, or to a newmessage that is being drafted, or created and sent on the fly. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemMailFoldersItemMessagesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemMailFoldersItemMessagesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/users/item_mail_folders_mail_folder_item_request_builder.go b/users/item_mail_folders_mail_folder_item_request_builder.go index a816f3fd42b..069b36d7161 100644 --- a/users/item_mail_folders_mail_folder_item_request_builder.go +++ b/users/item_mail_folders_mail_folder_item_request_builder.go @@ -117,10 +117,10 @@ func (m *ItemMailFoldersMailFolderItemRequestBuilder) Messages()(*ItemMailFolder func (m *ItemMailFoldersMailFolderItemRequestBuilder) Move()(*ItemMailFoldersItemMoveRequestBuilder) { return NewItemMailFoldersItemMoveRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Patch update the writable properties of a mailSearchFolder object. +// Patch update the properties of mailFolder object. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/mailsearchfolder-update?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/mailfolder-update?view=graph-rest-1.0 func (m *ItemMailFoldersMailFolderItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MailFolderable, requestConfiguration *ItemMailFoldersMailFolderItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MailFolderable, error) { requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -162,7 +162,7 @@ func (m *ItemMailFoldersMailFolderItemRequestBuilder) ToGetRequestInformation(ct requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPatchRequestInformation update the writable properties of a mailSearchFolder object. +// ToPatchRequestInformation update the properties of mailFolder object. func (m *ItemMailFoldersMailFolderItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MailFolderable, requestConfiguration *ItemMailFoldersMailFolderItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/users/item_messages_item_attachments_request_builder.go b/users/item_messages_item_attachments_request_builder.go index 2ecca9ac69d..26b6d00dec4 100644 --- a/users/item_messages_item_attachments_request_builder.go +++ b/users/item_messages_item_attachments_request_builder.go @@ -94,10 +94,10 @@ func (m *ItemMessagesItemAttachmentsRequestBuilder) Get(ctx context.Context, req } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttachmentCollectionResponseable), nil } -// Post use this API to add an attachment to a message. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. You can add an attachment to an existing message by posting to its attachments collection, or to a newmessage that is being drafted, or created and sent on the fly. +// Post use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/message-post-attachments?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 func (m *ItemMessagesItemAttachmentsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemMessagesItemAttachmentsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -129,7 +129,7 @@ func (m *ItemMessagesItemAttachmentsRequestBuilder) ToGetRequestInformation(ctx requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPostRequestInformation use this API to add an attachment to a message. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. You can add an attachment to an existing message by posting to its attachments collection, or to a newmessage that is being drafted, or created and sent on the fly. +// ToPostRequestInformation use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. func (m *ItemMessagesItemAttachmentsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Attachmentable, requestConfiguration *ItemMessagesItemAttachmentsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/users/item_messages_item_value_content_request_builder.go b/users/item_messages_item_value_content_request_builder.go index b56be15ccd4..3f8d0a14bf7 100644 --- a/users/item_messages_item_value_content_request_builder.go +++ b/users/item_messages_item_value_content_request_builder.go @@ -40,7 +40,7 @@ func NewItemMessagesItemValueContentRequestBuilder(rawUrl string, requestAdapter // Get get media content for the navigation property messages from users // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/opentypeextension-get?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/user-list-messages?view=graph-rest-1.0 func (m *ItemMessagesItemValueContentRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemMessagesItemValueContentRequestBuilderGetRequestConfiguration)([]byte, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { diff --git a/users/item_messages_message_item_request_builder.go b/users/item_messages_message_item_request_builder.go index 87fc5ddab87..b363653563e 100644 --- a/users/item_messages_message_item_request_builder.go +++ b/users/item_messages_message_item_request_builder.go @@ -110,7 +110,7 @@ func (m *ItemMessagesMessageItemRequestBuilder) Forward()(*ItemMessagesItemForwa // Get the messages in a mailbox or folder. Read-only. Nullable. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/singlevaluelegacyextendedproperty-get?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/opentypeextension-get?view=graph-rest-1.0 func (m *ItemMessagesMessageItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemMessagesMessageItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Messageable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { diff --git a/users/item_messages_request_builder.go b/users/item_messages_request_builder.go index f4a87b9a605..1d2d0d9adb1 100644 --- a/users/item_messages_request_builder.go +++ b/users/item_messages_request_builder.go @@ -83,7 +83,7 @@ func (m *ItemMessagesRequestBuilder) Delta()(*ItemMessagesDeltaRequestBuilder) { // Get the messages in a mailbox or folder. Read-only. Nullable. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/opentypeextension-get?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/user-list-messages?view=graph-rest-1.0 func (m *ItemMessagesRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemMessagesRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.MessageCollectionResponseable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { diff --git a/users/item_online_meetings_item_meeting_attendance_report_request_builder.go b/users/item_online_meetings_item_meeting_attendance_report_request_builder.go index b331545fc6f..42e65a90551 100644 --- a/users/item_online_meetings_item_meeting_attendance_report_request_builder.go +++ b/users/item_online_meetings_item_meeting_attendance_report_request_builder.go @@ -18,7 +18,7 @@ type ItemOnlineMeetingsItemMeetingAttendanceReportRequestBuilderDeleteRequestCon // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// ItemOnlineMeetingsItemMeetingAttendanceReportRequestBuilderGetQueryParameters get the meetingAttendanceReport for an onlineMeeting. Each time an online meeting ends, an attendance report will be generated for that session. +// ItemOnlineMeetingsItemMeetingAttendanceReportRequestBuilderGetQueryParameters get the meetingAttendanceReport for an onlineMeeting. Each time an online meeting ends, an attendance report is generated for that session. type ItemOnlineMeetingsItemMeetingAttendanceReportRequestBuilderGetQueryParameters struct { // Expand related entities Expand []string `uriparametername:"%24expand"` @@ -74,7 +74,7 @@ func (m *ItemOnlineMeetingsItemMeetingAttendanceReportRequestBuilder) Delete(ctx } return nil } -// Get get the meetingAttendanceReport for an onlineMeeting. Each time an online meeting ends, an attendance report will be generated for that session. +// Get get the meetingAttendanceReport for an onlineMeeting. Each time an online meeting ends, an attendance report is generated for that session. // [Find more info here] // // [Find more info here]: https://learn.microsoft.com/graph/api/meetingattendancereport-get?view=graph-rest-1.0 @@ -125,7 +125,7 @@ func (m *ItemOnlineMeetingsItemMeetingAttendanceReportRequestBuilder) ToDeleteRe requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToGetRequestInformation get the meetingAttendanceReport for an onlineMeeting. Each time an online meeting ends, an attendance report will be generated for that session. +// ToGetRequestInformation get the meetingAttendanceReport for an onlineMeeting. Each time an online meeting ends, an attendance report is generated for that session. func (m *ItemOnlineMeetingsItemMeetingAttendanceReportRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemOnlineMeetingsItemMeetingAttendanceReportRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/users/item_online_meetings_item_registration_request_builder.go b/users/item_online_meetings_item_registration_request_builder.go index 19b2e8d96ba..3d964f35b20 100644 --- a/users/item_online_meetings_item_registration_request_builder.go +++ b/users/item_online_meetings_item_registration_request_builder.go @@ -58,10 +58,10 @@ func NewItemOnlineMeetingsItemRegistrationRequestBuilder(rawUrl string, requestA func (m *ItemOnlineMeetingsItemRegistrationRequestBuilder) CustomQuestions()(*ItemOnlineMeetingsItemRegistrationCustomQuestionsRequestBuilder) { return NewItemOnlineMeetingsItemRegistrationCustomQuestionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Delete disable and delete the externalMeetingRegistration of an onlineMeeting. +// Delete disable and delete the meetingRegistration of an onlineMeeting on behalf of the organizer. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/externalmeetingregistration-delete?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/meetingregistration-delete?view=graph-rest-1.0 func (m *ItemOnlineMeetingsItemRegistrationRequestBuilder) Delete(ctx context.Context, requestConfiguration *ItemOnlineMeetingsItemRegistrationRequestBuilderDeleteRequestConfiguration)(error) { requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); if err != nil { @@ -125,7 +125,7 @@ func (m *ItemOnlineMeetingsItemRegistrationRequestBuilder) Patch(ctx context.Con func (m *ItemOnlineMeetingsItemRegistrationRequestBuilder) Registrants()(*ItemOnlineMeetingsItemRegistrationRegistrantsRequestBuilder) { return NewItemOnlineMeetingsItemRegistrationRegistrantsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// ToDeleteRequestInformation disable and delete the externalMeetingRegistration of an onlineMeeting. +// ToDeleteRequestInformation disable and delete the meetingRegistration of an onlineMeeting on behalf of the organizer. func (m *ItemOnlineMeetingsItemRegistrationRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *ItemOnlineMeetingsItemRegistrationRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/users/item_online_meetings_item_send_virtual_appointment_reminder_sms_post_request_body.go b/users/item_online_meetings_item_send_virtual_appointment_reminder_sms_post_request_body.go index 681544c0fa0..7051eccbc23 100644 --- a/users/item_online_meetings_item_send_virtual_appointment_reminder_sms_post_request_body.go +++ b/users/item_online_meetings_item_send_virtual_appointment_reminder_sms_post_request_body.go @@ -35,6 +35,17 @@ func (m *ItemOnlineMeetingsItemSendVirtualAppointmentReminderSmsPostRequestBody) } return val.(map[string]any) } +// GetAttendees gets the attendees property value. The attendees property +func (m *ItemOnlineMeetingsItemSendVirtualAppointmentReminderSmsPostRequestBody) GetAttendees()([]ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttendeeNotificationInfoable) { + val, err := m.GetBackingStore().Get("attendees") + if err != nil { + panic(err) + } + if val != nil { + return val.([]ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttendeeNotificationInfoable) + } + return nil +} // GetBackingStore gets the BackingStore property value. Stores model information. func (m *ItemOnlineMeetingsItemSendVirtualAppointmentReminderSmsPostRequestBody) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { return m.backingStore @@ -42,19 +53,19 @@ func (m *ItemOnlineMeetingsItemSendVirtualAppointmentReminderSmsPostRequestBody) // GetFieldDeserializers the deserialization information for the current model func (m *ItemOnlineMeetingsItemSendVirtualAppointmentReminderSmsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) - res["phoneNumbers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfPrimitiveValues("string") + res["attendees"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateAttendeeNotificationInfoFromDiscriminatorValue) if err != nil { return err } if val != nil { - res := make([]string, len(val)) + res := make([]ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttendeeNotificationInfoable, len(val)) for i, v := range val { if v != nil { - res[i] = *(v.(*string)) + res[i] = v.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttendeeNotificationInfoable) } } - m.SetPhoneNumbers(res) + m.SetAttendees(res) } return nil } @@ -70,17 +81,6 @@ func (m *ItemOnlineMeetingsItemSendVirtualAppointmentReminderSmsPostRequestBody) } return res } -// GetPhoneNumbers gets the phoneNumbers property value. The phoneNumbers property -func (m *ItemOnlineMeetingsItemSendVirtualAppointmentReminderSmsPostRequestBody) GetPhoneNumbers()([]string) { - val, err := m.GetBackingStore().Get("phoneNumbers") - if err != nil { - panic(err) - } - if val != nil { - return val.([]string) - } - return nil -} // GetRemindBeforeTimeInMinutesType gets the remindBeforeTimeInMinutesType property value. The remindBeforeTimeInMinutesType property func (m *ItemOnlineMeetingsItemSendVirtualAppointmentReminderSmsPostRequestBody) GetRemindBeforeTimeInMinutesType()(*ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.RemindBeforeTimeInMinutesType) { val, err := m.GetBackingStore().Get("remindBeforeTimeInMinutesType") @@ -94,8 +94,14 @@ func (m *ItemOnlineMeetingsItemSendVirtualAppointmentReminderSmsPostRequestBody) } // Serialize serializes information the current object func (m *ItemOnlineMeetingsItemSendVirtualAppointmentReminderSmsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - if m.GetPhoneNumbers() != nil { - err := writer.WriteCollectionOfStringValues("phoneNumbers", m.GetPhoneNumbers()) + if m.GetAttendees() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAttendees())) + for i, v := range m.GetAttendees() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("attendees", cast) if err != nil { return err } @@ -122,17 +128,17 @@ func (m *ItemOnlineMeetingsItemSendVirtualAppointmentReminderSmsPostRequestBody) panic(err) } } -// SetBackingStore sets the BackingStore property value. Stores model information. -func (m *ItemOnlineMeetingsItemSendVirtualAppointmentReminderSmsPostRequestBody) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { - m.backingStore = value -} -// SetPhoneNumbers sets the phoneNumbers property value. The phoneNumbers property -func (m *ItemOnlineMeetingsItemSendVirtualAppointmentReminderSmsPostRequestBody) SetPhoneNumbers(value []string)() { - err := m.GetBackingStore().Set("phoneNumbers", value) +// SetAttendees sets the attendees property value. The attendees property +func (m *ItemOnlineMeetingsItemSendVirtualAppointmentReminderSmsPostRequestBody) SetAttendees(value []ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttendeeNotificationInfoable)() { + err := m.GetBackingStore().Set("attendees", value) if err != nil { panic(err) } } +// SetBackingStore sets the BackingStore property value. Stores model information. +func (m *ItemOnlineMeetingsItemSendVirtualAppointmentReminderSmsPostRequestBody) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} // SetRemindBeforeTimeInMinutesType sets the remindBeforeTimeInMinutesType property value. The remindBeforeTimeInMinutesType property func (m *ItemOnlineMeetingsItemSendVirtualAppointmentReminderSmsPostRequestBody) SetRemindBeforeTimeInMinutesType(value *ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.RemindBeforeTimeInMinutesType)() { err := m.GetBackingStore().Set("remindBeforeTimeInMinutesType", value) @@ -145,10 +151,10 @@ type ItemOnlineMeetingsItemSendVirtualAppointmentReminderSmsPostRequestBodyable i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAttendees()([]ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttendeeNotificationInfoable) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) - GetPhoneNumbers()([]string) GetRemindBeforeTimeInMinutesType()(*ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.RemindBeforeTimeInMinutesType) + SetAttendees(value []ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttendeeNotificationInfoable)() SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() - SetPhoneNumbers(value []string)() SetRemindBeforeTimeInMinutesType(value *ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.RemindBeforeTimeInMinutesType)() } diff --git a/users/item_online_meetings_item_send_virtual_appointment_sms_post_request_body.go b/users/item_online_meetings_item_send_virtual_appointment_sms_post_request_body.go index 760803d7d71..d25496dcd24 100644 --- a/users/item_online_meetings_item_send_virtual_appointment_sms_post_request_body.go +++ b/users/item_online_meetings_item_send_virtual_appointment_sms_post_request_body.go @@ -35,6 +35,17 @@ func (m *ItemOnlineMeetingsItemSendVirtualAppointmentSmsPostRequestBody) GetAddi } return val.(map[string]any) } +// GetAttendees gets the attendees property value. The attendees property +func (m *ItemOnlineMeetingsItemSendVirtualAppointmentSmsPostRequestBody) GetAttendees()([]ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttendeeNotificationInfoable) { + val, err := m.GetBackingStore().Get("attendees") + if err != nil { + panic(err) + } + if val != nil { + return val.([]ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttendeeNotificationInfoable) + } + return nil +} // GetBackingStore gets the BackingStore property value. Stores model information. func (m *ItemOnlineMeetingsItemSendVirtualAppointmentSmsPostRequestBody) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { return m.backingStore @@ -42,67 +53,62 @@ func (m *ItemOnlineMeetingsItemSendVirtualAppointmentSmsPostRequestBody) GetBack // GetFieldDeserializers the deserialization information for the current model func (m *ItemOnlineMeetingsItemSendVirtualAppointmentSmsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) - res["phoneNumbers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfPrimitiveValues("string") + res["attendees"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateAttendeeNotificationInfoFromDiscriminatorValue) if err != nil { return err } if val != nil { - res := make([]string, len(val)) + res := make([]ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttendeeNotificationInfoable, len(val)) for i, v := range val { if v != nil { - res[i] = *(v.(*string)) + res[i] = v.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttendeeNotificationInfoable) } } - m.SetPhoneNumbers(res) + m.SetAttendees(res) } return nil } - res["smsType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetEnumValue(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ParseVirtualAppointmentSmsType) + res["messageType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ParseVirtualAppointmentMessageType) if err != nil { return err } if val != nil { - m.SetSmsType(val.(*ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualAppointmentSmsType)) + m.SetMessageType(val.(*ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualAppointmentMessageType)) } return nil } return res } -// GetPhoneNumbers gets the phoneNumbers property value. The phoneNumbers property -func (m *ItemOnlineMeetingsItemSendVirtualAppointmentSmsPostRequestBody) GetPhoneNumbers()([]string) { - val, err := m.GetBackingStore().Get("phoneNumbers") - if err != nil { - panic(err) - } - if val != nil { - return val.([]string) - } - return nil -} -// GetSmsType gets the smsType property value. The smsType property -func (m *ItemOnlineMeetingsItemSendVirtualAppointmentSmsPostRequestBody) GetSmsType()(*ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualAppointmentSmsType) { - val, err := m.GetBackingStore().Get("smsType") +// GetMessageType gets the messageType property value. The messageType property +func (m *ItemOnlineMeetingsItemSendVirtualAppointmentSmsPostRequestBody) GetMessageType()(*ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualAppointmentMessageType) { + val, err := m.GetBackingStore().Get("messageType") if err != nil { panic(err) } if val != nil { - return val.(*ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualAppointmentSmsType) + return val.(*ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualAppointmentMessageType) } return nil } // Serialize serializes information the current object func (m *ItemOnlineMeetingsItemSendVirtualAppointmentSmsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - if m.GetPhoneNumbers() != nil { - err := writer.WriteCollectionOfStringValues("phoneNumbers", m.GetPhoneNumbers()) + if m.GetAttendees() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAttendees())) + for i, v := range m.GetAttendees() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("attendees", cast) if err != nil { return err } } - if m.GetSmsType() != nil { - cast := (*m.GetSmsType()).String() - err := writer.WriteStringValue("smsType", &cast) + if m.GetMessageType() != nil { + cast := (*m.GetMessageType()).String() + err := writer.WriteStringValue("messageType", &cast) if err != nil { return err } @@ -122,20 +128,20 @@ func (m *ItemOnlineMeetingsItemSendVirtualAppointmentSmsPostRequestBody) SetAddi panic(err) } } -// SetBackingStore sets the BackingStore property value. Stores model information. -func (m *ItemOnlineMeetingsItemSendVirtualAppointmentSmsPostRequestBody) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { - m.backingStore = value -} -// SetPhoneNumbers sets the phoneNumbers property value. The phoneNumbers property -func (m *ItemOnlineMeetingsItemSendVirtualAppointmentSmsPostRequestBody) SetPhoneNumbers(value []string)() { - err := m.GetBackingStore().Set("phoneNumbers", value) +// SetAttendees sets the attendees property value. The attendees property +func (m *ItemOnlineMeetingsItemSendVirtualAppointmentSmsPostRequestBody) SetAttendees(value []ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttendeeNotificationInfoable)() { + err := m.GetBackingStore().Set("attendees", value) if err != nil { panic(err) } } -// SetSmsType sets the smsType property value. The smsType property -func (m *ItemOnlineMeetingsItemSendVirtualAppointmentSmsPostRequestBody) SetSmsType(value *ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualAppointmentSmsType)() { - err := m.GetBackingStore().Set("smsType", value) +// SetBackingStore sets the BackingStore property value. Stores model information. +func (m *ItemOnlineMeetingsItemSendVirtualAppointmentSmsPostRequestBody) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetMessageType sets the messageType property value. The messageType property +func (m *ItemOnlineMeetingsItemSendVirtualAppointmentSmsPostRequestBody) SetMessageType(value *ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualAppointmentMessageType)() { + err := m.GetBackingStore().Set("messageType", value) if err != nil { panic(err) } @@ -145,10 +151,10 @@ type ItemOnlineMeetingsItemSendVirtualAppointmentSmsPostRequestBodyable interfac i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAttendees()([]ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttendeeNotificationInfoable) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) - GetPhoneNumbers()([]string) - GetSmsType()(*ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualAppointmentSmsType) + GetMessageType()(*ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualAppointmentMessageType) + SetAttendees(value []ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.AttendeeNotificationInfoable)() SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() - SetPhoneNumbers(value []string)() - SetSmsType(value *ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualAppointmentSmsType)() + SetMessageType(value *ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualAppointmentMessageType)() } diff --git a/users/item_planner_plans_item_archive_post_request_body.go b/users/item_planner_plans_item_archive_post_request_body.go new file mode 100644 index 00000000000..b7cc97495a2 --- /dev/null +++ b/users/item_planner_plans_item_archive_post_request_body.go @@ -0,0 +1,110 @@ +package users + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +// ItemPlannerPlansItemArchivePostRequestBody +type ItemPlannerPlansItemArchivePostRequestBody struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewItemPlannerPlansItemArchivePostRequestBody instantiates a new ItemPlannerPlansItemArchivePostRequestBody and sets the default values. +func NewItemPlannerPlansItemArchivePostRequestBody()(*ItemPlannerPlansItemArchivePostRequestBody) { + m := &ItemPlannerPlansItemArchivePostRequestBody{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemPlannerPlansItemArchivePostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateItemPlannerPlansItemArchivePostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemPlannerPlansItemArchivePostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemPlannerPlansItemArchivePostRequestBody) GetAdditionalData()(map[string]any) { + val , err := m.backingStore.Get("additionalData") + if err != nil { + panic(err) + } + if val == nil { + var value = make(map[string]any); + m.SetAdditionalData(value); + } + return val.(map[string]any) +} +// GetBackingStore gets the BackingStore property value. Stores model information. +func (m *ItemPlannerPlansItemArchivePostRequestBody) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ItemPlannerPlansItemArchivePostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["justification"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetJustification(val) + } + return nil + } + return res +} +// GetJustification gets the justification property value. The justification property +func (m *ItemPlannerPlansItemArchivePostRequestBody) GetJustification()(*string) { + val, err := m.GetBackingStore().Get("justification") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// Serialize serializes information the current object +func (m *ItemPlannerPlansItemArchivePostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("justification", m.GetJustification()) + 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 *ItemPlannerPlansItemArchivePostRequestBody) 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 *ItemPlannerPlansItemArchivePostRequestBody) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetJustification sets the justification property value. The justification property +func (m *ItemPlannerPlansItemArchivePostRequestBody) SetJustification(value *string)() { + err := m.GetBackingStore().Set("justification", value) + if err != nil { + panic(err) + } +} +// ItemPlannerPlansItemArchivePostRequestBodyable +type ItemPlannerPlansItemArchivePostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetJustification()(*string) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetJustification(value *string)() +} diff --git a/users/item_planner_plans_item_archive_request_builder.go b/users/item_planner_plans_item_archive_request_builder.go new file mode 100644 index 00000000000..5f3434dca58 --- /dev/null +++ b/users/item_planner_plans_item_archive_request_builder.go @@ -0,0 +1,66 @@ +package users + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemPlannerPlansItemArchiveRequestBuilder provides operations to call the archive method. +type ItemPlannerPlansItemArchiveRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemPlannerPlansItemArchiveRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemPlannerPlansItemArchiveRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewItemPlannerPlansItemArchiveRequestBuilderInternal instantiates a new ArchiveRequestBuilder and sets the default values. +func NewItemPlannerPlansItemArchiveRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPlannerPlansItemArchiveRequestBuilder) { + m := &ItemPlannerPlansItemArchiveRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/users/{user%2Did}/planner/plans/{plannerPlan%2Did}/archive", pathParameters), + } + return m +} +// NewItemPlannerPlansItemArchiveRequestBuilder instantiates a new ArchiveRequestBuilder and sets the default values. +func NewItemPlannerPlansItemArchiveRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPlannerPlansItemArchiveRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemPlannerPlansItemArchiveRequestBuilderInternal(urlParams, requestAdapter) +} +// Post invoke action archive +func (m *ItemPlannerPlansItemArchiveRequestBuilder) Post(ctx context.Context, body ItemPlannerPlansItemArchivePostRequestBodyable, requestConfiguration *ItemPlannerPlansItemArchiveRequestBuilderPostRequestConfiguration)(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation invoke action archive +func (m *ItemPlannerPlansItemArchiveRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemPlannerPlansItemArchivePostRequestBodyable, requestConfiguration *ItemPlannerPlansItemArchiveRequestBuilderPostRequestConfiguration)(*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. +func (m *ItemPlannerPlansItemArchiveRequestBuilder) WithUrl(rawUrl string)(*ItemPlannerPlansItemArchiveRequestBuilder) { + return NewItemPlannerPlansItemArchiveRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/users/item_planner_plans_item_unarchive_post_request_body.go b/users/item_planner_plans_item_unarchive_post_request_body.go new file mode 100644 index 00000000000..e898e3e3c2d --- /dev/null +++ b/users/item_planner_plans_item_unarchive_post_request_body.go @@ -0,0 +1,110 @@ +package users + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +// ItemPlannerPlansItemUnarchivePostRequestBody +type ItemPlannerPlansItemUnarchivePostRequestBody struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewItemPlannerPlansItemUnarchivePostRequestBody instantiates a new ItemPlannerPlansItemUnarchivePostRequestBody and sets the default values. +func NewItemPlannerPlansItemUnarchivePostRequestBody()(*ItemPlannerPlansItemUnarchivePostRequestBody) { + m := &ItemPlannerPlansItemUnarchivePostRequestBody{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemPlannerPlansItemUnarchivePostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateItemPlannerPlansItemUnarchivePostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemPlannerPlansItemUnarchivePostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemPlannerPlansItemUnarchivePostRequestBody) GetAdditionalData()(map[string]any) { + val , err := m.backingStore.Get("additionalData") + if err != nil { + panic(err) + } + if val == nil { + var value = make(map[string]any); + m.SetAdditionalData(value); + } + return val.(map[string]any) +} +// GetBackingStore gets the BackingStore property value. Stores model information. +func (m *ItemPlannerPlansItemUnarchivePostRequestBody) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ItemPlannerPlansItemUnarchivePostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["justification"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetJustification(val) + } + return nil + } + return res +} +// GetJustification gets the justification property value. The justification property +func (m *ItemPlannerPlansItemUnarchivePostRequestBody) GetJustification()(*string) { + val, err := m.GetBackingStore().Get("justification") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// Serialize serializes information the current object +func (m *ItemPlannerPlansItemUnarchivePostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("justification", m.GetJustification()) + 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 *ItemPlannerPlansItemUnarchivePostRequestBody) 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 *ItemPlannerPlansItemUnarchivePostRequestBody) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetJustification sets the justification property value. The justification property +func (m *ItemPlannerPlansItemUnarchivePostRequestBody) SetJustification(value *string)() { + err := m.GetBackingStore().Set("justification", value) + if err != nil { + panic(err) + } +} +// ItemPlannerPlansItemUnarchivePostRequestBodyable +type ItemPlannerPlansItemUnarchivePostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetJustification()(*string) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetJustification(value *string)() +} diff --git a/users/item_planner_plans_item_unarchive_request_builder.go b/users/item_planner_plans_item_unarchive_request_builder.go new file mode 100644 index 00000000000..2bf7dea0509 --- /dev/null +++ b/users/item_planner_plans_item_unarchive_request_builder.go @@ -0,0 +1,66 @@ +package users + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemPlannerPlansItemUnarchiveRequestBuilder provides operations to call the unarchive method. +type ItemPlannerPlansItemUnarchiveRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemPlannerPlansItemUnarchiveRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemPlannerPlansItemUnarchiveRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewItemPlannerPlansItemUnarchiveRequestBuilderInternal instantiates a new UnarchiveRequestBuilder and sets the default values. +func NewItemPlannerPlansItemUnarchiveRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPlannerPlansItemUnarchiveRequestBuilder) { + m := &ItemPlannerPlansItemUnarchiveRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/users/{user%2Did}/planner/plans/{plannerPlan%2Did}/unarchive", pathParameters), + } + return m +} +// NewItemPlannerPlansItemUnarchiveRequestBuilder instantiates a new UnarchiveRequestBuilder and sets the default values. +func NewItemPlannerPlansItemUnarchiveRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPlannerPlansItemUnarchiveRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemPlannerPlansItemUnarchiveRequestBuilderInternal(urlParams, requestAdapter) +} +// Post invoke action unarchive +func (m *ItemPlannerPlansItemUnarchiveRequestBuilder) Post(ctx context.Context, body ItemPlannerPlansItemUnarchivePostRequestBodyable, requestConfiguration *ItemPlannerPlansItemUnarchiveRequestBuilderPostRequestConfiguration)(error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "4XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + "5XX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// ToPostRequestInformation invoke action unarchive +func (m *ItemPlannerPlansItemUnarchiveRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemPlannerPlansItemUnarchivePostRequestBodyable, requestConfiguration *ItemPlannerPlansItemUnarchiveRequestBuilderPostRequestConfiguration)(*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. +func (m *ItemPlannerPlansItemUnarchiveRequestBuilder) WithUrl(rawUrl string)(*ItemPlannerPlansItemUnarchiveRequestBuilder) { + return NewItemPlannerPlansItemUnarchiveRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/users/item_planner_plans_planner_plan_item_request_builder.go b/users/item_planner_plans_planner_plan_item_request_builder.go index c346f616f03..749848bbc35 100644 --- a/users/item_planner_plans_planner_plan_item_request_builder.go +++ b/users/item_planner_plans_planner_plan_item_request_builder.go @@ -41,6 +41,10 @@ type ItemPlannerPlansPlannerPlanItemRequestBuilderPatchRequestConfiguration stru // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } +// Archive provides operations to call the archive method. +func (m *ItemPlannerPlansPlannerPlanItemRequestBuilder) Archive()(*ItemPlannerPlansItemArchiveRequestBuilder) { + return NewItemPlannerPlansItemArchiveRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // Buckets provides operations to manage the buckets property of the microsoft.graph.plannerPlan entity. func (m *ItemPlannerPlansPlannerPlanItemRequestBuilder) Buckets()(*ItemPlannerPlansItemBucketsRequestBuilder) { return NewItemPlannerPlansItemBucketsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) @@ -161,6 +165,10 @@ func (m *ItemPlannerPlansPlannerPlanItemRequestBuilder) ToPatchRequestInformatio } return requestInfo, nil } +// Unarchive provides operations to call the unarchive method. +func (m *ItemPlannerPlansPlannerPlanItemRequestBuilder) Unarchive()(*ItemPlannerPlansItemUnarchiveRequestBuilder) { + return NewItemPlannerPlansItemUnarchiveRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. func (m *ItemPlannerPlansPlannerPlanItemRequestBuilder) WithUrl(rawUrl string)(*ItemPlannerPlansPlannerPlanItemRequestBuilder) { return NewItemPlannerPlansPlannerPlanItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); diff --git a/users/item_presence_request_builder.go b/users/item_presence_request_builder.go index 8f89f4f1aad..380cd30aed9 100644 --- a/users/item_presence_request_builder.go +++ b/users/item_presence_request_builder.go @@ -18,7 +18,7 @@ type ItemPresenceRequestBuilderDeleteRequestConfiguration struct { // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// ItemPresenceRequestBuilderGetQueryParameters set a presence status message for a user. An optional expiration date and time can be supplied. +// ItemPresenceRequestBuilderGetQueryParameters get a user's presence information. type ItemPresenceRequestBuilderGetQueryParameters struct { // Expand related entities Expand []string `uriparametername:"%24expand"` @@ -78,10 +78,10 @@ func (m *ItemPresenceRequestBuilder) Delete(ctx context.Context, requestConfigur } return nil } -// Get set a presence status message for a user. An optional expiration date and time can be supplied. +// Get get a user's presence information. // [Find more info here] // -// [Find more info here]: https://learn.microsoft.com/graph/api/presence-setstatusmessage?view=graph-rest-1.0 +// [Find more info here]: https://learn.microsoft.com/graph/api/presence-get?view=graph-rest-1.0 func (m *ItemPresenceRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemPresenceRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Presenceable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -141,7 +141,7 @@ func (m *ItemPresenceRequestBuilder) ToDeleteRequestInformation(ctx context.Cont requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToGetRequestInformation set a presence status message for a user. An optional expiration date and time can be supplied. +// ToGetRequestInformation get a user's presence information. func (m *ItemPresenceRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemPresenceRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil { diff --git a/users/item_teamwork_request_builder.go b/users/item_teamwork_request_builder.go index 8897b3ca638..2ac47ea36bf 100644 --- a/users/item_teamwork_request_builder.go +++ b/users/item_teamwork_request_builder.go @@ -18,7 +18,7 @@ type ItemTeamworkRequestBuilderDeleteRequestConfiguration struct { // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// ItemTeamworkRequestBuilderGetQueryParameters a container for Microsoft Teams features available for the user. Read-only. Nullable. +// ItemTeamworkRequestBuilderGetQueryParameters get the userTeamwork settings for a specified user, which includes the Microsoft Teams region and the locale chosen by the user. type ItemTeamworkRequestBuilderGetQueryParameters struct { // Expand related entities Expand []string `uriparametername:"%24expand"` @@ -74,7 +74,10 @@ func (m *ItemTeamworkRequestBuilder) Delete(ctx context.Context, requestConfigur } return nil } -// Get a container for Microsoft Teams features available for the user. Read-only. Nullable. +// Get get the userTeamwork settings for a specified user, which includes the Microsoft Teams region and the locale chosen by the user. +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/userteamwork-get?view=graph-rest-1.0 func (m *ItemTeamworkRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemTeamworkRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.UserTeamworkable, error) { requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); if err != nil { @@ -130,7 +133,7 @@ func (m *ItemTeamworkRequestBuilder) ToDeleteRequestInformation(ctx context.Cont requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToGetRequestInformation a container for Microsoft Teams features available for the user. Read-only. Nullable. +// ToGetRequestInformation get the userTeamwork settings for a specified user, which includes the Microsoft Teams region and the locale chosen by the user. func (m *ItemTeamworkRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemTeamworkRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) if requestConfiguration != nil {