diff --git a/app/calls_item_participants_item_report_synthetic_media_request_builder.go b/app/calls_item_participants_item_report_synthetic_media_request_builder.go index d371cce412f..896504d0a10 100644 --- a/app/calls_item_participants_item_report_synthetic_media_request_builder.go +++ b/app/calls_item_participants_item_report_synthetic_media_request_builder.go @@ -33,8 +33,11 @@ func NewCallsItemParticipantsItemReportSyntheticMediaRequestBuilder(rawUrl strin urlParams["request-raw-url"] = rawUrl return NewCallsItemParticipantsItemReportSyntheticMediaRequestBuilderInternal(urlParams, requestAdapter) } -// Post invoke action reportSyntheticMedia +// Post report synthetic media detections for a participant in a meeting call. This action is intended for certified third-party audio and video synthetic media detection bots admitted to the meeting call. The detection bot calls this action to flag a participant whose stream it identifies as AI-generated or synthetic media. The detection result is propagated to all participants via roster updates. After a successful request, the service stores the detection on the participant as a syntheticMediaDetectionInfo object in the participant's syntheticMediaDetection property and delivers it to all participants in a roster update notification. Each request with a new id creates a separate detection record; the service doesn't deduplicate or merge reports. When a participant has multiple detection records, the syntheticMediaDetection property reflects the most recent report. Third-party bots can invoke this action only when the meeting tenant administrator grants the app the Calls.ReportSyntheticMedia.All application permission. The detection bot must be admitted to the call before it can call this action. For more information about registering a calling bot and joining calls, see Calls and online meetings. The bot obtains the call ID and participant ID from the call roster and subsequent participant roster update notifications, and uses the call's id as {call-id} and the participant's id as {participant-id} in the request URL. // returns a ODataError error when the service returns a 4XX or 5XX status code +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/participant-reportsyntheticmedia?view=graph-rest-beta func (m *CallsItemParticipantsItemReportSyntheticMediaRequestBuilder) Post(ctx context.Context, body CallsItemParticipantsItemReportSyntheticMediaPostRequestBodyable, requestConfiguration *CallsItemParticipantsItemReportSyntheticMediaRequestBuilderPostRequestConfiguration)(error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -49,7 +52,7 @@ func (m *CallsItemParticipantsItemReportSyntheticMediaRequestBuilder) Post(ctx c } return nil } -// ToPostRequestInformation invoke action reportSyntheticMedia +// ToPostRequestInformation report synthetic media detections for a participant in a meeting call. This action is intended for certified third-party audio and video synthetic media detection bots admitted to the meeting call. The detection bot calls this action to flag a participant whose stream it identifies as AI-generated or synthetic media. The detection result is propagated to all participants via roster updates. After a successful request, the service stores the detection on the participant as a syntheticMediaDetectionInfo object in the participant's syntheticMediaDetection property and delivers it to all participants in a roster update notification. Each request with a new id creates a separate detection record; the service doesn't deduplicate or merge reports. When a participant has multiple detection records, the syntheticMediaDetection property reflects the most recent report. Third-party bots can invoke this action only when the meeting tenant administrator grants the app the Calls.ReportSyntheticMedia.All application permission. The detection bot must be admitted to the call before it can call this action. For more information about registering a calling bot and joining calls, see Calls and online meetings. The bot obtains the call ID and participant ID from the call roster and subsequent participant roster update notifications, and uses the call's id as {call-id} and the participant's id as {participant-id} in the request URL. // returns a *RequestInformation when successful func (m *CallsItemParticipantsItemReportSyntheticMediaRequestBuilder) ToPostRequestInformation(ctx context.Context, body CallsItemParticipantsItemReportSyntheticMediaPostRequestBodyable, requestConfiguration *CallsItemParticipantsItemReportSyntheticMediaRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/chats/item_targeted_messages_request_builder.go b/chats/item_targeted_messages_request_builder.go index 1ce5cc017e1..c281d231cef 100644 --- a/chats/item_targeted_messages_request_builder.go +++ b/chats/item_targeted_messages_request_builder.go @@ -14,7 +14,7 @@ import ( type ItemTargetedMessagesRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ItemTargetedMessagesRequestBuilderGetQueryParameters a collection of targeted messages in the chat that are visible only to specific users. Nullable. +// ItemTargetedMessagesRequestBuilderGetQueryParameters a collection of targeted messages in the chat that are visible only to specific users. Nullable. You can't expand this relationship using $expand. Targeted messages can also be retrieved via the userTeamwork: getAllTargetedMessages API. type ItemTargetedMessagesRequestBuilderGetQueryParameters struct { // Include count of items Count *bool "uriparametername:\"%24count\"" @@ -79,7 +79,7 @@ func NewItemTargetedMessagesRequestBuilder(rawUrl string, requestAdapter i2ae418 func (m *ItemTargetedMessagesRequestBuilder) Count()(*ItemTargetedMessagesCountRequestBuilder) { return NewItemTargetedMessagesCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Get a collection of targeted messages in the chat that are visible only to specific users. Nullable. +// Get a collection of targeted messages in the chat that are visible only to specific users. Nullable. You can't expand this relationship using $expand. Targeted messages can also be retrieved via the userTeamwork: getAllTargetedMessages API. // returns a TargetedChatMessageCollectionResponseable when successful // returns a ODataError error when the service returns a 4XX or 5XX status code func (m *ItemTargetedMessagesRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemTargetedMessagesRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.TargetedChatMessageCollectionResponseable, error) { @@ -119,7 +119,7 @@ func (m *ItemTargetedMessagesRequestBuilder) Post(ctx context.Context, body ie23 } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.TargetedChatMessageable), nil } -// ToGetRequestInformation a collection of targeted messages in the chat that are visible only to specific users. Nullable. +// ToGetRequestInformation a collection of targeted messages in the chat that are visible only to specific users. Nullable. You can't expand this relationship using $expand. Targeted messages can also be retrieved via the userTeamwork: getAllTargetedMessages API. // returns a *RequestInformation when successful func (m *ItemTargetedMessagesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemTargetedMessagesRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/chats/item_targeted_messages_targeted_chat_message_item_request_builder.go b/chats/item_targeted_messages_targeted_chat_message_item_request_builder.go index bde1be1f086..c9c78c4521b 100644 --- a/chats/item_targeted_messages_targeted_chat_message_item_request_builder.go +++ b/chats/item_targeted_messages_targeted_chat_message_item_request_builder.go @@ -21,7 +21,7 @@ type ItemTargetedMessagesTargetedChatMessageItemRequestBuilderDeleteRequestConfi // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// ItemTargetedMessagesTargetedChatMessageItemRequestBuilderGetQueryParameters a collection of targeted messages in the chat that are visible only to specific users. Nullable. +// ItemTargetedMessagesTargetedChatMessageItemRequestBuilderGetQueryParameters a collection of targeted messages in the chat that are visible only to specific users. Nullable. You can't expand this relationship using $expand. Targeted messages can also be retrieved via the userTeamwork: getAllTargetedMessages API. type ItemTargetedMessagesTargetedChatMessageItemRequestBuilderGetQueryParameters struct { // Expand related entities Expand []string "uriparametername:\"%24expand\"" @@ -73,7 +73,7 @@ func (m *ItemTargetedMessagesTargetedChatMessageItemRequestBuilder) Delete(ctx c } return nil } -// Get a collection of targeted messages in the chat that are visible only to specific users. Nullable. +// Get a collection of targeted messages in the chat that are visible only to specific users. Nullable. You can't expand this relationship using $expand. Targeted messages can also be retrieved via the userTeamwork: getAllTargetedMessages API. // returns a TargetedChatMessageable when successful // returns a ODataError error when the service returns a 4XX or 5XX status code func (m *ItemTargetedMessagesTargetedChatMessageItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemTargetedMessagesTargetedChatMessageItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.TargetedChatMessageable, error) { @@ -134,7 +134,7 @@ func (m *ItemTargetedMessagesTargetedChatMessageItemRequestBuilder) ToDeleteRequ requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToGetRequestInformation a collection of targeted messages in the chat that are visible only to specific users. Nullable. +// ToGetRequestInformation a collection of targeted messages in the chat that are visible only to specific users. Nullable. You can't expand this relationship using $expand. Targeted messages can also be retrieved via the userTeamwork: getAllTargetedMessages API. // returns a *RequestInformation when successful func (m *ItemTargetedMessagesTargetedChatMessageItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemTargetedMessagesTargetedChatMessageItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/communications/calls_item_participants_item_report_synthetic_media_request_builder.go b/communications/calls_item_participants_item_report_synthetic_media_request_builder.go index aa3eb0da532..b79bb9cae97 100644 --- a/communications/calls_item_participants_item_report_synthetic_media_request_builder.go +++ b/communications/calls_item_participants_item_report_synthetic_media_request_builder.go @@ -33,8 +33,11 @@ func NewCallsItemParticipantsItemReportSyntheticMediaRequestBuilder(rawUrl strin urlParams["request-raw-url"] = rawUrl return NewCallsItemParticipantsItemReportSyntheticMediaRequestBuilderInternal(urlParams, requestAdapter) } -// Post invoke action reportSyntheticMedia +// Post report synthetic media detections for a participant in a meeting call. This action is intended for certified third-party audio and video synthetic media detection bots admitted to the meeting call. The detection bot calls this action to flag a participant whose stream it identifies as AI-generated or synthetic media. The detection result is propagated to all participants via roster updates. After a successful request, the service stores the detection on the participant as a syntheticMediaDetectionInfo object in the participant's syntheticMediaDetection property and delivers it to all participants in a roster update notification. Each request with a new id creates a separate detection record; the service doesn't deduplicate or merge reports. When a participant has multiple detection records, the syntheticMediaDetection property reflects the most recent report. Third-party bots can invoke this action only when the meeting tenant administrator grants the app the Calls.ReportSyntheticMedia.All application permission. The detection bot must be admitted to the call before it can call this action. For more information about registering a calling bot and joining calls, see Calls and online meetings. The bot obtains the call ID and participant ID from the call roster and subsequent participant roster update notifications, and uses the call's id as {call-id} and the participant's id as {participant-id} in the request URL. // returns a ODataError error when the service returns a 4XX or 5XX status code +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/participant-reportsyntheticmedia?view=graph-rest-beta func (m *CallsItemParticipantsItemReportSyntheticMediaRequestBuilder) Post(ctx context.Context, body CallsItemParticipantsItemReportSyntheticMediaPostRequestBodyable, requestConfiguration *CallsItemParticipantsItemReportSyntheticMediaRequestBuilderPostRequestConfiguration)(error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -49,7 +52,7 @@ func (m *CallsItemParticipantsItemReportSyntheticMediaRequestBuilder) Post(ctx c } return nil } -// ToPostRequestInformation invoke action reportSyntheticMedia +// ToPostRequestInformation report synthetic media detections for a participant in a meeting call. This action is intended for certified third-party audio and video synthetic media detection bots admitted to the meeting call. The detection bot calls this action to flag a participant whose stream it identifies as AI-generated or synthetic media. The detection result is propagated to all participants via roster updates. After a successful request, the service stores the detection on the participant as a syntheticMediaDetectionInfo object in the participant's syntheticMediaDetection property and delivers it to all participants in a roster update notification. Each request with a new id creates a separate detection record; the service doesn't deduplicate or merge reports. When a participant has multiple detection records, the syntheticMediaDetection property reflects the most recent report. Third-party bots can invoke this action only when the meeting tenant administrator grants the app the Calls.ReportSyntheticMedia.All application permission. The detection bot must be admitted to the call before it can call this action. For more information about registering a calling bot and joining calls, see Calls and online meetings. The bot obtains the call ID and participant ID from the call roster and subsequent participant roster update notifications, and uses the call's id as {call-id} and the participant's id as {participant-id} in the request URL. // returns a *RequestInformation when successful func (m *CallsItemParticipantsItemReportSyntheticMediaRequestBuilder) ToPostRequestInformation(ctx context.Context, body CallsItemParticipantsItemReportSyntheticMediaPostRequestBodyable, requestConfiguration *CallsItemParticipantsItemReportSyntheticMediaRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/drives/item_items_item_assign_sensitivity_label_request_builder.go b/drives/item_items_item_assign_sensitivity_label_request_builder.go index 71e5153f04a..5c0b14ea067 100644 --- a/drives/item_items_item_assign_sensitivity_label_request_builder.go +++ b/drives/item_items_item_assign_sensitivity_label_request_builder.go @@ -33,8 +33,11 @@ func NewItemItemsItemAssignSensitivityLabelRequestBuilder(rawUrl string, request urlParams["request-raw-url"] = rawUrl return NewItemItemsItemAssignSensitivityLabelRequestBuilderInternal(urlParams, requestAdapter) } -// Post invoke action assignSensitivityLabel +// Post asynchronously assign a sensitivity label to a driveItem. This API is part of the Microsoft SharePoint and OneDrive APIs that perform advanced premium administrative functions, and is considered as protected. Protected APIs require you to have more validations, beyond permission and consent, before you can use them. For more information about sensitivity labels from an administrator's perspective, see Enable sensitivity labels for Office files in SharePoint and OneDrive. This API applies sensitivity labels to files at rest. Office clients don't apply watermarks, headers, or footers to files that contain the label information. For more information about sensitivity labels from an administrator's perspective, see Enable sensitivity labels for Office files in SharePoint and OneDrive. // returns a ODataError error when the service returns a 4XX or 5XX status code +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/driveitem-assignsensitivitylabel?view=graph-rest-beta func (m *ItemItemsItemAssignSensitivityLabelRequestBuilder) Post(ctx context.Context, body ItemItemsItemAssignSensitivityLabelPostRequestBodyable, requestConfiguration *ItemItemsItemAssignSensitivityLabelRequestBuilderPostRequestConfiguration)(error) { requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); if err != nil { @@ -49,7 +52,7 @@ func (m *ItemItemsItemAssignSensitivityLabelRequestBuilder) Post(ctx context.Con } return nil } -// ToPostRequestInformation invoke action assignSensitivityLabel +// ToPostRequestInformation asynchronously assign a sensitivity label to a driveItem. This API is part of the Microsoft SharePoint and OneDrive APIs that perform advanced premium administrative functions, and is considered as protected. Protected APIs require you to have more validations, beyond permission and consent, before you can use them. For more information about sensitivity labels from an administrator's perspective, see Enable sensitivity labels for Office files in SharePoint and OneDrive. This API applies sensitivity labels to files at rest. Office clients don't apply watermarks, headers, or footers to files that contain the label information. For more information about sensitivity labels from an administrator's perspective, see Enable sensitivity labels for Office files in SharePoint and OneDrive. // returns a *RequestInformation when successful func (m *ItemItemsItemAssignSensitivityLabelRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemsItemAssignSensitivityLabelPostRequestBodyable, requestConfiguration *ItemItemsItemAssignSensitivityLabelRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/groups/item_planner_plans_item_goals_count_request_builder.go b/groups/item_planner_plans_item_goals_count_request_builder.go new file mode 100644 index 00000000000..f729b61aaa2 --- /dev/null +++ b/groups/item_planner_plans_item_goals_count_request_builder.go @@ -0,0 +1,86 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package groups + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemPlannerPlansItemGoalsCountRequestBuilder provides operations to count the resources in the collection. +type ItemPlannerPlansItemGoalsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemPlannerPlansItemGoalsCountRequestBuilderGetQueryParameters get the number of the resource +type ItemPlannerPlansItemGoalsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string "uriparametername:\"%24filter\"" + // Search items by search phrases + Search *string "uriparametername:\"%24search\"" +} +// ItemPlannerPlansItemGoalsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemPlannerPlansItemGoalsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemPlannerPlansItemGoalsCountRequestBuilderGetQueryParameters +} +// NewItemPlannerPlansItemGoalsCountRequestBuilderInternal instantiates a new ItemPlannerPlansItemGoalsCountRequestBuilder and sets the default values. +func NewItemPlannerPlansItemGoalsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPlannerPlansItemGoalsCountRequestBuilder) { + m := &ItemPlannerPlansItemGoalsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{group%2Did}/planner/plans/{plannerPlan%2Did}/goals/$count{?%24filter,%24search}", pathParameters), + } + return m +} +// NewItemPlannerPlansItemGoalsCountRequestBuilder instantiates a new ItemPlannerPlansItemGoalsCountRequestBuilder and sets the default values. +func NewItemPlannerPlansItemGoalsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPlannerPlansItemGoalsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemPlannerPlansItemGoalsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *int32 when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *ItemPlannerPlansItemGoalsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemPlannerPlansItemGoalsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *RequestInformation when successful +func (m *ItemPlannerPlansItemGoalsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemPlannerPlansItemGoalsCountRequestBuilderGetRequestConfiguration)(*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. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *ItemPlannerPlansItemGoalsCountRequestBuilder when successful +func (m *ItemPlannerPlansItemGoalsCountRequestBuilder) WithUrl(rawUrl string)(*ItemPlannerPlansItemGoalsCountRequestBuilder) { + return NewItemPlannerPlansItemGoalsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/groups/item_planner_plans_item_goals_planner_goal_item_request_builder.go b/groups/item_planner_plans_item_goals_planner_goal_item_request_builder.go new file mode 100644 index 00000000000..0a1077b09e9 --- /dev/null +++ b/groups/item_planner_plans_item_goals_planner_goal_item_request_builder.go @@ -0,0 +1,87 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package groups + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder provides operations to manage the goals property of the microsoft.graph.plannerPlan entity. +type ItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetQueryParameters collection of goals in the plan. Read-only. Nullable. +type ItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string "uriparametername:\"%24expand\"" + // Select properties to be returned + Select []string "uriparametername:\"%24select\"" +} +// ItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetQueryParameters +} +// NewItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderInternal instantiates a new ItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder and sets the default values. +func NewItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) { + m := &ItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{group%2Did}/planner/plans/{plannerPlan%2Did}/goals/{plannerGoal%2Did}{?%24expand,%24select}", pathParameters), + } + return m +} +// NewItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder instantiates a new ItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder and sets the default values. +func NewItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get collection of goals in the plan. Read-only. Nullable. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a PlannerGoalable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *ItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerGoalable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreatePlannerGoalFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerGoalable), nil +} +// ToGetRequestInformation collection of goals in the plan. Read-only. Nullable. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *RequestInformation when successful +func (m *ItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetRequestConfiguration)(*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. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *ItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder when successful +func (m *ItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) WithUrl(rawUrl string)(*ItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) { + return NewItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/groups/item_planner_plans_item_goals_request_builder.go b/groups/item_planner_plans_item_goals_request_builder.go new file mode 100644 index 00000000000..e2f9231c17e --- /dev/null +++ b/groups/item_planner_plans_item_goals_request_builder.go @@ -0,0 +1,117 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package groups + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemPlannerPlansItemGoalsRequestBuilder provides operations to manage the goals property of the microsoft.graph.plannerPlan entity. +type ItemPlannerPlansItemGoalsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemPlannerPlansItemGoalsRequestBuilderGetQueryParameters collection of goals in the plan. Read-only. Nullable. +type ItemPlannerPlansItemGoalsRequestBuilderGetQueryParameters 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\"" +} +// ItemPlannerPlansItemGoalsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemPlannerPlansItemGoalsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemPlannerPlansItemGoalsRequestBuilderGetQueryParameters +} +// ByPlannerGoalId provides operations to manage the goals property of the microsoft.graph.plannerPlan entity. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *ItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder when successful +func (m *ItemPlannerPlansItemGoalsRequestBuilder) ByPlannerGoalId(plannerGoalId string)(*ItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if plannerGoalId != "" { + urlTplParams["plannerGoal%2Did"] = plannerGoalId + } + return NewItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemPlannerPlansItemGoalsRequestBuilderInternal instantiates a new ItemPlannerPlansItemGoalsRequestBuilder and sets the default values. +func NewItemPlannerPlansItemGoalsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPlannerPlansItemGoalsRequestBuilder) { + m := &ItemPlannerPlansItemGoalsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{group%2Did}/planner/plans/{plannerPlan%2Did}/goals{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters), + } + return m +} +// NewItemPlannerPlansItemGoalsRequestBuilder instantiates a new ItemPlannerPlansItemGoalsRequestBuilder and sets the default values. +func NewItemPlannerPlansItemGoalsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPlannerPlansItemGoalsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemPlannerPlansItemGoalsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +// returns a *ItemPlannerPlansItemGoalsCountRequestBuilder when successful +func (m *ItemPlannerPlansItemGoalsRequestBuilder) Count()(*ItemPlannerPlansItemGoalsCountRequestBuilder) { + return NewItemPlannerPlansItemGoalsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get collection of goals in the plan. Read-only. Nullable. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a PlannerGoalCollectionResponseable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *ItemPlannerPlansItemGoalsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemPlannerPlansItemGoalsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerGoalCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreatePlannerGoalCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerGoalCollectionResponseable), nil +} +// ToGetRequestInformation collection of goals in the plan. Read-only. Nullable. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *RequestInformation when successful +func (m *ItemPlannerPlansItemGoalsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemPlannerPlansItemGoalsRequestBuilderGetRequestConfiguration)(*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. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *ItemPlannerPlansItemGoalsRequestBuilder when successful +func (m *ItemPlannerPlansItemGoalsRequestBuilder) WithUrl(rawUrl string)(*ItemPlannerPlansItemGoalsRequestBuilder) { + return NewItemPlannerPlansItemGoalsRequestBuilder(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 90fdf1af386..d8bf78efc9e 100644 --- a/groups/item_planner_plans_planner_plan_item_request_builder.go +++ b/groups/item_planner_plans_planner_plan_item_request_builder.go @@ -113,6 +113,11 @@ func (m *ItemPlannerPlansPlannerPlanItemRequestBuilder) Get(ctx context.Context, func (m *ItemPlannerPlansPlannerPlanItemRequestBuilder) GetUsageRights()(*ItemPlannerPlansItemGetUsageRightsRequestBuilder) { return NewItemPlannerPlansItemGetUsageRightsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// Goals provides operations to manage the goals property of the microsoft.graph.plannerPlan entity. +// returns a *ItemPlannerPlansItemGoalsRequestBuilder when successful +func (m *ItemPlannerPlansPlannerPlanItemRequestBuilder) Goals()(*ItemPlannerPlansItemGoalsRequestBuilder) { + return NewItemPlannerPlansItemGoalsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // HistoryItems provides operations to manage the historyItems property of the microsoft.graph.plannerPlan entity. // returns a *ItemPlannerPlansItemHistoryItemsRequestBuilder when successful func (m *ItemPlannerPlansPlannerPlanItemRequestBuilder) HistoryItems()(*ItemPlannerPlansItemHistoryItemsRequestBuilder) { diff --git a/groups/item_team_channels_item_planner_plans_item_goals_count_request_builder.go b/groups/item_team_channels_item_planner_plans_item_goals_count_request_builder.go new file mode 100644 index 00000000000..b2d717e3274 --- /dev/null +++ b/groups/item_team_channels_item_planner_plans_item_goals_count_request_builder.go @@ -0,0 +1,86 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package groups + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemTeamChannelsItemPlannerPlansItemGoalsCountRequestBuilder provides operations to count the resources in the collection. +type ItemTeamChannelsItemPlannerPlansItemGoalsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemTeamChannelsItemPlannerPlansItemGoalsCountRequestBuilderGetQueryParameters get the number of the resource +type ItemTeamChannelsItemPlannerPlansItemGoalsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string "uriparametername:\"%24filter\"" + // Search items by search phrases + Search *string "uriparametername:\"%24search\"" +} +// ItemTeamChannelsItemPlannerPlansItemGoalsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemTeamChannelsItemPlannerPlansItemGoalsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemTeamChannelsItemPlannerPlansItemGoalsCountRequestBuilderGetQueryParameters +} +// NewItemTeamChannelsItemPlannerPlansItemGoalsCountRequestBuilderInternal instantiates a new ItemTeamChannelsItemPlannerPlansItemGoalsCountRequestBuilder and sets the default values. +func NewItemTeamChannelsItemPlannerPlansItemGoalsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamChannelsItemPlannerPlansItemGoalsCountRequestBuilder) { + m := &ItemTeamChannelsItemPlannerPlansItemGoalsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{group%2Did}/team/channels/{channel%2Did}/planner/plans/{plannerPlan%2Did}/goals/$count{?%24filter,%24search}", pathParameters), + } + return m +} +// NewItemTeamChannelsItemPlannerPlansItemGoalsCountRequestBuilder instantiates a new ItemTeamChannelsItemPlannerPlansItemGoalsCountRequestBuilder and sets the default values. +func NewItemTeamChannelsItemPlannerPlansItemGoalsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamChannelsItemPlannerPlansItemGoalsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamChannelsItemPlannerPlansItemGoalsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *int32 when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *ItemTeamChannelsItemPlannerPlansItemGoalsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemTeamChannelsItemPlannerPlansItemGoalsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *RequestInformation when successful +func (m *ItemTeamChannelsItemPlannerPlansItemGoalsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemTeamChannelsItemPlannerPlansItemGoalsCountRequestBuilderGetRequestConfiguration)(*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. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *ItemTeamChannelsItemPlannerPlansItemGoalsCountRequestBuilder when successful +func (m *ItemTeamChannelsItemPlannerPlansItemGoalsCountRequestBuilder) WithUrl(rawUrl string)(*ItemTeamChannelsItemPlannerPlansItemGoalsCountRequestBuilder) { + return NewItemTeamChannelsItemPlannerPlansItemGoalsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/groups/item_team_channels_item_planner_plans_item_goals_planner_goal_item_request_builder.go b/groups/item_team_channels_item_planner_plans_item_goals_planner_goal_item_request_builder.go new file mode 100644 index 00000000000..6603863699f --- /dev/null +++ b/groups/item_team_channels_item_planner_plans_item_goals_planner_goal_item_request_builder.go @@ -0,0 +1,87 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package groups + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemTeamChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder provides operations to manage the goals property of the microsoft.graph.plannerPlan entity. +type ItemTeamChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemTeamChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetQueryParameters collection of goals in the plan. Read-only. Nullable. +type ItemTeamChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string "uriparametername:\"%24expand\"" + // Select properties to be returned + Select []string "uriparametername:\"%24select\"" +} +// ItemTeamChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemTeamChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemTeamChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetQueryParameters +} +// NewItemTeamChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderInternal instantiates a new ItemTeamChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder and sets the default values. +func NewItemTeamChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) { + m := &ItemTeamChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{group%2Did}/team/channels/{channel%2Did}/planner/plans/{plannerPlan%2Did}/goals/{plannerGoal%2Did}{?%24expand,%24select}", pathParameters), + } + return m +} +// NewItemTeamChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder instantiates a new ItemTeamChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder and sets the default values. +func NewItemTeamChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get collection of goals in the plan. Read-only. Nullable. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a PlannerGoalable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *ItemTeamChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemTeamChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerGoalable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreatePlannerGoalFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerGoalable), nil +} +// ToGetRequestInformation collection of goals in the plan. Read-only. Nullable. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *RequestInformation when successful +func (m *ItemTeamChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemTeamChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetRequestConfiguration)(*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. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *ItemTeamChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder when successful +func (m *ItemTeamChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) WithUrl(rawUrl string)(*ItemTeamChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) { + return NewItemTeamChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/groups/item_team_channels_item_planner_plans_item_goals_request_builder.go b/groups/item_team_channels_item_planner_plans_item_goals_request_builder.go new file mode 100644 index 00000000000..9443fddd2bc --- /dev/null +++ b/groups/item_team_channels_item_planner_plans_item_goals_request_builder.go @@ -0,0 +1,117 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package groups + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemTeamChannelsItemPlannerPlansItemGoalsRequestBuilder provides operations to manage the goals property of the microsoft.graph.plannerPlan entity. +type ItemTeamChannelsItemPlannerPlansItemGoalsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemTeamChannelsItemPlannerPlansItemGoalsRequestBuilderGetQueryParameters collection of goals in the plan. Read-only. Nullable. +type ItemTeamChannelsItemPlannerPlansItemGoalsRequestBuilderGetQueryParameters 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\"" +} +// ItemTeamChannelsItemPlannerPlansItemGoalsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemTeamChannelsItemPlannerPlansItemGoalsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemTeamChannelsItemPlannerPlansItemGoalsRequestBuilderGetQueryParameters +} +// ByPlannerGoalId provides operations to manage the goals property of the microsoft.graph.plannerPlan entity. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *ItemTeamChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder when successful +func (m *ItemTeamChannelsItemPlannerPlansItemGoalsRequestBuilder) ByPlannerGoalId(plannerGoalId string)(*ItemTeamChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if plannerGoalId != "" { + urlTplParams["plannerGoal%2Did"] = plannerGoalId + } + return NewItemTeamChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemTeamChannelsItemPlannerPlansItemGoalsRequestBuilderInternal instantiates a new ItemTeamChannelsItemPlannerPlansItemGoalsRequestBuilder and sets the default values. +func NewItemTeamChannelsItemPlannerPlansItemGoalsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamChannelsItemPlannerPlansItemGoalsRequestBuilder) { + m := &ItemTeamChannelsItemPlannerPlansItemGoalsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{group%2Did}/team/channels/{channel%2Did}/planner/plans/{plannerPlan%2Did}/goals{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters), + } + return m +} +// NewItemTeamChannelsItemPlannerPlansItemGoalsRequestBuilder instantiates a new ItemTeamChannelsItemPlannerPlansItemGoalsRequestBuilder and sets the default values. +func NewItemTeamChannelsItemPlannerPlansItemGoalsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamChannelsItemPlannerPlansItemGoalsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamChannelsItemPlannerPlansItemGoalsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +// returns a *ItemTeamChannelsItemPlannerPlansItemGoalsCountRequestBuilder when successful +func (m *ItemTeamChannelsItemPlannerPlansItemGoalsRequestBuilder) Count()(*ItemTeamChannelsItemPlannerPlansItemGoalsCountRequestBuilder) { + return NewItemTeamChannelsItemPlannerPlansItemGoalsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get collection of goals in the plan. Read-only. Nullable. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a PlannerGoalCollectionResponseable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *ItemTeamChannelsItemPlannerPlansItemGoalsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemTeamChannelsItemPlannerPlansItemGoalsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerGoalCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreatePlannerGoalCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerGoalCollectionResponseable), nil +} +// ToGetRequestInformation collection of goals in the plan. Read-only. Nullable. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *RequestInformation when successful +func (m *ItemTeamChannelsItemPlannerPlansItemGoalsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemTeamChannelsItemPlannerPlansItemGoalsRequestBuilderGetRequestConfiguration)(*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. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *ItemTeamChannelsItemPlannerPlansItemGoalsRequestBuilder when successful +func (m *ItemTeamChannelsItemPlannerPlansItemGoalsRequestBuilder) WithUrl(rawUrl string)(*ItemTeamChannelsItemPlannerPlansItemGoalsRequestBuilder) { + return NewItemTeamChannelsItemPlannerPlansItemGoalsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/groups/item_team_channels_item_planner_plans_planner_plan_item_request_builder.go b/groups/item_team_channels_item_planner_plans_planner_plan_item_request_builder.go index 5e0a812d800..2e44de006fd 100644 --- a/groups/item_team_channels_item_planner_plans_planner_plan_item_request_builder.go +++ b/groups/item_team_channels_item_planner_plans_planner_plan_item_request_builder.go @@ -113,6 +113,11 @@ func (m *ItemTeamChannelsItemPlannerPlansPlannerPlanItemRequestBuilder) Get(ctx func (m *ItemTeamChannelsItemPlannerPlansPlannerPlanItemRequestBuilder) GetUsageRights()(*ItemTeamChannelsItemPlannerPlansItemGetUsageRightsRequestBuilder) { return NewItemTeamChannelsItemPlannerPlansItemGetUsageRightsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// Goals provides operations to manage the goals property of the microsoft.graph.plannerPlan entity. +// returns a *ItemTeamChannelsItemPlannerPlansItemGoalsRequestBuilder when successful +func (m *ItemTeamChannelsItemPlannerPlansPlannerPlanItemRequestBuilder) Goals()(*ItemTeamChannelsItemPlannerPlansItemGoalsRequestBuilder) { + return NewItemTeamChannelsItemPlannerPlansItemGoalsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // HistoryItems provides operations to manage the historyItems property of the microsoft.graph.plannerPlan entity. // returns a *ItemTeamChannelsItemPlannerPlansItemHistoryItemsRequestBuilder when successful func (m *ItemTeamChannelsItemPlannerPlansPlannerPlanItemRequestBuilder) HistoryItems()(*ItemTeamChannelsItemPlannerPlansItemHistoryItemsRequestBuilder) { diff --git a/groups/item_team_primary_channel_planner_plans_item_goals_count_request_builder.go b/groups/item_team_primary_channel_planner_plans_item_goals_count_request_builder.go new file mode 100644 index 00000000000..c89571e998a --- /dev/null +++ b/groups/item_team_primary_channel_planner_plans_item_goals_count_request_builder.go @@ -0,0 +1,86 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package groups + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemTeamPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder provides operations to count the resources in the collection. +type ItemTeamPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemTeamPrimaryChannelPlannerPlansItemGoalsCountRequestBuilderGetQueryParameters get the number of the resource +type ItemTeamPrimaryChannelPlannerPlansItemGoalsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string "uriparametername:\"%24filter\"" + // Search items by search phrases + Search *string "uriparametername:\"%24search\"" +} +// ItemTeamPrimaryChannelPlannerPlansItemGoalsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemTeamPrimaryChannelPlannerPlansItemGoalsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemTeamPrimaryChannelPlannerPlansItemGoalsCountRequestBuilderGetQueryParameters +} +// NewItemTeamPrimaryChannelPlannerPlansItemGoalsCountRequestBuilderInternal instantiates a new ItemTeamPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder and sets the default values. +func NewItemTeamPrimaryChannelPlannerPlansItemGoalsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder) { + m := &ItemTeamPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{group%2Did}/team/primaryChannel/planner/plans/{plannerPlan%2Did}/goals/$count{?%24filter,%24search}", pathParameters), + } + return m +} +// NewItemTeamPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder instantiates a new ItemTeamPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder and sets the default values. +func NewItemTeamPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamPrimaryChannelPlannerPlansItemGoalsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *int32 when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *ItemTeamPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemTeamPrimaryChannelPlannerPlansItemGoalsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *RequestInformation when successful +func (m *ItemTeamPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemTeamPrimaryChannelPlannerPlansItemGoalsCountRequestBuilderGetRequestConfiguration)(*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. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *ItemTeamPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder when successful +func (m *ItemTeamPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder) WithUrl(rawUrl string)(*ItemTeamPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder) { + return NewItemTeamPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/groups/item_team_primary_channel_planner_plans_item_goals_planner_goal_item_request_builder.go b/groups/item_team_primary_channel_planner_plans_item_goals_planner_goal_item_request_builder.go new file mode 100644 index 00000000000..e6ee749dc3d --- /dev/null +++ b/groups/item_team_primary_channel_planner_plans_item_goals_planner_goal_item_request_builder.go @@ -0,0 +1,87 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package groups + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemTeamPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder provides operations to manage the goals property of the microsoft.graph.plannerPlan entity. +type ItemTeamPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemTeamPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetQueryParameters collection of goals in the plan. Read-only. Nullable. +type ItemTeamPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string "uriparametername:\"%24expand\"" + // Select properties to be returned + Select []string "uriparametername:\"%24select\"" +} +// ItemTeamPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemTeamPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemTeamPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetQueryParameters +} +// NewItemTeamPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilderInternal instantiates a new ItemTeamPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder and sets the default values. +func NewItemTeamPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) { + m := &ItemTeamPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{group%2Did}/team/primaryChannel/planner/plans/{plannerPlan%2Did}/goals/{plannerGoal%2Did}{?%24expand,%24select}", pathParameters), + } + return m +} +// NewItemTeamPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder instantiates a new ItemTeamPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder and sets the default values. +func NewItemTeamPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get collection of goals in the plan. Read-only. Nullable. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a PlannerGoalable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *ItemTeamPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemTeamPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerGoalable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreatePlannerGoalFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerGoalable), nil +} +// ToGetRequestInformation collection of goals in the plan. Read-only. Nullable. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *RequestInformation when successful +func (m *ItemTeamPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemTeamPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetRequestConfiguration)(*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. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *ItemTeamPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder when successful +func (m *ItemTeamPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) WithUrl(rawUrl string)(*ItemTeamPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) { + return NewItemTeamPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/groups/item_team_primary_channel_planner_plans_item_goals_request_builder.go b/groups/item_team_primary_channel_planner_plans_item_goals_request_builder.go new file mode 100644 index 00000000000..f6a6400d8f0 --- /dev/null +++ b/groups/item_team_primary_channel_planner_plans_item_goals_request_builder.go @@ -0,0 +1,117 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package groups + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemTeamPrimaryChannelPlannerPlansItemGoalsRequestBuilder provides operations to manage the goals property of the microsoft.graph.plannerPlan entity. +type ItemTeamPrimaryChannelPlannerPlansItemGoalsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemTeamPrimaryChannelPlannerPlansItemGoalsRequestBuilderGetQueryParameters collection of goals in the plan. Read-only. Nullable. +type ItemTeamPrimaryChannelPlannerPlansItemGoalsRequestBuilderGetQueryParameters 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\"" +} +// ItemTeamPrimaryChannelPlannerPlansItemGoalsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemTeamPrimaryChannelPlannerPlansItemGoalsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemTeamPrimaryChannelPlannerPlansItemGoalsRequestBuilderGetQueryParameters +} +// ByPlannerGoalId provides operations to manage the goals property of the microsoft.graph.plannerPlan entity. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *ItemTeamPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder when successful +func (m *ItemTeamPrimaryChannelPlannerPlansItemGoalsRequestBuilder) ByPlannerGoalId(plannerGoalId string)(*ItemTeamPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if plannerGoalId != "" { + urlTplParams["plannerGoal%2Did"] = plannerGoalId + } + return NewItemTeamPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemTeamPrimaryChannelPlannerPlansItemGoalsRequestBuilderInternal instantiates a new ItemTeamPrimaryChannelPlannerPlansItemGoalsRequestBuilder and sets the default values. +func NewItemTeamPrimaryChannelPlannerPlansItemGoalsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamPrimaryChannelPlannerPlansItemGoalsRequestBuilder) { + m := &ItemTeamPrimaryChannelPlannerPlansItemGoalsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/groups/{group%2Did}/team/primaryChannel/planner/plans/{plannerPlan%2Did}/goals{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters), + } + return m +} +// NewItemTeamPrimaryChannelPlannerPlansItemGoalsRequestBuilder instantiates a new ItemTeamPrimaryChannelPlannerPlansItemGoalsRequestBuilder and sets the default values. +func NewItemTeamPrimaryChannelPlannerPlansItemGoalsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamPrimaryChannelPlannerPlansItemGoalsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamPrimaryChannelPlannerPlansItemGoalsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +// returns a *ItemTeamPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder when successful +func (m *ItemTeamPrimaryChannelPlannerPlansItemGoalsRequestBuilder) Count()(*ItemTeamPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder) { + return NewItemTeamPrimaryChannelPlannerPlansItemGoalsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get collection of goals in the plan. Read-only. Nullable. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a PlannerGoalCollectionResponseable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *ItemTeamPrimaryChannelPlannerPlansItemGoalsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemTeamPrimaryChannelPlannerPlansItemGoalsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerGoalCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreatePlannerGoalCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerGoalCollectionResponseable), nil +} +// ToGetRequestInformation collection of goals in the plan. Read-only. Nullable. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *RequestInformation when successful +func (m *ItemTeamPrimaryChannelPlannerPlansItemGoalsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemTeamPrimaryChannelPlannerPlansItemGoalsRequestBuilderGetRequestConfiguration)(*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. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *ItemTeamPrimaryChannelPlannerPlansItemGoalsRequestBuilder when successful +func (m *ItemTeamPrimaryChannelPlannerPlansItemGoalsRequestBuilder) WithUrl(rawUrl string)(*ItemTeamPrimaryChannelPlannerPlansItemGoalsRequestBuilder) { + return NewItemTeamPrimaryChannelPlannerPlansItemGoalsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/groups/item_team_primary_channel_planner_plans_planner_plan_item_request_builder.go b/groups/item_team_primary_channel_planner_plans_planner_plan_item_request_builder.go index b4b7460e02c..178ffe122cc 100644 --- a/groups/item_team_primary_channel_planner_plans_planner_plan_item_request_builder.go +++ b/groups/item_team_primary_channel_planner_plans_planner_plan_item_request_builder.go @@ -113,6 +113,11 @@ func (m *ItemTeamPrimaryChannelPlannerPlansPlannerPlanItemRequestBuilder) Get(ct func (m *ItemTeamPrimaryChannelPlannerPlansPlannerPlanItemRequestBuilder) GetUsageRights()(*ItemTeamPrimaryChannelPlannerPlansItemGetUsageRightsRequestBuilder) { return NewItemTeamPrimaryChannelPlannerPlansItemGetUsageRightsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// Goals provides operations to manage the goals property of the microsoft.graph.plannerPlan entity. +// returns a *ItemTeamPrimaryChannelPlannerPlansItemGoalsRequestBuilder when successful +func (m *ItemTeamPrimaryChannelPlannerPlansPlannerPlanItemRequestBuilder) Goals()(*ItemTeamPrimaryChannelPlannerPlansItemGoalsRequestBuilder) { + return NewItemTeamPrimaryChannelPlannerPlansItemGoalsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // HistoryItems provides operations to manage the historyItems property of the microsoft.graph.plannerPlan entity. // returns a *ItemTeamPrimaryChannelPlannerPlansItemHistoryItemsRequestBuilder when successful func (m *ItemTeamPrimaryChannelPlannerPlansPlannerPlanItemRequestBuilder) HistoryItems()(*ItemTeamPrimaryChannelPlannerPlansItemHistoryItemsRequestBuilder) { diff --git a/kiota-dom-export.txt b/kiota-dom-export.txt index 015f3989823..cfac6d68f0b 100644 --- a/kiota-dom-export.txt +++ b/kiota-dom-export.txt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:083ee6ff8226067cc264773c9e858f99cdc1e09fa36d0570dd0cc1cd576940b9 -size 113112861 +oid sha256:32567523466a0e5a3e8fc0af2c75b9c8c6b4c0246bdeff14343740acd1bb28fb +size 113315624 diff --git a/kiota-lock.json b/kiota-lock.json index f5f420317cf..3b59aad3bae 100644 --- a/kiota-lock.json +++ b/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "9E99D95BCD1288D6ACD5509BB638D7A5FFAA1CBCE499D2605AA7DFD71751474D5476525C7A912CDD94FC0413398C93D7EC5320853177D6AA1DFF2C52389B1C80", + "descriptionHash": "6B168C4DEA89F82CE7BD09222A01A433A0036A725829803C8823F3F39E7C5E29157E30C4118F0A1971427E16A837D247B32B8DF75EB3CBD4D597E5CBC2E83E9E", "descriptionLocation": "../../msgraph-metadata/clean_beta_openapi/openapi.yaml", "lockFileVersion": "1.0.0", "kiotaVersion": "1.34.1", diff --git a/models/audio_metadata.go b/models/audio_metadata.go index 4edbdc17855..00dfdce522d 100644 --- a/models/audio_metadata.go +++ b/models/audio_metadata.go @@ -43,7 +43,7 @@ func (m *AudioMetadata) GetAdditionalData()(map[string]any) { func (m *AudioMetadata) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { return m.backingStore } -// GetBitDepth gets the bitDepth property value. The bitDepth property +// GetBitDepth gets the bitDepth property value. Bit depth of the audio samples (for example, 16, 24). // returns a *int32 when successful func (m *AudioMetadata) GetBitDepth()(*int32) { val, err := m.GetBackingStore().Get("bitDepth") @@ -55,7 +55,7 @@ func (m *AudioMetadata) GetBitDepth()(*int32) { } return nil } -// GetChannels gets the channels property value. The channels property +// GetChannels gets the channels property value. Number of audio channels (for example, 1 for mono, 2 for stereo). // returns a *int32 when successful func (m *AudioMetadata) GetChannels()(*int32) { val, err := m.GetBackingStore().Get("channels") @@ -125,7 +125,7 @@ func (m *AudioMetadata) GetOdataType()(*string) { } return nil } -// GetSampleRateHz gets the sampleRateHz property value. The sampleRateHz property +// GetSampleRateHz gets the sampleRateHz property value. Sample rate in Hertz (for example, 16000, 48000). // returns a *int32 when successful func (m *AudioMetadata) GetSampleRateHz()(*int32) { val, err := m.GetBackingStore().Get("sampleRateHz") @@ -182,14 +182,14 @@ func (m *AudioMetadata) SetAdditionalData(value map[string]any)() { func (m *AudioMetadata) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { m.backingStore = value } -// SetBitDepth sets the bitDepth property value. The bitDepth property +// SetBitDepth sets the bitDepth property value. Bit depth of the audio samples (for example, 16, 24). func (m *AudioMetadata) SetBitDepth(value *int32)() { err := m.GetBackingStore().Set("bitDepth", value) if err != nil { panic(err) } } -// SetChannels sets the channels property value. The channels property +// SetChannels sets the channels property value. Number of audio channels (for example, 1 for mono, 2 for stereo). func (m *AudioMetadata) SetChannels(value *int32)() { err := m.GetBackingStore().Set("channels", value) if err != nil { @@ -203,7 +203,7 @@ func (m *AudioMetadata) SetOdataType(value *string)() { panic(err) } } -// SetSampleRateHz sets the sampleRateHz property value. The sampleRateHz property +// SetSampleRateHz sets the sampleRateHz property value. Sample rate in Hertz (for example, 16000, 48000). func (m *AudioMetadata) SetSampleRateHz(value *int32)() { err := m.GetBackingStore().Set("sampleRateHz", value) if err != nil { diff --git a/models/authentication.go b/models/authentication.go index fb820768511..45bdeea9f49 100644 --- a/models/authentication.go +++ b/models/authentication.go @@ -258,6 +258,22 @@ func (m *Authentication) GetFieldDeserializers()(map[string]func(i878a80d2330e89 } return nil } + res["resourceAccountKeyAuthenticationMethods"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateResourceAccountKeyAuthenticationMethodFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ResourceAccountKeyAuthenticationMethodable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ResourceAccountKeyAuthenticationMethodable) + } + } + m.SetResourceAccountKeyAuthenticationMethods(res) + } + return nil + } res["signInPreferences"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(CreateSignInPreferencesFromDiscriminatorValue) if err != nil { @@ -438,6 +454,18 @@ func (m *Authentication) GetRequirements()(StrongAuthenticationRequirementsable) } return nil } +// GetResourceAccountKeyAuthenticationMethods gets the resourceAccountKeyAuthenticationMethods property value. Represents the resource account key credentials registered to a user for authentication on shared devices. +// returns a []ResourceAccountKeyAuthenticationMethodable when successful +func (m *Authentication) GetResourceAccountKeyAuthenticationMethods()([]ResourceAccountKeyAuthenticationMethodable) { + val, err := m.GetBackingStore().Get("resourceAccountKeyAuthenticationMethods") + if err != nil { + panic(err) + } + if val != nil { + return val.([]ResourceAccountKeyAuthenticationMethodable) + } + return nil +} // GetSignInPreferences gets the signInPreferences property value. The settings and preferences for the sign-in experience of a user. Use this property to configure the user's default multifactor authentication (MFA) method. // returns a SignInPreferencesable when successful func (m *Authentication) GetSignInPreferences()(SignInPreferencesable) { @@ -636,6 +664,18 @@ func (m *Authentication) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a return err } } + if m.GetResourceAccountKeyAuthenticationMethods() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetResourceAccountKeyAuthenticationMethods())) + for i, v := range m.GetResourceAccountKeyAuthenticationMethods() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err = writer.WriteCollectionOfObjectValues("resourceAccountKeyAuthenticationMethods", cast) + if err != nil { + return err + } + } { err = writer.WriteObjectValue("signInPreferences", m.GetSignInPreferences()) if err != nil { @@ -771,6 +811,13 @@ func (m *Authentication) SetRequirements(value StrongAuthenticationRequirementsa panic(err) } } +// SetResourceAccountKeyAuthenticationMethods sets the resourceAccountKeyAuthenticationMethods property value. Represents the resource account key credentials registered to a user for authentication on shared devices. +func (m *Authentication) SetResourceAccountKeyAuthenticationMethods(value []ResourceAccountKeyAuthenticationMethodable)() { + err := m.GetBackingStore().Set("resourceAccountKeyAuthenticationMethods", value) + if err != nil { + panic(err) + } +} // SetSignInPreferences sets the signInPreferences property value. The settings and preferences for the sign-in experience of a user. Use this property to configure the user's default multifactor authentication (MFA) method. func (m *Authentication) SetSignInPreferences(value SignInPreferencesable)() { err := m.GetBackingStore().Set("signInPreferences", value) @@ -815,6 +862,7 @@ type Authenticationable interface { GetPlatformCredentialMethods()([]PlatformCredentialAuthenticationMethodable) GetQrCodePinMethod()(QrCodePinAuthenticationMethodable) GetRequirements()(StrongAuthenticationRequirementsable) + GetResourceAccountKeyAuthenticationMethods()([]ResourceAccountKeyAuthenticationMethodable) GetSignInPreferences()(SignInPreferencesable) GetSoftwareOathMethods()([]SoftwareOathAuthenticationMethodable) GetTemporaryAccessPassMethods()([]TemporaryAccessPassAuthenticationMethodable) @@ -832,6 +880,7 @@ type Authenticationable interface { SetPlatformCredentialMethods(value []PlatformCredentialAuthenticationMethodable)() SetQrCodePinMethod(value QrCodePinAuthenticationMethodable)() SetRequirements(value StrongAuthenticationRequirementsable)() + SetResourceAccountKeyAuthenticationMethods(value []ResourceAccountKeyAuthenticationMethodable)() SetSignInPreferences(value SignInPreferencesable)() SetSoftwareOathMethods(value []SoftwareOathAuthenticationMethodable)() SetTemporaryAccessPassMethods(value []TemporaryAccessPassAuthenticationMethodable)() diff --git a/models/authentication_method.go b/models/authentication_method.go index 2001eff7a60..f4ced76cb4e 100644 --- a/models/authentication_method.go +++ b/models/authentication_method.go @@ -53,6 +53,8 @@ func CreateAuthenticationMethodFromDiscriminatorValue(parseNode i878a80d2330e89d return NewPlatformCredentialAuthenticationMethod(), nil case "#microsoft.graph.qrCodePinAuthenticationMethod": return NewQrCodePinAuthenticationMethod(), nil + case "#microsoft.graph.resourceAccountKeyAuthenticationMethod": + return NewResourceAccountKeyAuthenticationMethod(), nil case "#microsoft.graph.softwareOathAuthenticationMethod": return NewSoftwareOathAuthenticationMethod(), nil case "#microsoft.graph.temporaryAccessPassAuthenticationMethod": diff --git a/models/chat.go b/models/chat.go index 2f09b8294ff..fe4bbf970be 100644 --- a/models/chat.go +++ b/models/chat.go @@ -479,7 +479,7 @@ func (m *Chat) GetTabs()([]TeamsTabable) { } return nil } -// GetTargetedMessages gets the targetedMessages property value. A collection of targeted messages in the chat that are visible only to specific users. Nullable. +// GetTargetedMessages gets the targetedMessages property value. A collection of targeted messages in the chat that are visible only to specific users. Nullable. You can't expand this relationship using $expand. Targeted messages can also be retrieved via the userTeamwork: getAllTargetedMessages API. // returns a []TargetedChatMessageable when successful func (m *Chat) GetTargetedMessages()([]TargetedChatMessageable) { val, err := m.GetBackingStore().Get("targetedMessages") @@ -835,7 +835,7 @@ func (m *Chat) SetTabs(value []TeamsTabable)() { panic(err) } } -// SetTargetedMessages sets the targetedMessages property value. A collection of targeted messages in the chat that are visible only to specific users. Nullable. +// SetTargetedMessages sets the targetedMessages property value. A collection of targeted messages in the chat that are visible only to specific users. Nullable. You can't expand this relationship using $expand. Targeted messages can also be retrieved via the userTeamwork: getAllTargetedMessages API. func (m *Chat) SetTargetedMessages(value []TargetedChatMessageable)() { err := m.GetBackingStore().Set("targetedMessages", value) if err != nil { diff --git a/models/classification_request_content_meta_data.go b/models/classification_request_content_meta_data.go index e8b2c104f5a..58e8c156bb5 100644 --- a/models/classification_request_content_meta_data.go +++ b/models/classification_request_content_meta_data.go @@ -81,7 +81,7 @@ func (m *ClassificationRequestContentMetaData) GetOdataType()(*string) { } return nil } -// GetSourceId gets the sourceId property value. The sourceId property +// GetSourceId gets the sourceId property value. An identifier for the source of the content being classified. // returns a *string when successful func (m *ClassificationRequestContentMetaData) GetSourceId()(*string) { val, err := m.GetBackingStore().Get("sourceId") @@ -133,7 +133,7 @@ func (m *ClassificationRequestContentMetaData) SetOdataType(value *string)() { panic(err) } } -// SetSourceId sets the sourceId property value. The sourceId property +// SetSourceId sets the sourceId property value. An identifier for the source of the content being classified. func (m *ClassificationRequestContentMetaData) SetSourceId(value *string)() { err := m.GetBackingStore().Set("sourceId", value) if err != nil { diff --git a/models/client_credential_authentication_info.go b/models/client_credential_authentication_info.go index 8bbf9333c47..0db00480ef6 100644 --- a/models/client_credential_authentication_info.go +++ b/models/client_credential_authentication_info.go @@ -24,7 +24,7 @@ func NewClientCredentialAuthenticationInfo()(*ClientCredentialAuthenticationInfo func CreateClientCredentialAuthenticationInfoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewClientCredentialAuthenticationInfo(), nil } -// GetAccessTokenUrl gets the accessTokenUrl property value. The accessTokenUrl property +// GetAccessTokenUrl gets the accessTokenUrl property value. The URL endpoint used to obtain access tokens for authentication with the external system. // returns a *string when successful func (m *ClientCredentialAuthenticationInfo) GetAccessTokenUrl()(*string) { val, err := m.GetBackingStore().Get("accessTokenUrl") @@ -36,7 +36,7 @@ func (m *ClientCredentialAuthenticationInfo) GetAccessTokenUrl()(*string) { } return nil } -// GetClientId gets the clientId property value. The clientId property +// GetClientId gets the clientId property value. The client identifier used for authentication with the external system. // returns a *string when successful func (m *ClientCredentialAuthenticationInfo) GetClientId()(*string) { val, err := m.GetBackingStore().Get("clientId") @@ -84,7 +84,7 @@ func (m *ClientCredentialAuthenticationInfo) GetFieldDeserializers()(map[string] } return res } -// GetSecretName gets the secretName property value. The secretName property +// GetSecretName gets the secretName property value. The name of the secret in Azure Key Vault that contains the client secret. // returns a *string when successful func (m *ClientCredentialAuthenticationInfo) GetSecretName()(*string) { val, err := m.GetBackingStore().Get("secretName") @@ -122,21 +122,21 @@ func (m *ClientCredentialAuthenticationInfo) Serialize(writer i878a80d2330e89d26 } return nil } -// SetAccessTokenUrl sets the accessTokenUrl property value. The accessTokenUrl property +// SetAccessTokenUrl sets the accessTokenUrl property value. The URL endpoint used to obtain access tokens for authentication with the external system. func (m *ClientCredentialAuthenticationInfo) SetAccessTokenUrl(value *string)() { err := m.GetBackingStore().Set("accessTokenUrl", value) if err != nil { panic(err) } } -// SetClientId sets the clientId property value. The clientId property +// SetClientId sets the clientId property value. The client identifier used for authentication with the external system. func (m *ClientCredentialAuthenticationInfo) SetClientId(value *string)() { err := m.GetBackingStore().Set("clientId", value) if err != nil { panic(err) } } -// SetSecretName sets the secretName property value. The secretName property +// SetSecretName sets the secretName property value. The name of the secret in Azure Key Vault that contains the client secret. func (m *ClientCredentialAuthenticationInfo) SetSecretName(value *string)() { err := m.GetBackingStore().Set("secretName", value) if err != nil { diff --git a/models/distribution_list.go b/models/distribution_list.go index 4c77a57e237..d9fe4b3de76 100644 --- a/models/distribution_list.go +++ b/models/distribution_list.go @@ -104,7 +104,7 @@ func (m *DistributionList) GetFieldDeserializers()(map[string]func(i878a80d2330e } return res } -// GetMembers gets the members property value. The list of members in the distribution list. Not returned by default; use $select=members to include. +// GetMembers gets the members property value. The members property // returns a []Memberable when successful func (m *DistributionList) GetMembers()([]Memberable) { val, err := m.GetBackingStore().Get("members") @@ -116,7 +116,7 @@ func (m *DistributionList) GetMembers()([]Memberable) { } return nil } -// GetNotes gets the notes property value. The notes property +// GetNotes gets the notes property value. Notes about the distribution list. // returns a *string when successful func (m *DistributionList) GetNotes()(*string) { val, err := m.GetBackingStore().Get("notes") @@ -128,7 +128,7 @@ func (m *DistributionList) GetNotes()(*string) { } return nil } -// GetPersonIdentifier gets the personIdentifier property value. The personIdentifier property +// GetPersonIdentifier gets the personIdentifier property value. The unique identifier of the distribution list in the mailbox. Read-only. // returns a *string when successful func (m *DistributionList) GetPersonIdentifier()(*string) { val, err := m.GetBackingStore().Get("personIdentifier") @@ -140,7 +140,7 @@ func (m *DistributionList) GetPersonIdentifier()(*string) { } return nil } -// GetSingleValueExtendedProperties gets the singleValueExtendedProperties property value. The singleValueExtendedProperties property +// GetSingleValueExtendedProperties gets the singleValueExtendedProperties property value. The collection of single-value extended properties defined for the distribution list. Read-only. // returns a []SingleValueLegacyExtendedPropertyable when successful func (m *DistributionList) GetSingleValueExtendedProperties()([]SingleValueLegacyExtendedPropertyable) { val, err := m.GetBackingStore().Get("singleValueExtendedProperties") @@ -209,28 +209,28 @@ func (m *DistributionList) SetDisplayName(value *string)() { panic(err) } } -// SetMembers sets the members property value. The list of members in the distribution list. Not returned by default; use $select=members to include. +// SetMembers sets the members property value. The members property func (m *DistributionList) SetMembers(value []Memberable)() { err := m.GetBackingStore().Set("members", value) if err != nil { panic(err) } } -// SetNotes sets the notes property value. The notes property +// SetNotes sets the notes property value. Notes about the distribution list. func (m *DistributionList) SetNotes(value *string)() { err := m.GetBackingStore().Set("notes", value) if err != nil { panic(err) } } -// SetPersonIdentifier sets the personIdentifier property value. The personIdentifier property +// SetPersonIdentifier sets the personIdentifier property value. The unique identifier of the distribution list in the mailbox. Read-only. func (m *DistributionList) SetPersonIdentifier(value *string)() { err := m.GetBackingStore().Set("personIdentifier", value) if err != nil { panic(err) } } -// SetSingleValueExtendedProperties sets the singleValueExtendedProperties property value. The singleValueExtendedProperties property +// SetSingleValueExtendedProperties sets the singleValueExtendedProperties property value. The collection of single-value extended properties defined for the distribution list. Read-only. func (m *DistributionList) SetSingleValueExtendedProperties(value []SingleValueLegacyExtendedPropertyable)() { err := m.GetBackingStore().Set("singleValueExtendedProperties", value) if err != nil { diff --git a/models/entity.go b/models/entity.go index b312daebb1e..1a8279f3b29 100644 --- a/models/entity.go +++ b/models/entity.go @@ -2539,6 +2539,8 @@ func CreateEntityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487 return NewPlannerBucketTaskBoardTaskFormat(), nil case "#microsoft.graph.plannerDelta": return NewPlannerDelta(), nil + case "#microsoft.graph.plannerGoal": + return NewPlannerGoal(), nil case "#microsoft.graph.plannerGroup": return NewPlannerGroup(), nil case "#microsoft.graph.plannerHistoryItem": @@ -2787,6 +2789,8 @@ func CreateEntityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487 return NewRequest(), nil case "#microsoft.graph.resellerDelegatedAdminRelationship": return NewResellerDelegatedAdminRelationship(), nil + case "#microsoft.graph.resourceAccountKeyAuthenticationMethod": + return NewResourceAccountKeyAuthenticationMethod(), nil case "#microsoft.graph.resourceOperation": return NewResourceOperation(), nil case "#microsoft.graph.resourceSpecificPermissionGrant": diff --git a/models/external_sap_ac_connection_info.go b/models/external_sap_ac_connection_info.go index 4905483862f..16c8ea943a1 100644 --- a/models/external_sap_ac_connection_info.go +++ b/models/external_sap_ac_connection_info.go @@ -102,7 +102,7 @@ func (m *ExternalSapAcConnectionInfo) GetFieldDeserializers()(map[string]func(i8 } return res } -// GetKeyVaultName gets the keyVaultName property value. The keyVaultName property +// GetKeyVaultName gets the keyVaultName property value. The name of the Azure Key Vault that stores the credentials used for authentication. // returns a *string when successful func (m *ExternalSapAcConnectionInfo) GetKeyVaultName()(*string) { val, err := m.GetBackingStore().Get("keyVaultName") @@ -114,7 +114,7 @@ func (m *ExternalSapAcConnectionInfo) GetKeyVaultName()(*string) { } return nil } -// GetResourceGroup gets the resourceGroup property value. The resourceGroup property +// GetResourceGroup gets the resourceGroup property value. The Azure resource group that contains the Key Vault. // returns a *string when successful func (m *ExternalSapAcConnectionInfo) GetResourceGroup()(*string) { val, err := m.GetBackingStore().Get("resourceGroup") @@ -126,7 +126,7 @@ func (m *ExternalSapAcConnectionInfo) GetResourceGroup()(*string) { } return nil } -// GetSubscriptionId gets the subscriptionId property value. The subscriptionId property +// GetSubscriptionId gets the subscriptionId property value. The Azure subscription ID that contains the Key Vault. // returns a *string when successful func (m *ExternalSapAcConnectionInfo) GetSubscriptionId()(*string) { val, err := m.GetBackingStore().Get("subscriptionId") @@ -138,7 +138,7 @@ func (m *ExternalSapAcConnectionInfo) GetSubscriptionId()(*string) { } return nil } -// GetSystemId gets the systemId property value. The systemId property +// GetSystemId gets the systemId property value. The identifier of the target SAP AC system. // returns a *string when successful func (m *ExternalSapAcConnectionInfo) GetSystemId()(*string) { val, err := m.GetBackingStore().Get("systemId") @@ -150,7 +150,7 @@ func (m *ExternalSapAcConnectionInfo) GetSystemId()(*string) { } return nil } -// GetUserIdentifier gets the userIdentifier property value. The userIdentifier property +// GetUserIdentifier gets the userIdentifier property value. The user identifier used to connect to the SAP AC system. // returns a *string when successful func (m *ExternalSapAcConnectionInfo) GetUserIdentifier()(*string) { val, err := m.GetBackingStore().Get("userIdentifier") @@ -213,35 +213,35 @@ func (m *ExternalSapAcConnectionInfo) SetAuthenticationInfo(value Authentication panic(err) } } -// SetKeyVaultName sets the keyVaultName property value. The keyVaultName property +// SetKeyVaultName sets the keyVaultName property value. The name of the Azure Key Vault that stores the credentials used for authentication. func (m *ExternalSapAcConnectionInfo) SetKeyVaultName(value *string)() { err := m.GetBackingStore().Set("keyVaultName", value) if err != nil { panic(err) } } -// SetResourceGroup sets the resourceGroup property value. The resourceGroup property +// SetResourceGroup sets the resourceGroup property value. The Azure resource group that contains the Key Vault. func (m *ExternalSapAcConnectionInfo) SetResourceGroup(value *string)() { err := m.GetBackingStore().Set("resourceGroup", value) if err != nil { panic(err) } } -// SetSubscriptionId sets the subscriptionId property value. The subscriptionId property +// SetSubscriptionId sets the subscriptionId property value. The Azure subscription ID that contains the Key Vault. func (m *ExternalSapAcConnectionInfo) SetSubscriptionId(value *string)() { err := m.GetBackingStore().Set("subscriptionId", value) if err != nil { panic(err) } } -// SetSystemId sets the systemId property value. The systemId property +// SetSystemId sets the systemId property value. The identifier of the target SAP AC system. func (m *ExternalSapAcConnectionInfo) SetSystemId(value *string)() { err := m.GetBackingStore().Set("systemId", value) if err != nil { panic(err) } } -// SetUserIdentifier sets the userIdentifier property value. The userIdentifier property +// SetUserIdentifier sets the userIdentifier property value. The user identifier used to connect to the SAP AC system. func (m *ExternalSapAcConnectionInfo) SetUserIdentifier(value *string)() { err := m.GetBackingStore().Set("userIdentifier", value) if err != nil { diff --git a/models/file_storage_container_type_settings.go b/models/file_storage_container_type_settings.go index d5223f94d5e..67df622cd98 100644 --- a/models/file_storage_container_type_settings.go +++ b/models/file_storage_container_type_settings.go @@ -55,7 +55,7 @@ func (m *FileStorageContainerTypeSettings) GetAgent()(FileStorageContainerTypeAg func (m *FileStorageContainerTypeSettings) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { return m.backingStore } -// GetConsumingTenantOverridables gets the consumingTenantOverridables property value. A comma-separated list of settings that can be overridden in the consuming tenant. The possible values are: urlTemplate, isDiscoverabilityEnabled, isSearchEnabled, isItemVersioningEnabled, itemMajorVersionLimit, maxStoragePerContainerInBytes, unknownFutureValue. +// GetConsumingTenantOverridables gets the consumingTenantOverridables property value. A comma-separated list of settings that can be overridden in the consuming tenant. The possible values are: urlTemplate, isDiscoverabilityEnabled, isSearchEnabled, isItemVersioningEnabled, itemMajorVersionLimit, maxStoragePerContainerInBytes, unknownFutureValue, isOfficeRestricted. // returns a *FileStorageContainerTypeSettingsOverride when successful func (m *FileStorageContainerTypeSettings) GetConsumingTenantOverridables()(*FileStorageContainerTypeSettingsOverride) { val, err := m.GetBackingStore().Get("consumingTenantOverridables") @@ -387,7 +387,7 @@ func (m *FileStorageContainerTypeSettings) SetAgent(value FileStorageContainerTy func (m *FileStorageContainerTypeSettings) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { m.backingStore = value } -// SetConsumingTenantOverridables sets the consumingTenantOverridables property value. A comma-separated list of settings that can be overridden in the consuming tenant. The possible values are: urlTemplate, isDiscoverabilityEnabled, isSearchEnabled, isItemVersioningEnabled, itemMajorVersionLimit, maxStoragePerContainerInBytes, unknownFutureValue. +// SetConsumingTenantOverridables sets the consumingTenantOverridables property value. A comma-separated list of settings that can be overridden in the consuming tenant. The possible values are: urlTemplate, isDiscoverabilityEnabled, isSearchEnabled, isItemVersioningEnabled, itemMajorVersionLimit, maxStoragePerContainerInBytes, unknownFutureValue, isOfficeRestricted. func (m *FileStorageContainerTypeSettings) SetConsumingTenantOverridables(value *FileStorageContainerTypeSettingsOverride)() { err := m.GetBackingStore().Set("consumingTenantOverridables", value) if err != nil { diff --git a/models/identitygovernance/guest_sponsor_trigger.go b/models/identitygovernance/guest_sponsor_trigger.go index b32a4c2fb43..7684d1a2a4d 100644 --- a/models/identitygovernance/guest_sponsor_trigger.go +++ b/models/identitygovernance/guest_sponsor_trigger.go @@ -40,7 +40,7 @@ func (m *GuestSponsorTrigger) GetFieldDeserializers()(map[string]func(i878a80d23 } return res } -// GetMinimumRequiredSponsors gets the minimumRequiredSponsors property value. The minimumRequiredSponsors property +// GetMinimumRequiredSponsors gets the minimumRequiredSponsors property value. The minimum number of sponsors required for a guest user. When a guest has fewer sponsors than this value, the workflow is triggered. // returns a *int32 when successful func (m *GuestSponsorTrigger) GetMinimumRequiredSponsors()(*int32) { val, err := m.GetBackingStore().Get("minimumRequiredSponsors") @@ -66,7 +66,7 @@ func (m *GuestSponsorTrigger) Serialize(writer i878a80d2330e89d26896388a3f487eef } return nil } -// SetMinimumRequiredSponsors sets the minimumRequiredSponsors property value. The minimumRequiredSponsors property +// SetMinimumRequiredSponsors sets the minimumRequiredSponsors property value. The minimum number of sponsors required for a guest user. When a guest has fewer sponsors than this value, the workflow is triggered. func (m *GuestSponsorTrigger) SetMinimumRequiredSponsors(value *int32)() { err := m.GetBackingStore().Set("minimumRequiredSponsors", value) if err != nil { diff --git a/models/mailbox_folder.go b/models/mailbox_folder.go index fe44681a6a1..b1c9b33a6d5 100644 --- a/models/mailbox_folder.go +++ b/models/mailbox_folder.go @@ -186,6 +186,16 @@ func (m *MailboxFolder) GetFieldDeserializers()(map[string]func(i878a80d2330e89d } return nil } + res["wellKnownName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWellKnownName(val) + } + return nil + } return res } // GetItems gets the items property value. The collection of items in this folder. @@ -272,6 +282,18 @@ func (m *MailboxFolder) GetTypeEscaped()(*string) { } return nil } +// GetWellKnownName gets the wellKnownName property value. The locale-independent well-known name of the folder for folders created by Outlook, such as inbox, sentitems, drafts, deleteditems, or archive. For user-created folders, the value is null. Read-only. +// returns a *string when successful +func (m *MailboxFolder) GetWellKnownName()(*string) { + val, err := m.GetBackingStore().Get("wellKnownName") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} // Serialize serializes information the current object func (m *MailboxFolder) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { err := m.Entity.Serialize(writer) @@ -362,6 +384,12 @@ func (m *MailboxFolder) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0 return err } } + { + err = writer.WriteStringValue("wellKnownName", m.GetWellKnownName()) + if err != nil { + return err + } + } return nil } // SetChildFolderCount sets the childFolderCount property value. The number of immediate child folders in the current folder. @@ -434,6 +462,13 @@ func (m *MailboxFolder) SetTypeEscaped(value *string)() { panic(err) } } +// SetWellKnownName sets the wellKnownName property value. The locale-independent well-known name of the folder for folders created by Outlook, such as inbox, sentitems, drafts, deleteditems, or archive. For user-created folders, the value is null. Read-only. +func (m *MailboxFolder) SetWellKnownName(value *string)() { + err := m.GetBackingStore().Set("wellKnownName", value) + if err != nil { + panic(err) + } +} type MailboxFolderable interface { Entityable i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable @@ -447,6 +482,7 @@ type MailboxFolderable interface { GetSingleValueExtendedProperties()([]SingleValueLegacyExtendedPropertyable) GetTotalItemCount()(*int32) GetTypeEscaped()(*string) + GetWellKnownName()(*string) SetChildFolderCount(value *int32)() SetChildFolders(value []MailboxFolderable)() SetDisplayName(value *string)() @@ -457,4 +493,5 @@ type MailboxFolderable interface { SetSingleValueExtendedProperties(value []SingleValueLegacyExtendedPropertyable)() SetTotalItemCount(value *int32)() SetTypeEscaped(value *string)() + SetWellKnownName(value *string)() } diff --git a/models/media_metadata.go b/models/media_metadata.go index 640efb57e99..b0973ee21b4 100644 --- a/models/media_metadata.go +++ b/models/media_metadata.go @@ -38,7 +38,7 @@ func (m *MediaMetadata) GetAdditionalData()(map[string]any) { } return val.(map[string]any) } -// GetAudioMetadata gets the audioMetadata property value. The audioMetadata property +// GetAudioMetadata gets the audioMetadata property value. Audio-specific encoding details. Nullable. Set when the analyzed content is audio or multimodal. // returns a AudioMetadataable when successful func (m *MediaMetadata) GetAudioMetadata()(AudioMetadataable) { val, err := m.GetBackingStore().Get("audioMetadata") @@ -55,7 +55,7 @@ func (m *MediaMetadata) GetAudioMetadata()(AudioMetadataable) { func (m *MediaMetadata) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { return m.backingStore } -// GetByteSize gets the byteSize property value. The byteSize property +// GetByteSize gets the byteSize property value. Size of the content in bytes. Set this value to 0 for live streams where the total size is unknown; for recorded files, specify the actual size. // returns a *int64 when successful func (m *MediaMetadata) GetByteSize()(*int64) { val, err := m.GetBackingStore().Get("byteSize") @@ -67,7 +67,7 @@ func (m *MediaMetadata) GetByteSize()(*int64) { } return nil } -// GetDuration gets the duration property value. The duration property +// GetDuration gets the duration property value. Duration of the analyzed content in whole seconds. Sub-second or millisecond windows are rounded to the nearest second. For a continuous live stream, set this value to the length of the analysis window. // returns a *int32 when successful func (m *MediaMetadata) GetDuration()(*int32) { val, err := m.GetBackingStore().Get("duration") @@ -175,7 +175,7 @@ func (m *MediaMetadata) GetFieldDeserializers()(map[string]func(i878a80d2330e89d } return res } -// GetIsRealTime gets the isRealTime property value. The isRealTime property +// GetIsRealTime gets the isRealTime property value. Indicates whether the analysis was performed in real time on a live stream. // returns a *bool when successful func (m *MediaMetadata) GetIsRealTime()(*bool) { val, err := m.GetBackingStore().Get("isRealTime") @@ -187,7 +187,7 @@ func (m *MediaMetadata) GetIsRealTime()(*bool) { } return nil } -// GetMimeType gets the mimeType property value. The mimeType property +// GetMimeType gets the mimeType property value. MIME type of the analyzed content. Common values for Teams media include audio/pcm, video/mp4, and video/h264. // returns a *string when successful func (m *MediaMetadata) GetMimeType()(*string) { val, err := m.GetBackingStore().Get("mimeType") @@ -223,7 +223,7 @@ func (m *MediaMetadata) GetOdataType()(*string) { } return nil } -// GetStreamingMetadata gets the streamingMetadata property value. The streamingMetadata property +// GetStreamingMetadata gets the streamingMetadata property value. Network and real-time streaming quality metrics. Nullable. Set when the analyzed content was streamed in real time. // returns a StreamingMetadataable when successful func (m *MediaMetadata) GetStreamingMetadata()(StreamingMetadataable) { val, err := m.GetBackingStore().Get("streamingMetadata") @@ -235,7 +235,7 @@ func (m *MediaMetadata) GetStreamingMetadata()(StreamingMetadataable) { } return nil } -// GetVideoMetadata gets the videoMetadata property value. The videoMetadata property +// GetVideoMetadata gets the videoMetadata property value. Video-specific encoding and quality details. Nullable. Set when the analyzed content is video or multimodal. // returns a VideoMetadataable when successful func (m *MediaMetadata) GetVideoMetadata()(VideoMetadataable) { val, err := m.GetBackingStore().Get("videoMetadata") @@ -319,7 +319,7 @@ func (m *MediaMetadata) SetAdditionalData(value map[string]any)() { panic(err) } } -// SetAudioMetadata sets the audioMetadata property value. The audioMetadata property +// SetAudioMetadata sets the audioMetadata property value. Audio-specific encoding details. Nullable. Set when the analyzed content is audio or multimodal. func (m *MediaMetadata) SetAudioMetadata(value AudioMetadataable)() { err := m.GetBackingStore().Set("audioMetadata", value) if err != nil { @@ -330,28 +330,28 @@ func (m *MediaMetadata) SetAudioMetadata(value AudioMetadataable)() { func (m *MediaMetadata) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { m.backingStore = value } -// SetByteSize sets the byteSize property value. The byteSize property +// SetByteSize sets the byteSize property value. Size of the content in bytes. Set this value to 0 for live streams where the total size is unknown; for recorded files, specify the actual size. func (m *MediaMetadata) SetByteSize(value *int64)() { err := m.GetBackingStore().Set("byteSize", value) if err != nil { panic(err) } } -// SetDuration sets the duration property value. The duration property +// SetDuration sets the duration property value. Duration of the analyzed content in whole seconds. Sub-second or millisecond windows are rounded to the nearest second. For a continuous live stream, set this value to the length of the analysis window. func (m *MediaMetadata) SetDuration(value *int32)() { err := m.GetBackingStore().Set("duration", value) if err != nil { panic(err) } } -// SetIsRealTime sets the isRealTime property value. The isRealTime property +// SetIsRealTime sets the isRealTime property value. Indicates whether the analysis was performed in real time on a live stream. func (m *MediaMetadata) SetIsRealTime(value *bool)() { err := m.GetBackingStore().Set("isRealTime", value) if err != nil { panic(err) } } -// SetMimeType sets the mimeType property value. The mimeType property +// SetMimeType sets the mimeType property value. MIME type of the analyzed content. Common values for Teams media include audio/pcm, video/mp4, and video/h264. func (m *MediaMetadata) SetMimeType(value *string)() { err := m.GetBackingStore().Set("mimeType", value) if err != nil { @@ -372,14 +372,14 @@ func (m *MediaMetadata) SetOdataType(value *string)() { panic(err) } } -// SetStreamingMetadata sets the streamingMetadata property value. The streamingMetadata property +// SetStreamingMetadata sets the streamingMetadata property value. Network and real-time streaming quality metrics. Nullable. Set when the analyzed content was streamed in real time. func (m *MediaMetadata) SetStreamingMetadata(value StreamingMetadataable)() { err := m.GetBackingStore().Set("streamingMetadata", value) if err != nil { panic(err) } } -// SetVideoMetadata sets the videoMetadata property value. The videoMetadata property +// SetVideoMetadata sets the videoMetadata property value. Video-specific encoding and quality details. Nullable. Set when the analyzed content is video or multimodal. func (m *MediaMetadata) SetVideoMetadata(value VideoMetadataable)() { err := m.GetBackingStore().Set("videoMetadata", value) if err != nil { diff --git a/models/media_segment.go b/models/media_segment.go index 65b38b0dcca..36e9a4e9711 100644 --- a/models/media_segment.go +++ b/models/media_segment.go @@ -43,7 +43,7 @@ func (m *MediaSegment) GetAdditionalData()(map[string]any) { func (m *MediaSegment) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { return m.backingStore } -// GetEndTimeSec gets the endTimeSec property value. The endTimeSec property +// GetEndTimeSec gets the endTimeSec property value. End time of the segment, in seconds from the start of the analyzed live stream. Set to 0 for recorded or offline analysis, where a stream-relative time base doesn't apply. // returns a *int32 when successful func (m *MediaSegment) GetEndTimeSec()(*int32) { val, err := m.GetBackingStore().Get("endTimeSec") @@ -107,7 +107,7 @@ func (m *MediaSegment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d2 } return res } -// GetFrameIndices gets the frameIndices property value. The frameIndices property +// GetFrameIndices gets the frameIndices property value. Frame indices that identify the video frames in the segment. Applies only to video analysis; pass an empty array for audio-only segments. // returns a []int32 when successful func (m *MediaSegment) GetFrameIndices()([]int32) { val, err := m.GetBackingStore().Get("frameIndices") @@ -131,7 +131,7 @@ func (m *MediaSegment) GetOdataType()(*string) { } return nil } -// GetStartTimeSec gets the startTimeSec property value. The startTimeSec property +// GetStartTimeSec gets the startTimeSec property value. Start time of the segment, in seconds from the start of the analyzed live stream. Set to 0 for recorded or offline analysis, where a stream-relative time base doesn't apply. // returns a *int32 when successful func (m *MediaSegment) GetStartTimeSec()(*int32) { val, err := m.GetBackingStore().Get("startTimeSec") @@ -188,14 +188,14 @@ func (m *MediaSegment) SetAdditionalData(value map[string]any)() { func (m *MediaSegment) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { m.backingStore = value } -// SetEndTimeSec sets the endTimeSec property value. The endTimeSec property +// SetEndTimeSec sets the endTimeSec property value. End time of the segment, in seconds from the start of the analyzed live stream. Set to 0 for recorded or offline analysis, where a stream-relative time base doesn't apply. func (m *MediaSegment) SetEndTimeSec(value *int32)() { err := m.GetBackingStore().Set("endTimeSec", value) if err != nil { panic(err) } } -// SetFrameIndices sets the frameIndices property value. The frameIndices property +// SetFrameIndices sets the frameIndices property value. Frame indices that identify the video frames in the segment. Applies only to video analysis; pass an empty array for audio-only segments. func (m *MediaSegment) SetFrameIndices(value []int32)() { err := m.GetBackingStore().Set("frameIndices", value) if err != nil { @@ -209,7 +209,7 @@ func (m *MediaSegment) SetOdataType(value *string)() { panic(err) } } -// SetStartTimeSec sets the startTimeSec property value. The startTimeSec property +// SetStartTimeSec sets the startTimeSec property value. Start time of the segment, in seconds from the start of the analyzed live stream. Set to 0 for recorded or offline analysis, where a stream-relative time base doesn't apply. func (m *MediaSegment) SetStartTimeSec(value *int32)() { err := m.GetBackingStore().Set("startTimeSec", value) if err != nil { diff --git a/models/member.go b/models/member.go index 4664b5419d6..2590f43c77d 100644 --- a/models/member.go +++ b/models/member.go @@ -43,7 +43,7 @@ func (m *Member) GetAdditionalData()(map[string]any) { func (m *Member) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { return m.backingStore } -// GetContactId gets the contactId property value. The ID of the referenced contact, if applicable. Optional. +// GetContactId gets the contactId property value. The contactId property // returns a *string when successful func (m *Member) GetContactId()(*string) { val, err := m.GetBackingStore().Get("contactId") @@ -133,7 +133,7 @@ func (m *Member) GetFieldDeserializers()(map[string]func(i878a80d2330e89d2689638 } return res } -// GetKey gets the key property value. The email address or routing key of the member. Required. +// GetKey gets the key property value. The email address or routing key of the member. Optional. // returns a *string when successful func (m *Member) GetKey()(*string) { val, err := m.GetBackingStore().Get("key") @@ -169,7 +169,7 @@ func (m *Member) GetRecipientType()(*RecipientType) { } return nil } -// GetRoutingType gets the routingType property value. The routing type for the member, for example, SMTP. Optional. +// GetRoutingType gets the routingType property value. The routingType property // returns a *string when successful func (m *Member) GetRoutingType()(*string) { val, err := m.GetBackingStore().Get("routingType") @@ -239,7 +239,7 @@ func (m *Member) SetAdditionalData(value map[string]any)() { func (m *Member) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { m.backingStore = value } -// SetContactId sets the contactId property value. The ID of the referenced contact, if applicable. Optional. +// SetContactId sets the contactId property value. The contactId property func (m *Member) SetContactId(value *string)() { err := m.GetBackingStore().Set("contactId", value) if err != nil { @@ -253,7 +253,7 @@ func (m *Member) SetDisplayName(value *string)() { panic(err) } } -// SetKey sets the key property value. The email address or routing key of the member. Required. +// SetKey sets the key property value. The email address or routing key of the member. Optional. func (m *Member) SetKey(value *string)() { err := m.GetBackingStore().Set("key", value) if err != nil { @@ -274,7 +274,7 @@ func (m *Member) SetRecipientType(value *RecipientType)() { panic(err) } } -// SetRoutingType sets the routingType property value. The routing type for the member, for example, SMTP. Optional. +// SetRoutingType sets the routingType property value. The routingType property func (m *Member) SetRoutingType(value *string)() { err := m.GetBackingStore().Set("routingType", value) if err != nil { diff --git a/models/mobile_drivers_license_configuration.go b/models/mobile_drivers_license_configuration.go new file mode 100644 index 00000000000..1976ad02462 --- /dev/null +++ b/models/mobile_drivers_license_configuration.go @@ -0,0 +1,196 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +type MobileDriversLicenseConfiguration struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewMobileDriversLicenseConfiguration instantiates a new MobileDriversLicenseConfiguration and sets the default values. +func NewMobileDriversLicenseConfiguration()(*MobileDriversLicenseConfiguration) { + m := &MobileDriversLicenseConfiguration{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateMobileDriversLicenseConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateMobileDriversLicenseConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMobileDriversLicenseConfiguration(), nil +} +// GetAcceptedRegions gets the acceptedRegions property value. The ISO 3166-2 region codes accepted for mobile driver's licenses. An empty collection indicates all regions are accepted. +// returns a []string when successful +func (m *MobileDriversLicenseConfiguration) GetAcceptedRegions()([]string) { + val, err := m.GetBackingStore().Get("acceptedRegions") + if err != nil { + panic(err) + } + if val != nil { + return val.([]string) + } + return nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *MobileDriversLicenseConfiguration) GetAdditionalData()(map[string]any) { + val , err := m.backingStore.Get("additionalData") + if err != nil { + panic(err) + } + if val == nil { + var value = make(map[string]any); + m.SetAdditionalData(value); + } + return val.(map[string]any) +} +// GetBackingStore gets the BackingStore property value. Stores model information. +// returns a BackingStore when successful +func (m *MobileDriversLicenseConfiguration) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetDocumentStandard gets the documentStandard property value. The document standard that accepted mobile driver's licenses must use, such as ISO18013-5. +// returns a *string when successful +func (m *MobileDriversLicenseConfiguration) GetDocumentStandard()(*string) { + val, err := m.GetBackingStore().Get("documentStandard") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *MobileDriversLicenseConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["acceptedRegions"] = 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.SetAcceptedRegions(res) + } + return nil + } + res["documentStandard"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDocumentStandard(val) + } + return nil + } + res["@odata.type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOdataType(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +// returns a *string when successful +func (m *MobileDriversLicenseConfiguration) 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 *MobileDriversLicenseConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAcceptedRegions() != nil { + err := writer.WriteCollectionOfStringValues("acceptedRegions", m.GetAcceptedRegions()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("documentStandard", m.GetDocumentStandard()) + 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 +} +// SetAcceptedRegions sets the acceptedRegions property value. The ISO 3166-2 region codes accepted for mobile driver's licenses. An empty collection indicates all regions are accepted. +func (m *MobileDriversLicenseConfiguration) SetAcceptedRegions(value []string)() { + err := m.GetBackingStore().Set("acceptedRegions", 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 *MobileDriversLicenseConfiguration) 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 *MobileDriversLicenseConfiguration) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetDocumentStandard sets the documentStandard property value. The document standard that accepted mobile driver's licenses must use, such as ISO18013-5. +func (m *MobileDriversLicenseConfiguration) SetDocumentStandard(value *string)() { + err := m.GetBackingStore().Set("documentStandard", value) + if err != nil { + panic(err) + } +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MobileDriversLicenseConfiguration) SetOdataType(value *string)() { + err := m.GetBackingStore().Set("odataType", value) + if err != nil { + panic(err) + } +} +type MobileDriversLicenseConfigurationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAcceptedRegions()([]string) + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetDocumentStandard()(*string) + GetOdataType()(*string) + SetAcceptedRegions(value []string)() + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetDocumentStandard(value *string)() + SetOdataType(value *string)() +} diff --git a/models/participant.go b/models/participant.go index 991467ea303..770e3a7c1eb 100644 --- a/models/participant.go +++ b/models/participant.go @@ -286,7 +286,7 @@ func (m *Participant) GetRosterSequenceNumber()(*int64) { } return nil } -// GetSyntheticMediaDetection gets the syntheticMediaDetection property value. The syntheticMediaDetection property +// GetSyntheticMediaDetection gets the syntheticMediaDetection property value. The latest synthetic media detection result reported for this participant by an in-call detection bot. Nullable. Set to null when no detection is reported. Populated asynchronously after a successful call to reportSyntheticMedia. // returns a SyntheticMediaDetectionInfoable when successful func (m *Participant) GetSyntheticMediaDetection()(SyntheticMediaDetectionInfoable) { val, err := m.GetBackingStore().Get("syntheticMediaDetection") @@ -461,7 +461,7 @@ func (m *Participant) SetRosterSequenceNumber(value *int64)() { panic(err) } } -// SetSyntheticMediaDetection sets the syntheticMediaDetection property value. The syntheticMediaDetection property +// SetSyntheticMediaDetection sets the syntheticMediaDetection property value. The latest synthetic media detection result reported for this participant by an in-call detection bot. Nullable. Set to null when no detection is reported. Populated asynchronously after a successful call to reportSyntheticMedia. func (m *Participant) SetSyntheticMediaDetection(value SyntheticMediaDetectionInfoable)() { err := m.GetBackingStore().Set("syntheticMediaDetection", value) if err != nil { diff --git a/models/planner.go b/models/planner.go index 3b0ca2f70f8..960bfd078ac 100644 --- a/models/planner.go +++ b/models/planner.go @@ -54,6 +54,22 @@ func (m *Planner) GetFieldDeserializers()(map[string]func(i878a80d2330e89d268963 } return nil } + res["goals"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePlannerGoalFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PlannerGoalable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(PlannerGoalable) + } + } + m.SetGoals(res) + } + return nil + } res["plans"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetCollectionOfObjectValues(CreatePlannerPlanFromDiscriminatorValue) if err != nil { @@ -104,6 +120,18 @@ func (m *Planner) GetFieldDeserializers()(map[string]func(i878a80d2330e89d268963 } return res } +// GetGoals gets the goals property value. Read-only. Nullable. Returns a collection of the specified goals +// returns a []PlannerGoalable when successful +func (m *Planner) GetGoals()([]PlannerGoalable) { + val, err := m.GetBackingStore().Get("goals") + if err != nil { + panic(err) + } + if val != nil { + return val.([]PlannerGoalable) + } + return nil +} // GetPlans gets the plans property value. Read-only. Nullable. Returns a collection of the specified plans // returns a []PlannerPlanable when successful func (m *Planner) GetPlans()([]PlannerPlanable) { @@ -158,6 +186,18 @@ func (m *Planner) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010 return err } } + if m.GetGoals() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetGoals())) + for i, v := range m.GetGoals() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err = writer.WriteCollectionOfObjectValues("goals", cast) + if err != nil { + return err + } + } if m.GetPlans() != nil { cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPlans())) for i, v := range m.GetPlans() { @@ -203,6 +243,13 @@ func (m *Planner) SetBuckets(value []PlannerBucketable)() { panic(err) } } +// SetGoals sets the goals property value. Read-only. Nullable. Returns a collection of the specified goals +func (m *Planner) SetGoals(value []PlannerGoalable)() { + err := m.GetBackingStore().Set("goals", value) + if err != nil { + panic(err) + } +} // SetPlans sets the plans property value. Read-only. Nullable. Returns a collection of the specified plans func (m *Planner) SetPlans(value []PlannerPlanable)() { err := m.GetBackingStore().Set("plans", value) @@ -228,10 +275,12 @@ type Plannerable interface { Entityable i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetBuckets()([]PlannerBucketable) + GetGoals()([]PlannerGoalable) GetPlans()([]PlannerPlanable) GetRosters()([]PlannerRosterable) GetTasks()([]PlannerTaskable) SetBuckets(value []PlannerBucketable)() + SetGoals(value []PlannerGoalable)() SetPlans(value []PlannerPlanable)() SetRosters(value []PlannerRosterable)() SetTasks(value []PlannerTaskable)() diff --git a/models/planner_delta.go b/models/planner_delta.go index 64a10601ead..f9ca19fb41a 100644 --- a/models/planner_delta.go +++ b/models/planner_delta.go @@ -40,6 +40,8 @@ func CreatePlannerDeltaFromDiscriminatorValue(parseNode i878a80d2330e89d26896388 return NewPlannerBucket(), nil case "#microsoft.graph.plannerBucketTaskBoardTaskFormat": return NewPlannerBucketTaskBoardTaskFormat(), nil + case "#microsoft.graph.plannerGoal": + return NewPlannerGoal(), nil case "#microsoft.graph.plannerHistoryItem": return NewPlannerHistoryItem(), nil case "#microsoft.graph.plannerPlan": diff --git a/models/planner_goal.go b/models/planner_goal.go new file mode 100644 index 00000000000..613b1988161 --- /dev/null +++ b/models/planner_goal.go @@ -0,0 +1,351 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type PlannerGoal struct { + PlannerDelta +} +// NewPlannerGoal instantiates a new PlannerGoal and sets the default values. +func NewPlannerGoal()(*PlannerGoal) { + m := &PlannerGoal{ + PlannerDelta: *NewPlannerDelta(), + } + return m +} +// CreatePlannerGoalFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePlannerGoalFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerGoal(), nil +} +// GetDisplayName gets the displayName property value. Required. The display name of the goal. +// returns a *string when successful +func (m *PlannerGoal) GetDisplayName()(*string) { + val, err := m.GetBackingStore().Get("displayName") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PlannerGoal) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.PlannerDelta.GetFieldDeserializers() + 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["finishDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetFinishDate(val) + } + return nil + } + res["notes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemBodyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetNotes(val.(ItemBodyable)) + } + return nil + } + res["planId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPlanId(val) + } + return nil + } + res["priority"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPriority(val) + } + return nil + } + res["startDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetStartDate(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePlannerGoalStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*PlannerGoalStatus)) + } + return nil + } + res["tasks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePlannerTaskFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PlannerTaskable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(PlannerTaskable) + } + } + m.SetTasks(res) + } + return nil + } + return res +} +// GetFinishDate gets the finishDate property value. Nullable. The date on which the goal is scheduled to finish. +// returns a *DateOnly when successful +func (m *PlannerGoal) GetFinishDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + val, err := m.GetBackingStore().Get("finishDate") + if err != nil { + panic(err) + } + if val != nil { + return val.(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + } + return nil +} +// GetNotes gets the notes property value. Nullable. The notes associated with the goal. +// returns a ItemBodyable when successful +func (m *PlannerGoal) GetNotes()(ItemBodyable) { + val, err := m.GetBackingStore().Get("notes") + if err != nil { + panic(err) + } + if val != nil { + return val.(ItemBodyable) + } + return nil +} +// GetPlanId gets the planId property value. Required. The ID of the plan that contains the goal. +// returns a *string when successful +func (m *PlannerGoal) GetPlanId()(*string) { + val, err := m.GetBackingStore().Get("planId") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetPriority gets the priority property value. Optional. The relative priority of the goal. Valid values range from 0 to 10, inclusive. The default value is 5. +// returns a *int32 when successful +func (m *PlannerGoal) GetPriority()(*int32) { + val, err := m.GetBackingStore().Get("priority") + if err != nil { + panic(err) + } + if val != nil { + return val.(*int32) + } + return nil +} +// GetStartDate gets the startDate property value. Nullable. The date on which the goal is scheduled to start. +// returns a *DateOnly when successful +func (m *PlannerGoal) GetStartDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + val, err := m.GetBackingStore().Get("startDate") + if err != nil { + panic(err) + } + if val != nil { + return val.(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + } + return nil +} +// GetStatus gets the status property value. The status property +// returns a *PlannerGoalStatus when successful +func (m *PlannerGoal) GetStatus()(*PlannerGoalStatus) { + val, err := m.GetBackingStore().Get("status") + if err != nil { + panic(err) + } + if val != nil { + return val.(*PlannerGoalStatus) + } + return nil +} +// GetTasks gets the tasks property value. Read-only. Nullable. The tasks associated with the goal. This relationship doesn't support direct retrieval or $expand. To identify the goals associated with a task, read the goalIds property of the plannerTask resource. +// returns a []PlannerTaskable when successful +func (m *PlannerGoal) GetTasks()([]PlannerTaskable) { + val, err := m.GetBackingStore().Get("tasks") + if err != nil { + panic(err) + } + if val != nil { + return val.([]PlannerTaskable) + } + return nil +} +// Serialize serializes information the current object +func (m *PlannerGoal) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.PlannerDelta.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("finishDate", m.GetFinishDate()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("notes", m.GetNotes()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("planId", m.GetPlanId()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("priority", m.GetPriority()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("startDate", m.GetStartDate()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + if m.GetTasks() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTasks())) + for i, v := range m.GetTasks() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err = writer.WriteCollectionOfObjectValues("tasks", cast) + if err != nil { + return err + } + } + return nil +} +// SetDisplayName sets the displayName property value. Required. The display name of the goal. +func (m *PlannerGoal) SetDisplayName(value *string)() { + err := m.GetBackingStore().Set("displayName", value) + if err != nil { + panic(err) + } +} +// SetFinishDate sets the finishDate property value. Nullable. The date on which the goal is scheduled to finish. +func (m *PlannerGoal) SetFinishDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + err := m.GetBackingStore().Set("finishDate", value) + if err != nil { + panic(err) + } +} +// SetNotes sets the notes property value. Nullable. The notes associated with the goal. +func (m *PlannerGoal) SetNotes(value ItemBodyable)() { + err := m.GetBackingStore().Set("notes", value) + if err != nil { + panic(err) + } +} +// SetPlanId sets the planId property value. Required. The ID of the plan that contains the goal. +func (m *PlannerGoal) SetPlanId(value *string)() { + err := m.GetBackingStore().Set("planId", value) + if err != nil { + panic(err) + } +} +// SetPriority sets the priority property value. Optional. The relative priority of the goal. Valid values range from 0 to 10, inclusive. The default value is 5. +func (m *PlannerGoal) SetPriority(value *int32)() { + err := m.GetBackingStore().Set("priority", value) + if err != nil { + panic(err) + } +} +// SetStartDate sets the startDate property value. Nullable. The date on which the goal is scheduled to start. +func (m *PlannerGoal) SetStartDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + err := m.GetBackingStore().Set("startDate", value) + if err != nil { + panic(err) + } +} +// SetStatus sets the status property value. The status property +func (m *PlannerGoal) SetStatus(value *PlannerGoalStatus)() { + err := m.GetBackingStore().Set("status", value) + if err != nil { + panic(err) + } +} +// SetTasks sets the tasks property value. Read-only. Nullable. The tasks associated with the goal. This relationship doesn't support direct retrieval or $expand. To identify the goals associated with a task, read the goalIds property of the plannerTask resource. +func (m *PlannerGoal) SetTasks(value []PlannerTaskable)() { + err := m.GetBackingStore().Set("tasks", value) + if err != nil { + panic(err) + } +} +type PlannerGoalable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + PlannerDeltaable + GetDisplayName()(*string) + GetFinishDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetNotes()(ItemBodyable) + GetPlanId()(*string) + GetPriority()(*int32) + GetStartDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetStatus()(*PlannerGoalStatus) + GetTasks()([]PlannerTaskable) + SetDisplayName(value *string)() + SetFinishDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetNotes(value ItemBodyable)() + SetPlanId(value *string)() + SetPriority(value *int32)() + SetStartDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetStatus(value *PlannerGoalStatus)() + SetTasks(value []PlannerTaskable)() +} diff --git a/models/planner_goal_collection_response.go b/models/planner_goal_collection_response.go new file mode 100644 index 00000000000..549ede1d9de --- /dev/null +++ b/models/planner_goal_collection_response.go @@ -0,0 +1,91 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type PlannerGoalCollectionResponse struct { + BaseCollectionPaginationCountResponse +} +// NewPlannerGoalCollectionResponse instantiates a new PlannerGoalCollectionResponse and sets the default values. +func NewPlannerGoalCollectionResponse()(*PlannerGoalCollectionResponse) { + m := &PlannerGoalCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePlannerGoalCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreatePlannerGoalCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerGoalCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *PlannerGoalCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePlannerGoalFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PlannerGoalable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(PlannerGoalable) + } + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +// returns a []PlannerGoalable when successful +func (m *PlannerGoalCollectionResponse) GetValue()([]PlannerGoalable) { + val, err := m.GetBackingStore().Get("value") + if err != nil { + panic(err) + } + if val != nil { + return val.([]PlannerGoalable) + } + return nil +} +// Serialize serializes information the current object +func (m *PlannerGoalCollectionResponse) 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 *PlannerGoalCollectionResponse) SetValue(value []PlannerGoalable)() { + err := m.GetBackingStore().Set("value", value) + if err != nil { + panic(err) + } +} +type PlannerGoalCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PlannerGoalable) + SetValue(value []PlannerGoalable)() +} diff --git a/models/planner_goal_status.go b/models/planner_goal_status.go new file mode 100644 index 00000000000..3bb8bf82e7a --- /dev/null +++ b/models/planner_goal_status.go @@ -0,0 +1,48 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models +type PlannerGoalStatus int + +const ( + NOTSTARTED_PLANNERGOALSTATUS PlannerGoalStatus = iota + ONTRACK_PLANNERGOALSTATUS + BEHIND_PLANNERGOALSTATUS + ATRISK_PLANNERGOALSTATUS + CLOSED_PLANNERGOALSTATUS + UNKNOWNFUTUREVALUE_PLANNERGOALSTATUS +) + +func (i PlannerGoalStatus) String() string { + return []string{"notStarted", "onTrack", "behind", "atRisk", "closed", "unknownFutureValue"}[i] +} +func ParsePlannerGoalStatus(v string) (any, error) { + result := NOTSTARTED_PLANNERGOALSTATUS + switch v { + case "notStarted": + result = NOTSTARTED_PLANNERGOALSTATUS + case "onTrack": + result = ONTRACK_PLANNERGOALSTATUS + case "behind": + result = BEHIND_PLANNERGOALSTATUS + case "atRisk": + result = ATRISK_PLANNERGOALSTATUS + case "closed": + result = CLOSED_PLANNERGOALSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_PLANNERGOALSTATUS + default: + return nil, nil + } + return &result, nil +} +func SerializePlannerGoalStatus(values []PlannerGoalStatus) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i PlannerGoalStatus) isMultiValue() bool { + return false +} diff --git a/models/planner_plan.go b/models/planner_plan.go index f1e40e6dacf..822c432aee8 100644 --- a/models/planner_plan.go +++ b/models/planner_plan.go @@ -231,6 +231,22 @@ func (m *PlannerPlan) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26 } return nil } + res["goals"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePlannerGoalFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PlannerGoalable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(PlannerGoalable) + } + } + m.SetGoals(res) + } + return nil + } res["historyItems"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetCollectionOfObjectValues(CreatePlannerHistoryItemFromDiscriminatorValue) if err != nil { @@ -311,6 +327,18 @@ func (m *PlannerPlan) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26 } return res } +// GetGoals gets the goals property value. Collection of goals in the plan. Read-only. Nullable. +// returns a []PlannerGoalable when successful +func (m *PlannerPlan) GetGoals()([]PlannerGoalable) { + val, err := m.GetBackingStore().Get("goals") + if err != nil { + panic(err) + } + if val != nil { + return val.([]PlannerGoalable) + } + return nil +} // GetHistoryItems gets the historyItems property value. Collection of history items for entities in the plan. Read-only. Nullable. // returns a []PlannerHistoryItemable when successful func (m *PlannerPlan) GetHistoryItems()([]PlannerHistoryItemable) { @@ -449,6 +477,18 @@ func (m *PlannerPlan) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6 return err } } + if m.GetGoals() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetGoals())) + for i, v := range m.GetGoals() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err = writer.WriteCollectionOfObjectValues("goals", cast) + if err != nil { + return err + } + } if m.GetHistoryItems() != nil { cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetHistoryItems())) for i, v := range m.GetHistoryItems() { @@ -568,6 +608,13 @@ func (m *PlannerPlan) SetDetails(value PlannerPlanDetailsable)() { panic(err) } } +// SetGoals sets the goals property value. Collection of goals in the plan. Read-only. Nullable. +func (m *PlannerPlan) SetGoals(value []PlannerGoalable)() { + err := m.GetBackingStore().Set("goals", value) + if err != nil { + panic(err) + } +} // SetHistoryItems sets the historyItems property value. Collection of history items for entities in the plan. Read-only. Nullable. func (m *PlannerPlan) SetHistoryItems(value []PlannerHistoryItemable)() { err := m.GetBackingStore().Set("historyItems", value) @@ -622,6 +669,7 @@ type PlannerPlanable interface { GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) GetCreationSource()(PlannerPlanCreationable) GetDetails()(PlannerPlanDetailsable) + GetGoals()([]PlannerGoalable) GetHistoryItems()([]PlannerHistoryItemable) GetIsArchived()(*bool) GetOwner()(*string) @@ -637,6 +685,7 @@ type PlannerPlanable interface { SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() SetCreationSource(value PlannerPlanCreationable)() SetDetails(value PlannerPlanDetailsable)() + SetGoals(value []PlannerGoalable)() SetHistoryItems(value []PlannerHistoryItemable)() SetIsArchived(value *bool)() SetOwner(value *string)() diff --git a/models/planner_task.go b/models/planner_task.go index 660ff405c23..7ef2f7ee547 100644 --- a/models/planner_task.go +++ b/models/planner_task.go @@ -419,6 +419,22 @@ func (m *PlannerTask) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26 } return nil } + res["goalIds"] = 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.SetGoalIds(res) + } + return nil + } res["hasChat"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetBoolValue() if err != nil { @@ -617,6 +633,18 @@ func (m *PlannerTask) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26 } return res } +// GetGoalIds gets the goalIds property value. Read-only. The IDs of the goals associated with the task. +// returns a []string when successful +func (m *PlannerTask) GetGoalIds()([]string) { + val, err := m.GetBackingStore().Get("goalIds") + if err != nil { + panic(err) + } + if val != nil { + return val.([]string) + } + return nil +} // GetHasChat gets the hasChat property value. Read-only. This value is true if the task has chat messages associated with it. Otherwise, false. // returns a *bool when successful func (m *PlannerTask) GetHasChat()(*bool) { @@ -953,6 +981,12 @@ func (m *PlannerTask) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6 return err } } + if m.GetGoalIds() != nil { + err = writer.WriteCollectionOfStringValues("goalIds", m.GetGoalIds()) + if err != nil { + return err + } + } { err = writer.WriteBoolValue("hasChat", m.GetHasChat()) if err != nil { @@ -1196,6 +1230,13 @@ func (m *PlannerTask) SetDueDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f panic(err) } } +// SetGoalIds sets the goalIds property value. Read-only. The IDs of the goals associated with the task. +func (m *PlannerTask) SetGoalIds(value []string)() { + err := m.GetBackingStore().Set("goalIds", value) + if err != nil { + panic(err) + } +} // SetHasChat sets the hasChat property value. Read-only. This value is true if the task has chat messages associated with it. Otherwise, false. func (m *PlannerTask) SetHasChat(value *bool)() { err := m.GetBackingStore().Set("hasChat", value) @@ -1349,6 +1390,7 @@ type PlannerTaskable interface { GetCreationSource()(PlannerTaskCreationable) GetDetails()(PlannerTaskDetailsable) GetDueDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetGoalIds()([]string) GetHasChat()(*bool) GetHasDescription()(*bool) GetIsArchived()(*bool) @@ -1385,6 +1427,7 @@ type PlannerTaskable interface { SetCreationSource(value PlannerTaskCreationable)() SetDetails(value PlannerTaskDetailsable)() SetDueDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetGoalIds(value []string)() SetHasChat(value *bool)() SetHasDescription(value *bool)() SetIsArchived(value *bool)() diff --git a/models/resource_account_key_authentication_method.go b/models/resource_account_key_authentication_method.go new file mode 100644 index 00000000000..7fb7dbcf188 --- /dev/null +++ b/models/resource_account_key_authentication_method.go @@ -0,0 +1,118 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ResourceAccountKeyAuthenticationMethod struct { + AuthenticationMethod +} +// NewResourceAccountKeyAuthenticationMethod instantiates a new ResourceAccountKeyAuthenticationMethod and sets the default values. +func NewResourceAccountKeyAuthenticationMethod()(*ResourceAccountKeyAuthenticationMethod) { + m := &ResourceAccountKeyAuthenticationMethod{ + AuthenticationMethod: *NewAuthenticationMethod(), + } + odataTypeValue := "#microsoft.graph.resourceAccountKeyAuthenticationMethod" + m.SetOdataType(&odataTypeValue) + return m +} +// CreateResourceAccountKeyAuthenticationMethodFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateResourceAccountKeyAuthenticationMethodFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewResourceAccountKeyAuthenticationMethod(), nil +} +// GetDevice gets the device property value. The registered device on which this resource account key resides. Supports $expand. +// returns a Deviceable when successful +func (m *ResourceAccountKeyAuthenticationMethod) GetDevice()(Deviceable) { + val, err := m.GetBackingStore().Get("device") + if err != nil { + panic(err) + } + if val != nil { + return val.(Deviceable) + } + return nil +} +// GetDisplayName gets the displayName property value. The display name of the resource account key credential as shown in the Teams Room interface. +// returns a *string when successful +func (m *ResourceAccountKeyAuthenticationMethod) GetDisplayName()(*string) { + val, err := m.GetBackingStore().Get("displayName") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ResourceAccountKeyAuthenticationMethod) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AuthenticationMethod.GetFieldDeserializers() + res["device"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDevice(val.(Deviceable)) + } + 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 + } + return res +} +// Serialize serializes information the current object +func (m *ResourceAccountKeyAuthenticationMethod) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AuthenticationMethod.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("device", m.GetDevice()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + return nil +} +// SetDevice sets the device property value. The registered device on which this resource account key resides. Supports $expand. +func (m *ResourceAccountKeyAuthenticationMethod) SetDevice(value Deviceable)() { + err := m.GetBackingStore().Set("device", value) + if err != nil { + panic(err) + } +} +// SetDisplayName sets the displayName property value. The display name of the resource account key credential as shown in the Teams Room interface. +func (m *ResourceAccountKeyAuthenticationMethod) SetDisplayName(value *string)() { + err := m.GetBackingStore().Set("displayName", value) + if err != nil { + panic(err) + } +} +type ResourceAccountKeyAuthenticationMethodable interface { + AuthenticationMethodable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDevice()(Deviceable) + GetDisplayName()(*string) + SetDevice(value Deviceable)() + SetDisplayName(value *string)() +} diff --git a/models/resource_account_key_authentication_method_collection_response.go b/models/resource_account_key_authentication_method_collection_response.go new file mode 100644 index 00000000000..7e998b10cbc --- /dev/null +++ b/models/resource_account_key_authentication_method_collection_response.go @@ -0,0 +1,91 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ResourceAccountKeyAuthenticationMethodCollectionResponse struct { + BaseCollectionPaginationCountResponse +} +// NewResourceAccountKeyAuthenticationMethodCollectionResponse instantiates a new ResourceAccountKeyAuthenticationMethodCollectionResponse and sets the default values. +func NewResourceAccountKeyAuthenticationMethodCollectionResponse()(*ResourceAccountKeyAuthenticationMethodCollectionResponse) { + m := &ResourceAccountKeyAuthenticationMethodCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateResourceAccountKeyAuthenticationMethodCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateResourceAccountKeyAuthenticationMethodCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewResourceAccountKeyAuthenticationMethodCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ResourceAccountKeyAuthenticationMethodCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateResourceAccountKeyAuthenticationMethodFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ResourceAccountKeyAuthenticationMethodable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ResourceAccountKeyAuthenticationMethodable) + } + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +// returns a []ResourceAccountKeyAuthenticationMethodable when successful +func (m *ResourceAccountKeyAuthenticationMethodCollectionResponse) GetValue()([]ResourceAccountKeyAuthenticationMethodable) { + val, err := m.GetBackingStore().Get("value") + if err != nil { + panic(err) + } + if val != nil { + return val.([]ResourceAccountKeyAuthenticationMethodable) + } + return nil +} +// Serialize serializes information the current object +func (m *ResourceAccountKeyAuthenticationMethodCollectionResponse) 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 *ResourceAccountKeyAuthenticationMethodCollectionResponse) SetValue(value []ResourceAccountKeyAuthenticationMethodable)() { + err := m.GetBackingStore().Set("value", value) + if err != nil { + panic(err) + } +} +type ResourceAccountKeyAuthenticationMethodCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ResourceAccountKeyAuthenticationMethodable) + SetValue(value []ResourceAccountKeyAuthenticationMethodable)() +} diff --git a/models/streaming_metadata.go b/models/streaming_metadata.go index 97592e3093e..65cd820a060 100644 --- a/models/streaming_metadata.go +++ b/models/streaming_metadata.go @@ -89,7 +89,7 @@ func (m *StreamingMetadata) GetFieldDeserializers()(map[string]func(i878a80d2330 } return res } -// GetFrameDropRate gets the frameDropRate property value. The frameDropRate property +// GetFrameDropRate gets the frameDropRate property value. Percentage of frames dropped during streaming, expressed as a value between 0.0 and 1.0. // returns a *float64 when successful func (m *StreamingMetadata) GetFrameDropRate()(*float64) { val, err := m.GetBackingStore().Get("frameDropRate") @@ -101,7 +101,7 @@ func (m *StreamingMetadata) GetFrameDropRate()(*float64) { } return nil } -// GetLatencyMs gets the latencyMs property value. The latencyMs property +// GetLatencyMs gets the latencyMs property value. Network latency in milliseconds. // returns a *int32 when successful func (m *StreamingMetadata) GetLatencyMs()(*int32) { val, err := m.GetBackingStore().Get("latencyMs") @@ -113,7 +113,7 @@ func (m *StreamingMetadata) GetLatencyMs()(*int32) { } return nil } -// GetNetworkJitterMs gets the networkJitterMs property value. The networkJitterMs property +// GetNetworkJitterMs gets the networkJitterMs property value. Network jitter in milliseconds. // returns a *int32 when successful func (m *StreamingMetadata) GetNetworkJitterMs()(*int32) { val, err := m.GetBackingStore().Get("networkJitterMs") @@ -182,21 +182,21 @@ func (m *StreamingMetadata) SetAdditionalData(value map[string]any)() { func (m *StreamingMetadata) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { m.backingStore = value } -// SetFrameDropRate sets the frameDropRate property value. The frameDropRate property +// SetFrameDropRate sets the frameDropRate property value. Percentage of frames dropped during streaming, expressed as a value between 0.0 and 1.0. func (m *StreamingMetadata) SetFrameDropRate(value *float64)() { err := m.GetBackingStore().Set("frameDropRate", value) if err != nil { panic(err) } } -// SetLatencyMs sets the latencyMs property value. The latencyMs property +// SetLatencyMs sets the latencyMs property value. Network latency in milliseconds. func (m *StreamingMetadata) SetLatencyMs(value *int32)() { err := m.GetBackingStore().Set("latencyMs", value) if err != nil { panic(err) } } -// SetNetworkJitterMs sets the networkJitterMs property value. The networkJitterMs property +// SetNetworkJitterMs sets the networkJitterMs property value. Network jitter in milliseconds. func (m *StreamingMetadata) SetNetworkJitterMs(value *int32)() { err := m.GetBackingStore().Set("networkJitterMs", value) if err != nil { diff --git a/models/synthetic_media_detection_detail.go b/models/synthetic_media_detection_detail.go index c5d5c79c0ed..892c07b0b64 100644 --- a/models/synthetic_media_detection_detail.go +++ b/models/synthetic_media_detection_detail.go @@ -43,7 +43,7 @@ func (m *SyntheticMediaDetectionDetail) GetAdditionalData()(map[string]any) { func (m *SyntheticMediaDetectionDetail) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { return m.backingStore } -// GetConfidence gets the confidence property value. The confidence property +// GetConfidence gets the confidence property value. Confidence score for this specific detection, expressed as a value between 0.0 and 1.0. // returns a *float64 when successful func (m *SyntheticMediaDetectionDetail) GetConfidence()(*float64) { val, err := m.GetBackingStore().Get("confidence") @@ -139,7 +139,7 @@ func (m *SyntheticMediaDetectionDetail) GetModality()(*ContentModality) { } return nil } -// GetModelName gets the modelName property value. The modelName property +// GetModelName gets the modelName property value. Name of the detection model used (for example, DeepfakeDetector-v2, VoiceAuthenticator-v1). // returns a *string when successful func (m *SyntheticMediaDetectionDetail) GetModelName()(*string) { val, err := m.GetBackingStore().Get("modelName") @@ -151,7 +151,7 @@ func (m *SyntheticMediaDetectionDetail) GetModelName()(*string) { } return nil } -// GetModelTasks gets the modelTasks property value. The modelTasks property +// GetModelTasks gets the modelTasks property value. Detection tasks that the model performed. This value is free-form text. The bot can specify any task names that describe its analysis. Common examples include faceSwap, lipSync, and voiceClone. // returns a []string when successful func (m *SyntheticMediaDetectionDetail) GetModelTasks()([]string) { val, err := m.GetBackingStore().Get("modelTasks") @@ -245,7 +245,7 @@ func (m *SyntheticMediaDetectionDetail) SetAdditionalData(value map[string]any)( func (m *SyntheticMediaDetectionDetail) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { m.backingStore = value } -// SetConfidence sets the confidence property value. The confidence property +// SetConfidence sets the confidence property value. Confidence score for this specific detection, expressed as a value between 0.0 and 1.0. func (m *SyntheticMediaDetectionDetail) SetConfidence(value *float64)() { err := m.GetBackingStore().Set("confidence", value) if err != nil { @@ -259,14 +259,14 @@ func (m *SyntheticMediaDetectionDetail) SetModality(value *ContentModality)() { panic(err) } } -// SetModelName sets the modelName property value. The modelName property +// SetModelName sets the modelName property value. Name of the detection model used (for example, DeepfakeDetector-v2, VoiceAuthenticator-v1). func (m *SyntheticMediaDetectionDetail) SetModelName(value *string)() { err := m.GetBackingStore().Set("modelName", value) if err != nil { panic(err) } } -// SetModelTasks sets the modelTasks property value. The modelTasks property +// SetModelTasks sets the modelTasks property value. Detection tasks that the model performed. This value is free-form text. The bot can specify any task names that describe its analysis. Common examples include faceSwap, lipSync, and voiceClone. func (m *SyntheticMediaDetectionDetail) SetModelTasks(value []string)() { err := m.GetBackingStore().Set("modelTasks", value) if err != nil { diff --git a/models/synthetic_media_detection_info.go b/models/synthetic_media_detection_info.go index 16977ec4fc5..9f7dbb8df5c 100644 --- a/models/synthetic_media_detection_info.go +++ b/models/synthetic_media_detection_info.go @@ -44,7 +44,7 @@ func (m *SyntheticMediaDetectionInfo) GetAdditionalData()(map[string]any) { func (m *SyntheticMediaDetectionInfo) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { return m.backingStore } -// GetDetectionId gets the detectionId property value. The detectionId property +// GetDetectionId gets the detectionId property value. Unique identifier for the detection event. This property correlates with the id parameter that the detection bot passed to reportSyntheticMedia. // returns a *UUID when successful func (m *SyntheticMediaDetectionInfo) GetDetectionId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { val, err := m.GetBackingStore().Get("detectionId") @@ -56,7 +56,7 @@ func (m *SyntheticMediaDetectionInfo) GetDetectionId()(*i561e97a8befe7661a44c8f5 } return nil } -// GetDetectorBot gets the detectorBot property value. The detectorBot property +// GetDetectorBot gets the detectorBot property value. Identifier of the detection bot that produced this result. // returns a *string when successful func (m *SyntheticMediaDetectionInfo) GetDetectorBot()(*string) { val, err := m.GetBackingStore().Get("detectorBot") @@ -124,7 +124,7 @@ func (m *SyntheticMediaDetectionInfo) GetFieldDeserializers()(map[string]func(i8 } return res } -// GetIsParticipantTrusted gets the isParticipantTrusted property value. The isParticipantTrusted property +// GetIsParticipantTrusted gets the isParticipantTrusted property value. Set to true if the participant is classified as trusted or reliable (for example, a known internal user); otherwise, false. // returns a *bool when successful func (m *SyntheticMediaDetectionInfo) GetIsParticipantTrusted()(*bool) { val, err := m.GetBackingStore().Get("isParticipantTrusted") @@ -148,7 +148,7 @@ func (m *SyntheticMediaDetectionInfo) GetOdataType()(*string) { } return nil } -// GetSyntheticConfidence gets the syntheticConfidence property value. The syntheticConfidence property +// GetSyntheticConfidence gets the syntheticConfidence property value. Confidence score (0.0 to 1.0) that the participant's media is synthetic. // returns a *float64 when successful func (m *SyntheticMediaDetectionInfo) GetSyntheticConfidence()(*float64) { val, err := m.GetBackingStore().Get("syntheticConfidence") @@ -211,21 +211,21 @@ func (m *SyntheticMediaDetectionInfo) SetAdditionalData(value map[string]any)() func (m *SyntheticMediaDetectionInfo) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { m.backingStore = value } -// SetDetectionId sets the detectionId property value. The detectionId property +// SetDetectionId sets the detectionId property value. Unique identifier for the detection event. This property correlates with the id parameter that the detection bot passed to reportSyntheticMedia. func (m *SyntheticMediaDetectionInfo) SetDetectionId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { err := m.GetBackingStore().Set("detectionId", value) if err != nil { panic(err) } } -// SetDetectorBot sets the detectorBot property value. The detectorBot property +// SetDetectorBot sets the detectorBot property value. Identifier of the detection bot that produced this result. func (m *SyntheticMediaDetectionInfo) SetDetectorBot(value *string)() { err := m.GetBackingStore().Set("detectorBot", value) if err != nil { panic(err) } } -// SetIsParticipantTrusted sets the isParticipantTrusted property value. The isParticipantTrusted property +// SetIsParticipantTrusted sets the isParticipantTrusted property value. Set to true if the participant is classified as trusted or reliable (for example, a known internal user); otherwise, false. func (m *SyntheticMediaDetectionInfo) SetIsParticipantTrusted(value *bool)() { err := m.GetBackingStore().Set("isParticipantTrusted", value) if err != nil { @@ -239,7 +239,7 @@ func (m *SyntheticMediaDetectionInfo) SetOdataType(value *string)() { panic(err) } } -// SetSyntheticConfidence sets the syntheticConfidence property value. The syntheticConfidence property +// SetSyntheticConfidence sets the syntheticConfidence property value. Confidence score (0.0 to 1.0) that the participant's media is synthetic. func (m *SyntheticMediaDetectionInfo) SetSyntheticConfidence(value *float64)() { err := m.GetBackingStore().Set("syntheticConfidence", value) if err != nil { diff --git a/models/text_classification_request.go b/models/text_classification_request.go index d90330d7680..b15b8988914 100644 --- a/models/text_classification_request.go +++ b/models/text_classification_request.go @@ -22,7 +22,7 @@ func NewTextClassificationRequest()(*TextClassificationRequest) { func CreateTextClassificationRequestFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewTextClassificationRequest(), nil } -// GetContentMetaData gets the contentMetaData property value. The contentMetaData property +// GetContentMetaData gets the contentMetaData property value. Metadata that describes the content being classified. // returns a ClassificationRequestContentMetaDataable when successful func (m *TextClassificationRequest) GetContentMetaData()(ClassificationRequestContentMetaDataable) { val, err := m.GetBackingStore().Get("contentMetaData") @@ -106,7 +106,7 @@ func (m *TextClassificationRequest) GetFieldDeserializers()(map[string]func(i878 } return res } -// GetFileExtension gets the fileExtension property value. The fileExtension property +// GetFileExtension gets the fileExtension property value. The file extension of the content being classified. // returns a *string when successful func (m *TextClassificationRequest) GetFileExtension()(*string) { val, err := m.GetBackingStore().Get("fileExtension") @@ -118,7 +118,7 @@ func (m *TextClassificationRequest) GetFileExtension()(*string) { } return nil } -// GetMatchTolerancesToInclude gets the matchTolerancesToInclude property value. The matchTolerancesToInclude property +// GetMatchTolerancesToInclude gets the matchTolerancesToInclude property value. The match tolerance levels to include in the classification results. The possible values are: exact, near. // returns a *MlClassificationMatchTolerance when successful func (m *TextClassificationRequest) GetMatchTolerancesToInclude()(*MlClassificationMatchTolerance) { val, err := m.GetBackingStore().Get("matchTolerancesToInclude") @@ -130,7 +130,7 @@ func (m *TextClassificationRequest) GetMatchTolerancesToInclude()(*MlClassificat } return nil } -// GetScopesToRun gets the scopesToRun property value. The scopesToRun property +// GetScopesToRun gets the scopesToRun property value. The document scopes over which to run classification. The possible values are: fullDocument, partialDocument. // returns a *SensitiveTypeScope when successful func (m *TextClassificationRequest) GetScopesToRun()(*SensitiveTypeScope) { val, err := m.GetBackingStore().Get("scopesToRun") @@ -142,7 +142,7 @@ func (m *TextClassificationRequest) GetScopesToRun()(*SensitiveTypeScope) { } return nil } -// GetSensitiveTypeIds gets the sensitiveTypeIds property value. The sensitiveTypeIds property +// GetSensitiveTypeIds gets the sensitiveTypeIds property value. The identifiers of the sensitive information types to evaluate against the text. // returns a []string when successful func (m *TextClassificationRequest) GetSensitiveTypeIds()([]string) { val, err := m.GetBackingStore().Get("sensitiveTypeIds") @@ -154,7 +154,7 @@ func (m *TextClassificationRequest) GetSensitiveTypeIds()([]string) { } return nil } -// GetText gets the text property value. The text property +// GetText gets the text property value. The text to classify. // returns a *string when successful func (m *TextClassificationRequest) GetText()(*string) { val, err := m.GetBackingStore().Get("text") @@ -212,42 +212,42 @@ func (m *TextClassificationRequest) Serialize(writer i878a80d2330e89d26896388a3f } return nil } -// SetContentMetaData sets the contentMetaData property value. The contentMetaData property +// SetContentMetaData sets the contentMetaData property value. Metadata that describes the content being classified. func (m *TextClassificationRequest) SetContentMetaData(value ClassificationRequestContentMetaDataable)() { err := m.GetBackingStore().Set("contentMetaData", value) if err != nil { panic(err) } } -// SetFileExtension sets the fileExtension property value. The fileExtension property +// SetFileExtension sets the fileExtension property value. The file extension of the content being classified. func (m *TextClassificationRequest) SetFileExtension(value *string)() { err := m.GetBackingStore().Set("fileExtension", value) if err != nil { panic(err) } } -// SetMatchTolerancesToInclude sets the matchTolerancesToInclude property value. The matchTolerancesToInclude property +// SetMatchTolerancesToInclude sets the matchTolerancesToInclude property value. The match tolerance levels to include in the classification results. The possible values are: exact, near. func (m *TextClassificationRequest) SetMatchTolerancesToInclude(value *MlClassificationMatchTolerance)() { err := m.GetBackingStore().Set("matchTolerancesToInclude", value) if err != nil { panic(err) } } -// SetScopesToRun sets the scopesToRun property value. The scopesToRun property +// SetScopesToRun sets the scopesToRun property value. The document scopes over which to run classification. The possible values are: fullDocument, partialDocument. func (m *TextClassificationRequest) SetScopesToRun(value *SensitiveTypeScope)() { err := m.GetBackingStore().Set("scopesToRun", value) if err != nil { panic(err) } } -// SetSensitiveTypeIds sets the sensitiveTypeIds property value. The sensitiveTypeIds property +// SetSensitiveTypeIds sets the sensitiveTypeIds property value. The identifiers of the sensitive information types to evaluate against the text. func (m *TextClassificationRequest) SetSensitiveTypeIds(value []string)() { err := m.GetBackingStore().Set("sensitiveTypeIds", value) if err != nil { panic(err) } } -// SetText sets the text property value. The text property +// SetText sets the text property value. The text to classify. func (m *TextClassificationRequest) SetText(value *string)() { err := m.GetBackingStore().Set("text", value) if err != nil { diff --git a/models/verified_id_method_type.go b/models/verified_id_method_type.go new file mode 100644 index 00000000000..187734faa10 --- /dev/null +++ b/models/verified_id_method_type.go @@ -0,0 +1,45 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models +type VerifiedIdMethodType int + +const ( + IDENTITYVERIFICATIONPARTNER_VERIFIEDIDMETHODTYPE VerifiedIdMethodType = iota + TENANTCUSTOMCREDENTIAL_VERIFIEDIDMETHODTYPE + VERIFIEDEMPLOYEE_VERIFIEDIDMETHODTYPE + UNKNOWNFUTUREVALUE_VERIFIEDIDMETHODTYPE + NOTCONFIGURED_VERIFIEDIDMETHODTYPE +) + +func (i VerifiedIdMethodType) String() string { + return []string{"identityVerificationPartner", "tenantCustomCredential", "verifiedEmployee", "unknownFutureValue", "notConfigured"}[i] +} +func ParseVerifiedIdMethodType(v string) (any, error) { + result := IDENTITYVERIFICATIONPARTNER_VERIFIEDIDMETHODTYPE + switch v { + case "identityVerificationPartner": + result = IDENTITYVERIFICATIONPARTNER_VERIFIEDIDMETHODTYPE + case "tenantCustomCredential": + result = TENANTCUSTOMCREDENTIAL_VERIFIEDIDMETHODTYPE + case "verifiedEmployee": + result = VERIFIEDEMPLOYEE_VERIFIEDIDMETHODTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_VERIFIEDIDMETHODTYPE + case "notConfigured": + result = NOTCONFIGURED_VERIFIEDIDMETHODTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeVerifiedIdMethodType(values []VerifiedIdMethodType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i VerifiedIdMethodType) isMultiValue() bool { + return false +} diff --git a/models/verified_id_profile.go b/models/verified_id_profile.go index 1bffcd61eb9..a6785475509 100644 --- a/models/verified_id_profile.go +++ b/models/verified_id_profile.go @@ -81,6 +81,16 @@ func (m *VerifiedIdProfile) GetFieldDeserializers()(map[string]func(i878a80d2330 } return nil } + res["mobileDriversLicenseConfiguration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMobileDriversLicenseConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMobileDriversLicenseConfiguration(val.(MobileDriversLicenseConfigurationable)) + } + return nil + } res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -101,6 +111,16 @@ func (m *VerifiedIdProfile) GetFieldDeserializers()(map[string]func(i878a80d2330 } return nil } + res["selfServiceIssuance"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateVerifiedIdSelfServiceIssuanceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSelfServiceIssuance(val.(VerifiedIdSelfServiceIssuanceable)) + } + return nil + } res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetEnumValue(ParseVerifiedIdProfileState) if err != nil { @@ -161,6 +181,18 @@ func (m *VerifiedIdProfile) GetLastModifiedDateTime()(*i336074805fc853987abe6f7f } return nil } +// GetMobileDriversLicenseConfiguration gets the mobileDriversLicenseConfiguration property value. Configuration for accepting mobile driver's licenses. Optional. +// returns a MobileDriversLicenseConfigurationable when successful +func (m *VerifiedIdProfile) GetMobileDriversLicenseConfiguration()(MobileDriversLicenseConfigurationable) { + val, err := m.GetBackingStore().Get("mobileDriversLicenseConfiguration") + if err != nil { + panic(err) + } + if val != nil { + return val.(MobileDriversLicenseConfigurationable) + } + return nil +} // GetName gets the name property value. Display name for the verified ID profile. Required. // returns a *string when successful func (m *VerifiedIdProfile) GetName()(*string) { @@ -185,6 +217,18 @@ func (m *VerifiedIdProfile) GetPriority()(*int32) { } return nil } +// GetSelfServiceIssuance gets the selfServiceIssuance property value. Configuration for self-service issuance. Optional. +// returns a VerifiedIdSelfServiceIssuanceable when successful +func (m *VerifiedIdProfile) GetSelfServiceIssuance()(VerifiedIdSelfServiceIssuanceable) { + val, err := m.GetBackingStore().Get("selfServiceIssuance") + if err != nil { + panic(err) + } + if val != nil { + return val.(VerifiedIdSelfServiceIssuanceable) + } + return nil +} // GetState gets the state property value. The state property // returns a *VerifiedIdProfileState when successful func (m *VerifiedIdProfile) GetState()(*VerifiedIdProfileState) { @@ -257,6 +301,12 @@ func (m *VerifiedIdProfile) Serialize(writer i878a80d2330e89d26896388a3f487eef27 return err } } + { + err = writer.WriteObjectValue("mobileDriversLicenseConfiguration", m.GetMobileDriversLicenseConfiguration()) + if err != nil { + return err + } + } { err = writer.WriteStringValue("name", m.GetName()) if err != nil { @@ -269,6 +319,12 @@ func (m *VerifiedIdProfile) Serialize(writer i878a80d2330e89d26896388a3f487eef27 return err } } + { + err = writer.WriteObjectValue("selfServiceIssuance", m.GetSelfServiceIssuance()) + if err != nil { + return err + } + } if m.GetState() != nil { cast := (*m.GetState()).String() err = writer.WriteStringValue("state", &cast) @@ -323,6 +379,13 @@ func (m *VerifiedIdProfile) SetLastModifiedDateTime(value *i336074805fc853987abe panic(err) } } +// SetMobileDriversLicenseConfiguration sets the mobileDriversLicenseConfiguration property value. Configuration for accepting mobile driver's licenses. Optional. +func (m *VerifiedIdProfile) SetMobileDriversLicenseConfiguration(value MobileDriversLicenseConfigurationable)() { + err := m.GetBackingStore().Set("mobileDriversLicenseConfiguration", value) + if err != nil { + panic(err) + } +} // SetName sets the name property value. Display name for the verified ID profile. Required. func (m *VerifiedIdProfile) SetName(value *string)() { err := m.GetBackingStore().Set("name", value) @@ -337,6 +400,13 @@ func (m *VerifiedIdProfile) SetPriority(value *int32)() { panic(err) } } +// SetSelfServiceIssuance sets the selfServiceIssuance property value. Configuration for self-service issuance. Optional. +func (m *VerifiedIdProfile) SetSelfServiceIssuance(value VerifiedIdSelfServiceIssuanceable)() { + err := m.GetBackingStore().Set("selfServiceIssuance", value) + if err != nil { + panic(err) + } +} // SetState sets the state property value. The state property func (m *VerifiedIdProfile) SetState(value *VerifiedIdProfileState)() { err := m.GetBackingStore().Set("state", value) @@ -371,8 +441,10 @@ type VerifiedIdProfileable interface { GetDescription()(*string) GetFaceCheckConfiguration()(FaceCheckConfigurationable) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetMobileDriversLicenseConfiguration()(MobileDriversLicenseConfigurationable) GetName()(*string) GetPriority()(*int32) + GetSelfServiceIssuance()(VerifiedIdSelfServiceIssuanceable) GetState()(*VerifiedIdProfileState) GetVerifiedIdProfileConfiguration()(VerifiedIdProfileConfigurationable) GetVerifiedIdUsageConfigurations()([]VerifiedIdUsageConfigurationable) @@ -380,8 +452,10 @@ type VerifiedIdProfileable interface { SetDescription(value *string)() SetFaceCheckConfiguration(value FaceCheckConfigurationable)() SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetMobileDriversLicenseConfiguration(value MobileDriversLicenseConfigurationable)() SetName(value *string)() SetPriority(value *int32)() + SetSelfServiceIssuance(value VerifiedIdSelfServiceIssuanceable)() SetState(value *VerifiedIdProfileState)() SetVerifiedIdProfileConfiguration(value VerifiedIdProfileConfigurationable)() SetVerifiedIdUsageConfigurations(value []VerifiedIdUsageConfigurationable)() diff --git a/models/verified_id_profile_configuration.go b/models/verified_id_profile_configuration.go index 15ecb365007..2c119f0f3e8 100644 --- a/models/verified_id_profile_configuration.go +++ b/models/verified_id_profile_configuration.go @@ -141,6 +141,26 @@ func (m *VerifiedIdProfileConfiguration) GetFieldDeserializers()(map[string]func } return nil } + res["manifestUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetManifestUrl(val) + } + return nil + } + res["methodType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseVerifiedIdMethodType) + if err != nil { + return err + } + if val != nil { + m.SetMethodType(val.(*VerifiedIdMethodType)) + } + return nil + } res["@odata.type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -163,6 +183,30 @@ func (m *VerifiedIdProfileConfiguration) GetFieldDeserializers()(map[string]func } return res } +// GetManifestUrl gets the manifestUrl property value. The URL where the credential issuer's manifest can be found. The manifest defines the credential schema and issuer details. Optional. +// returns a *string when successful +func (m *VerifiedIdProfileConfiguration) GetManifestUrl()(*string) { + val, err := m.GetBackingStore().Get("manifestUrl") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetMethodType gets the methodType property value. The methodType property +// returns a *VerifiedIdMethodType when successful +func (m *VerifiedIdProfileConfiguration) GetMethodType()(*VerifiedIdMethodType) { + val, err := m.GetBackingStore().Get("methodType") + if err != nil { + panic(err) + } + if val != nil { + return val.(*VerifiedIdMethodType) + } + return nil +} // GetOdataType gets the @odata.type property value. The OdataType property // returns a *string when successful func (m *VerifiedIdProfileConfiguration) GetOdataType()(*string) { @@ -220,6 +264,19 @@ func (m *VerifiedIdProfileConfiguration) Serialize(writer i878a80d2330e89d268963 return err } } + { + err := writer.WriteStringValue("manifestUrl", m.GetManifestUrl()) + if err != nil { + return err + } + } + if m.GetMethodType() != nil { + cast := (*m.GetMethodType()).String() + err := writer.WriteStringValue("methodType", &cast) + if err != nil { + return err + } + } { err := writer.WriteStringValue("@odata.type", m.GetOdataType()) if err != nil { @@ -279,6 +336,20 @@ func (m *VerifiedIdProfileConfiguration) SetClaimValidation(value ClaimValidatio panic(err) } } +// SetManifestUrl sets the manifestUrl property value. The URL where the credential issuer's manifest can be found. The manifest defines the credential schema and issuer details. Optional. +func (m *VerifiedIdProfileConfiguration) SetManifestUrl(value *string)() { + err := m.GetBackingStore().Set("manifestUrl", value) + if err != nil { + panic(err) + } +} +// SetMethodType sets the methodType property value. The methodType property +func (m *VerifiedIdProfileConfiguration) SetMethodType(value *VerifiedIdMethodType)() { + err := m.GetBackingStore().Set("methodType", value) + if err != nil { + panic(err) + } +} // SetOdataType sets the @odata.type property value. The OdataType property func (m *VerifiedIdProfileConfiguration) SetOdataType(value *string)() { err := m.GetBackingStore().Set("odataType", value) @@ -302,6 +373,8 @@ type VerifiedIdProfileConfigurationable interface { GetClaimBindings()([]ClaimBindingable) GetClaimBindingSource()(*ClaimBindingSource) GetClaimValidation()(ClaimValidationable) + GetManifestUrl()(*string) + GetMethodType()(*VerifiedIdMethodType) GetOdataType()(*string) GetTypeEscaped()(*string) SetAcceptedIssuer(value *string)() @@ -309,6 +382,8 @@ type VerifiedIdProfileConfigurationable interface { SetClaimBindings(value []ClaimBindingable)() SetClaimBindingSource(value *ClaimBindingSource)() SetClaimValidation(value ClaimValidationable)() + SetManifestUrl(value *string)() + SetMethodType(value *VerifiedIdMethodType)() SetOdataType(value *string)() SetTypeEscaped(value *string)() } diff --git a/models/verified_id_self_service_issuance.go b/models/verified_id_self_service_issuance.go new file mode 100644 index 00000000000..88310b8615a --- /dev/null +++ b/models/verified_id_self_service_issuance.go @@ -0,0 +1,190 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" +) + +type VerifiedIdSelfServiceIssuance struct { + // Stores model information. + backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore +} +// NewVerifiedIdSelfServiceIssuance instantiates a new VerifiedIdSelfServiceIssuance and sets the default values. +func NewVerifiedIdSelfServiceIssuance()(*VerifiedIdSelfServiceIssuance) { + m := &VerifiedIdSelfServiceIssuance{ + } + m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateVerifiedIdSelfServiceIssuanceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateVerifiedIdSelfServiceIssuanceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewVerifiedIdSelfServiceIssuance(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *VerifiedIdSelfServiceIssuance) GetAdditionalData()(map[string]any) { + val , err := m.backingStore.Get("additionalData") + if err != nil { + panic(err) + } + if val == nil { + var value = make(map[string]any); + m.SetAdditionalData(value); + } + return val.(map[string]any) +} +// GetBackingStore gets the BackingStore property value. Stores model information. +// returns a BackingStore when successful +func (m *VerifiedIdSelfServiceIssuance) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { + return m.backingStore +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *VerifiedIdSelfServiceIssuance) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["isEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsEnabled(val) + } + return nil + } + res["issuanceUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssuanceUrl(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 +} +// GetIsEnabled gets the isEnabled property value. Indicates whether self-service issuance is enabled. +// returns a *bool when successful +func (m *VerifiedIdSelfServiceIssuance) GetIsEnabled()(*bool) { + val, err := m.GetBackingStore().Get("isEnabled") + if err != nil { + panic(err) + } + if val != nil { + return val.(*bool) + } + return nil +} +// GetIssuanceUrl gets the issuanceUrl property value. The HTTPS URL where users can start self-service issuance to obtain the credential when required by the credential type. +// returns a *string when successful +func (m *VerifiedIdSelfServiceIssuance) GetIssuanceUrl()(*string) { + val, err := m.GetBackingStore().Get("issuanceUrl") + if err != nil { + panic(err) + } + if val != nil { + return val.(*string) + } + return nil +} +// GetOdataType gets the @odata.type property value. The OdataType property +// returns a *string when successful +func (m *VerifiedIdSelfServiceIssuance) 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 *VerifiedIdSelfServiceIssuance) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("isEnabled", m.GetIsEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("issuanceUrl", m.GetIssuanceUrl()) + 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 *VerifiedIdSelfServiceIssuance) 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 *VerifiedIdSelfServiceIssuance) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { + m.backingStore = value +} +// SetIsEnabled sets the isEnabled property value. Indicates whether self-service issuance is enabled. +func (m *VerifiedIdSelfServiceIssuance) SetIsEnabled(value *bool)() { + err := m.GetBackingStore().Set("isEnabled", value) + if err != nil { + panic(err) + } +} +// SetIssuanceUrl sets the issuanceUrl property value. The HTTPS URL where users can start self-service issuance to obtain the credential when required by the credential type. +func (m *VerifiedIdSelfServiceIssuance) SetIssuanceUrl(value *string)() { + err := m.GetBackingStore().Set("issuanceUrl", value) + if err != nil { + panic(err) + } +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *VerifiedIdSelfServiceIssuance) SetOdataType(value *string)() { + err := m.GetBackingStore().Set("odataType", value) + if err != nil { + panic(err) + } +} +type VerifiedIdSelfServiceIssuanceable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) + GetIsEnabled()(*bool) + GetIssuanceUrl()(*string) + GetOdataType()(*string) + SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() + SetIsEnabled(value *bool)() + SetIssuanceUrl(value *string)() + SetOdataType(value *string)() +} diff --git a/models/verified_id_usage_configuration_purpose.go b/models/verified_id_usage_configuration_purpose.go index e9d9670d1f4..a783678efcc 100644 --- a/models/verified_id_usage_configuration_purpose.go +++ b/models/verified_id_usage_configuration_purpose.go @@ -9,10 +9,11 @@ const ( ONBOARDING_VERIFIEDIDUSAGECONFIGURATIONPURPOSE ALL_VERIFIEDIDUSAGECONFIGURATIONPURPOSE UNKNOWNFUTUREVALUE_VERIFIEDIDUSAGECONFIGURATIONPURPOSE + VERIFICATION_VERIFIEDIDUSAGECONFIGURATIONPURPOSE ) func (i VerifiedIdUsageConfigurationPurpose) String() string { - return []string{"recovery", "onboarding", "all", "unknownFutureValue"}[i] + return []string{"recovery", "onboarding", "all", "unknownFutureValue", "verification"}[i] } func ParseVerifiedIdUsageConfigurationPurpose(v string) (any, error) { result := RECOVERY_VERIFIEDIDUSAGECONFIGURATIONPURPOSE @@ -25,6 +26,8 @@ func ParseVerifiedIdUsageConfigurationPurpose(v string) (any, error) { result = ALL_VERIFIEDIDUSAGECONFIGURATIONPURPOSE case "unknownFutureValue": result = UNKNOWNFUTUREVALUE_VERIFIEDIDUSAGECONFIGURATIONPURPOSE + case "verification": + result = VERIFICATION_VERIFIEDIDUSAGECONFIGURATIONPURPOSE default: return nil, nil } diff --git a/models/video_metadata.go b/models/video_metadata.go index cfb4f433d8a..be3785b0e00 100644 --- a/models/video_metadata.go +++ b/models/video_metadata.go @@ -43,7 +43,7 @@ func (m *VideoMetadata) GetAdditionalData()(map[string]any) { func (m *VideoMetadata) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { return m.backingStore } -// GetBitrateKbps gets the bitrateKbps property value. The bitrateKbps property +// GetBitrateKbps gets the bitrateKbps property value. Video bitrate in kilobits per second. // returns a *int32 when successful func (m *VideoMetadata) GetBitrateKbps()(*int32) { val, err := m.GetBackingStore().Get("bitrateKbps") @@ -55,7 +55,7 @@ func (m *VideoMetadata) GetBitrateKbps()(*int32) { } return nil } -// GetCodec gets the codec property value. The codec property +// GetCodec gets the codec property value. The video codec used (for example, H.264 or VP9). // returns a *string when successful func (m *VideoMetadata) GetCodec()(*string) { val, err := m.GetBackingStore().Get("codec") @@ -113,7 +113,7 @@ func (m *VideoMetadata) GetFieldDeserializers()(map[string]func(i878a80d2330e89d } return res } -// GetFrameRate gets the frameRate property value. The frameRate property +// GetFrameRate gets the frameRate property value. Frame rate in frames per second. // returns a *float64 when successful func (m *VideoMetadata) GetFrameRate()(*float64) { val, err := m.GetBackingStore().Get("frameRate") @@ -182,21 +182,21 @@ func (m *VideoMetadata) SetAdditionalData(value map[string]any)() { func (m *VideoMetadata) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { m.backingStore = value } -// SetBitrateKbps sets the bitrateKbps property value. The bitrateKbps property +// SetBitrateKbps sets the bitrateKbps property value. Video bitrate in kilobits per second. func (m *VideoMetadata) SetBitrateKbps(value *int32)() { err := m.GetBackingStore().Set("bitrateKbps", value) if err != nil { panic(err) } } -// SetCodec sets the codec property value. The codec property +// SetCodec sets the codec property value. The video codec used (for example, H.264 or VP9). func (m *VideoMetadata) SetCodec(value *string)() { err := m.GetBackingStore().Set("codec", value) if err != nil { panic(err) } } -// SetFrameRate sets the frameRate property value. The frameRate property +// SetFrameRate sets the frameRate property value. Frame rate in frames per second. func (m *VideoMetadata) SetFrameRate(value *float64)() { err := m.GetBackingStore().Set("frameRate", value) if err != nil { diff --git a/planner/goals_count_request_builder.go b/planner/goals_count_request_builder.go new file mode 100644 index 00000000000..6f1e8591fef --- /dev/null +++ b/planner/goals_count_request_builder.go @@ -0,0 +1,86 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package planner + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// GoalsCountRequestBuilder provides operations to count the resources in the collection. +type GoalsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// GoalsCountRequestBuilderGetQueryParameters get the number of the resource +type GoalsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string "uriparametername:\"%24filter\"" + // Search items by search phrases + Search *string "uriparametername:\"%24search\"" +} +// GoalsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type GoalsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *GoalsCountRequestBuilderGetQueryParameters +} +// NewGoalsCountRequestBuilderInternal instantiates a new GoalsCountRequestBuilder and sets the default values. +func NewGoalsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*GoalsCountRequestBuilder) { + m := &GoalsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/planner/goals/$count{?%24filter,%24search}", pathParameters), + } + return m +} +// NewGoalsCountRequestBuilder instantiates a new GoalsCountRequestBuilder and sets the default values. +func NewGoalsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*GoalsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewGoalsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *int32 when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *GoalsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *GoalsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *RequestInformation when successful +func (m *GoalsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *GoalsCountRequestBuilderGetRequestConfiguration)(*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. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *GoalsCountRequestBuilder when successful +func (m *GoalsCountRequestBuilder) WithUrl(rawUrl string)(*GoalsCountRequestBuilder) { + return NewGoalsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/planner/goals_item_tasks_count_request_builder.go b/planner/goals_item_tasks_count_request_builder.go new file mode 100644 index 00000000000..b02931e5e83 --- /dev/null +++ b/planner/goals_item_tasks_count_request_builder.go @@ -0,0 +1,86 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package planner + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// GoalsItemTasksCountRequestBuilder provides operations to count the resources in the collection. +type GoalsItemTasksCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// GoalsItemTasksCountRequestBuilderGetQueryParameters get the number of the resource +type GoalsItemTasksCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string "uriparametername:\"%24filter\"" + // Search items by search phrases + Search *string "uriparametername:\"%24search\"" +} +// GoalsItemTasksCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type GoalsItemTasksCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *GoalsItemTasksCountRequestBuilderGetQueryParameters +} +// NewGoalsItemTasksCountRequestBuilderInternal instantiates a new GoalsItemTasksCountRequestBuilder and sets the default values. +func NewGoalsItemTasksCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*GoalsItemTasksCountRequestBuilder) { + m := &GoalsItemTasksCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/planner/goals/{plannerGoal%2Did}/tasks/$count{?%24filter,%24search}", pathParameters), + } + return m +} +// NewGoalsItemTasksCountRequestBuilder instantiates a new GoalsItemTasksCountRequestBuilder and sets the default values. +func NewGoalsItemTasksCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*GoalsItemTasksCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewGoalsItemTasksCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *int32 when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *GoalsItemTasksCountRequestBuilder) Get(ctx context.Context, requestConfiguration *GoalsItemTasksCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *RequestInformation when successful +func (m *GoalsItemTasksCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *GoalsItemTasksCountRequestBuilderGetRequestConfiguration)(*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. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *GoalsItemTasksCountRequestBuilder when successful +func (m *GoalsItemTasksCountRequestBuilder) WithUrl(rawUrl string)(*GoalsItemTasksCountRequestBuilder) { + return NewGoalsItemTasksCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/planner/goals_item_tasks_planner_task_item_request_builder.go b/planner/goals_item_tasks_planner_task_item_request_builder.go new file mode 100644 index 00000000000..d400c867b92 --- /dev/null +++ b/planner/goals_item_tasks_planner_task_item_request_builder.go @@ -0,0 +1,87 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package planner + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// GoalsItemTasksPlannerTaskItemRequestBuilder provides operations to manage the tasks property of the microsoft.graph.plannerGoal entity. +type GoalsItemTasksPlannerTaskItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// GoalsItemTasksPlannerTaskItemRequestBuilderGetQueryParameters read-only. Nullable. The tasks associated with the goal. This relationship doesn't support direct retrieval or $expand. To identify the goals associated with a task, read the goalIds property of the plannerTask resource. +type GoalsItemTasksPlannerTaskItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string "uriparametername:\"%24expand\"" + // Select properties to be returned + Select []string "uriparametername:\"%24select\"" +} +// GoalsItemTasksPlannerTaskItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type GoalsItemTasksPlannerTaskItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *GoalsItemTasksPlannerTaskItemRequestBuilderGetQueryParameters +} +// NewGoalsItemTasksPlannerTaskItemRequestBuilderInternal instantiates a new GoalsItemTasksPlannerTaskItemRequestBuilder and sets the default values. +func NewGoalsItemTasksPlannerTaskItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*GoalsItemTasksPlannerTaskItemRequestBuilder) { + m := &GoalsItemTasksPlannerTaskItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/planner/goals/{plannerGoal%2Did}/tasks/{plannerTask%2Did}{?%24expand,%24select}", pathParameters), + } + return m +} +// NewGoalsItemTasksPlannerTaskItemRequestBuilder instantiates a new GoalsItemTasksPlannerTaskItemRequestBuilder and sets the default values. +func NewGoalsItemTasksPlannerTaskItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*GoalsItemTasksPlannerTaskItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewGoalsItemTasksPlannerTaskItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get read-only. Nullable. The tasks associated with the goal. This relationship doesn't support direct retrieval or $expand. To identify the goals associated with a task, read the goalIds property of the plannerTask resource. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a PlannerTaskable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *GoalsItemTasksPlannerTaskItemRequestBuilder) Get(ctx context.Context, requestConfiguration *GoalsItemTasksPlannerTaskItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerTaskable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreatePlannerTaskFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerTaskable), nil +} +// ToGetRequestInformation read-only. Nullable. The tasks associated with the goal. This relationship doesn't support direct retrieval or $expand. To identify the goals associated with a task, read the goalIds property of the plannerTask resource. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *RequestInformation when successful +func (m *GoalsItemTasksPlannerTaskItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *GoalsItemTasksPlannerTaskItemRequestBuilderGetRequestConfiguration)(*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. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *GoalsItemTasksPlannerTaskItemRequestBuilder when successful +func (m *GoalsItemTasksPlannerTaskItemRequestBuilder) WithUrl(rawUrl string)(*GoalsItemTasksPlannerTaskItemRequestBuilder) { + return NewGoalsItemTasksPlannerTaskItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/planner/goals_item_tasks_request_builder.go b/planner/goals_item_tasks_request_builder.go new file mode 100644 index 00000000000..5a32e2b305a --- /dev/null +++ b/planner/goals_item_tasks_request_builder.go @@ -0,0 +1,117 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package planner + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// GoalsItemTasksRequestBuilder provides operations to manage the tasks property of the microsoft.graph.plannerGoal entity. +type GoalsItemTasksRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// GoalsItemTasksRequestBuilderGetQueryParameters read-only. Nullable. The tasks associated with the goal. This relationship doesn't support direct retrieval or $expand. To identify the goals associated with a task, read the goalIds property of the plannerTask resource. +type GoalsItemTasksRequestBuilderGetQueryParameters 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\"" +} +// GoalsItemTasksRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type GoalsItemTasksRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *GoalsItemTasksRequestBuilderGetQueryParameters +} +// ByPlannerTaskId provides operations to manage the tasks property of the microsoft.graph.plannerGoal entity. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *GoalsItemTasksPlannerTaskItemRequestBuilder when successful +func (m *GoalsItemTasksRequestBuilder) ByPlannerTaskId(plannerTaskId string)(*GoalsItemTasksPlannerTaskItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if plannerTaskId != "" { + urlTplParams["plannerTask%2Did"] = plannerTaskId + } + return NewGoalsItemTasksPlannerTaskItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewGoalsItemTasksRequestBuilderInternal instantiates a new GoalsItemTasksRequestBuilder and sets the default values. +func NewGoalsItemTasksRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*GoalsItemTasksRequestBuilder) { + m := &GoalsItemTasksRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/planner/goals/{plannerGoal%2Did}/tasks{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters), + } + return m +} +// NewGoalsItemTasksRequestBuilder instantiates a new GoalsItemTasksRequestBuilder and sets the default values. +func NewGoalsItemTasksRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*GoalsItemTasksRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewGoalsItemTasksRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +// returns a *GoalsItemTasksCountRequestBuilder when successful +func (m *GoalsItemTasksRequestBuilder) Count()(*GoalsItemTasksCountRequestBuilder) { + return NewGoalsItemTasksCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get read-only. Nullable. The tasks associated with the goal. This relationship doesn't support direct retrieval or $expand. To identify the goals associated with a task, read the goalIds property of the plannerTask resource. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a PlannerTaskCollectionResponseable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *GoalsItemTasksRequestBuilder) Get(ctx context.Context, requestConfiguration *GoalsItemTasksRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerTaskCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreatePlannerTaskCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerTaskCollectionResponseable), nil +} +// ToGetRequestInformation read-only. Nullable. The tasks associated with the goal. This relationship doesn't support direct retrieval or $expand. To identify the goals associated with a task, read the goalIds property of the plannerTask resource. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *RequestInformation when successful +func (m *GoalsItemTasksRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *GoalsItemTasksRequestBuilderGetRequestConfiguration)(*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. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *GoalsItemTasksRequestBuilder when successful +func (m *GoalsItemTasksRequestBuilder) WithUrl(rawUrl string)(*GoalsItemTasksRequestBuilder) { + return NewGoalsItemTasksRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/planner/goals_planner_goal_item_request_builder.go b/planner/goals_planner_goal_item_request_builder.go new file mode 100644 index 00000000000..4e9a0a40634 --- /dev/null +++ b/planner/goals_planner_goal_item_request_builder.go @@ -0,0 +1,175 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package planner + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// GoalsPlannerGoalItemRequestBuilder provides operations to manage the goals property of the microsoft.graph.planner entity. +type GoalsPlannerGoalItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// GoalsPlannerGoalItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type GoalsPlannerGoalItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// GoalsPlannerGoalItemRequestBuilderGetQueryParameters retrieve the properties and relationships of a plannerGoal object. +type GoalsPlannerGoalItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string "uriparametername:\"%24expand\"" + // Select properties to be returned + Select []string "uriparametername:\"%24select\"" +} +// GoalsPlannerGoalItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type GoalsPlannerGoalItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *GoalsPlannerGoalItemRequestBuilderGetQueryParameters +} +// GoalsPlannerGoalItemRequestBuilderPatchRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type GoalsPlannerGoalItemRequestBuilderPatchRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// NewGoalsPlannerGoalItemRequestBuilderInternal instantiates a new GoalsPlannerGoalItemRequestBuilder and sets the default values. +func NewGoalsPlannerGoalItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*GoalsPlannerGoalItemRequestBuilder) { + m := &GoalsPlannerGoalItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/planner/goals/{plannerGoal%2Did}{?%24expand,%24select}", pathParameters), + } + return m +} +// NewGoalsPlannerGoalItemRequestBuilder instantiates a new GoalsPlannerGoalItemRequestBuilder and sets the default values. +func NewGoalsPlannerGoalItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*GoalsPlannerGoalItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewGoalsPlannerGoalItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete navigation property goals for planner +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *GoalsPlannerGoalItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *GoalsPlannerGoalItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Get retrieve the properties and relationships of a plannerGoal object. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a PlannerGoalable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/plannergoal-get?view=graph-rest-beta +func (m *GoalsPlannerGoalItemRequestBuilder) Get(ctx context.Context, requestConfiguration *GoalsPlannerGoalItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerGoalable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreatePlannerGoalFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerGoalable), nil +} +// Patch update the navigation property goals in planner +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a PlannerGoalable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *GoalsPlannerGoalItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerGoalable, requestConfiguration *GoalsPlannerGoalItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerGoalable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreatePlannerGoalFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerGoalable), nil +} +// Tasks provides operations to manage the tasks property of the microsoft.graph.plannerGoal entity. +// returns a *GoalsItemTasksRequestBuilder when successful +func (m *GoalsPlannerGoalItemRequestBuilder) Tasks()(*GoalsItemTasksRequestBuilder) { + return NewGoalsItemTasksRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToDeleteRequestInformation delete navigation property goals for planner +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *RequestInformation when successful +func (m *GoalsPlannerGoalItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *GoalsPlannerGoalItemRequestBuilderDeleteRequestConfiguration)(*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 retrieve the properties and relationships of a plannerGoal object. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *RequestInformation when successful +func (m *GoalsPlannerGoalItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *GoalsPlannerGoalItemRequestBuilderGetRequestConfiguration)(*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 goals in planner +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *RequestInformation when successful +func (m *GoalsPlannerGoalItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerGoalable, requestConfiguration *GoalsPlannerGoalItemRequestBuilderPatchRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *GoalsPlannerGoalItemRequestBuilder when successful +func (m *GoalsPlannerGoalItemRequestBuilder) WithUrl(rawUrl string)(*GoalsPlannerGoalItemRequestBuilder) { + return NewGoalsPlannerGoalItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/planner/goals_request_builder.go b/planner/goals_request_builder.go new file mode 100644 index 00000000000..ff9290e4fde --- /dev/null +++ b/planner/goals_request_builder.go @@ -0,0 +1,161 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package planner + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// GoalsRequestBuilder provides operations to manage the goals property of the microsoft.graph.planner entity. +type GoalsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// GoalsRequestBuilderGetQueryParameters retrieve the properties and relationships of a plannerGoal object. +type GoalsRequestBuilderGetQueryParameters 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\"" +} +// GoalsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type GoalsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *GoalsRequestBuilderGetQueryParameters +} +// GoalsRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type GoalsRequestBuilderPostRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ByPlannerGoalId provides operations to manage the goals property of the microsoft.graph.planner entity. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *GoalsPlannerGoalItemRequestBuilder when successful +func (m *GoalsRequestBuilder) ByPlannerGoalId(plannerGoalId string)(*GoalsPlannerGoalItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if plannerGoalId != "" { + urlTplParams["plannerGoal%2Did"] = plannerGoalId + } + return NewGoalsPlannerGoalItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewGoalsRequestBuilderInternal instantiates a new GoalsRequestBuilder and sets the default values. +func NewGoalsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*GoalsRequestBuilder) { + m := &GoalsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/planner/goals{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters), + } + return m +} +// NewGoalsRequestBuilder instantiates a new GoalsRequestBuilder and sets the default values. +func NewGoalsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*GoalsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewGoalsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +// returns a *GoalsCountRequestBuilder when successful +func (m *GoalsRequestBuilder) Count()(*GoalsCountRequestBuilder) { + return NewGoalsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get retrieve the properties and relationships of a plannerGoal object. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a PlannerGoalCollectionResponseable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *GoalsRequestBuilder) Get(ctx context.Context, requestConfiguration *GoalsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerGoalCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreatePlannerGoalCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerGoalCollectionResponseable), nil +} +// Post create new navigation property to goals for planner +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a PlannerGoalable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *GoalsRequestBuilder) Post(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerGoalable, requestConfiguration *GoalsRequestBuilderPostRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerGoalable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreatePlannerGoalFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerGoalable), nil +} +// ToGetRequestInformation retrieve the properties and relationships of a plannerGoal object. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *RequestInformation when successful +func (m *GoalsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *GoalsRequestBuilderGetRequestConfiguration)(*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 goals for planner +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *RequestInformation when successful +func (m *GoalsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerGoalable, requestConfiguration *GoalsRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *GoalsRequestBuilder when successful +func (m *GoalsRequestBuilder) WithUrl(rawUrl string)(*GoalsRequestBuilder) { + return NewGoalsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/planner/planner_request_builder.go b/planner/planner_request_builder.go index 8e0a460ccf2..c5bb2e70030 100644 --- a/planner/planner_request_builder.go +++ b/planner/planner_request_builder.go @@ -75,6 +75,11 @@ func (m *PlannerRequestBuilder) Get(ctx context.Context, requestConfiguration *P } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Plannerable), nil } +// Goals provides operations to manage the goals property of the microsoft.graph.planner entity. +// returns a *GoalsRequestBuilder when successful +func (m *PlannerRequestBuilder) Goals()(*GoalsRequestBuilder) { + return NewGoalsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // Patch update planner // returns a Plannerable when successful // returns a ODataError error when the service returns a 4XX or 5XX status code diff --git a/planner/plans_item_goals_count_request_builder.go b/planner/plans_item_goals_count_request_builder.go new file mode 100644 index 00000000000..37bdd52bf87 --- /dev/null +++ b/planner/plans_item_goals_count_request_builder.go @@ -0,0 +1,86 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package planner + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// PlansItemGoalsCountRequestBuilder provides operations to count the resources in the collection. +type PlansItemGoalsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// PlansItemGoalsCountRequestBuilderGetQueryParameters get the number of the resource +type PlansItemGoalsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string "uriparametername:\"%24filter\"" + // Search items by search phrases + Search *string "uriparametername:\"%24search\"" +} +// PlansItemGoalsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type PlansItemGoalsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *PlansItemGoalsCountRequestBuilderGetQueryParameters +} +// NewPlansItemGoalsCountRequestBuilderInternal instantiates a new PlansItemGoalsCountRequestBuilder and sets the default values. +func NewPlansItemGoalsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PlansItemGoalsCountRequestBuilder) { + m := &PlansItemGoalsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/planner/plans/{plannerPlan%2Did}/goals/$count{?%24filter,%24search}", pathParameters), + } + return m +} +// NewPlansItemGoalsCountRequestBuilder instantiates a new PlansItemGoalsCountRequestBuilder and sets the default values. +func NewPlansItemGoalsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PlansItemGoalsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewPlansItemGoalsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *int32 when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *PlansItemGoalsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *PlansItemGoalsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *RequestInformation when successful +func (m *PlansItemGoalsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *PlansItemGoalsCountRequestBuilderGetRequestConfiguration)(*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. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *PlansItemGoalsCountRequestBuilder when successful +func (m *PlansItemGoalsCountRequestBuilder) WithUrl(rawUrl string)(*PlansItemGoalsCountRequestBuilder) { + return NewPlansItemGoalsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/planner/plans_item_goals_planner_goal_item_request_builder.go b/planner/plans_item_goals_planner_goal_item_request_builder.go new file mode 100644 index 00000000000..ef67004034f --- /dev/null +++ b/planner/plans_item_goals_planner_goal_item_request_builder.go @@ -0,0 +1,87 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package planner + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// PlansItemGoalsPlannerGoalItemRequestBuilder provides operations to manage the goals property of the microsoft.graph.plannerPlan entity. +type PlansItemGoalsPlannerGoalItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// PlansItemGoalsPlannerGoalItemRequestBuilderGetQueryParameters collection of goals in the plan. Read-only. Nullable. +type PlansItemGoalsPlannerGoalItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string "uriparametername:\"%24expand\"" + // Select properties to be returned + Select []string "uriparametername:\"%24select\"" +} +// PlansItemGoalsPlannerGoalItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type PlansItemGoalsPlannerGoalItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *PlansItemGoalsPlannerGoalItemRequestBuilderGetQueryParameters +} +// NewPlansItemGoalsPlannerGoalItemRequestBuilderInternal instantiates a new PlansItemGoalsPlannerGoalItemRequestBuilder and sets the default values. +func NewPlansItemGoalsPlannerGoalItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PlansItemGoalsPlannerGoalItemRequestBuilder) { + m := &PlansItemGoalsPlannerGoalItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/planner/plans/{plannerPlan%2Did}/goals/{plannerGoal%2Did}{?%24expand,%24select}", pathParameters), + } + return m +} +// NewPlansItemGoalsPlannerGoalItemRequestBuilder instantiates a new PlansItemGoalsPlannerGoalItemRequestBuilder and sets the default values. +func NewPlansItemGoalsPlannerGoalItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PlansItemGoalsPlannerGoalItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewPlansItemGoalsPlannerGoalItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get collection of goals in the plan. Read-only. Nullable. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a PlannerGoalable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *PlansItemGoalsPlannerGoalItemRequestBuilder) Get(ctx context.Context, requestConfiguration *PlansItemGoalsPlannerGoalItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerGoalable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreatePlannerGoalFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerGoalable), nil +} +// ToGetRequestInformation collection of goals in the plan. Read-only. Nullable. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *RequestInformation when successful +func (m *PlansItemGoalsPlannerGoalItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *PlansItemGoalsPlannerGoalItemRequestBuilderGetRequestConfiguration)(*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. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *PlansItemGoalsPlannerGoalItemRequestBuilder when successful +func (m *PlansItemGoalsPlannerGoalItemRequestBuilder) WithUrl(rawUrl string)(*PlansItemGoalsPlannerGoalItemRequestBuilder) { + return NewPlansItemGoalsPlannerGoalItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/planner/plans_item_goals_request_builder.go b/planner/plans_item_goals_request_builder.go new file mode 100644 index 00000000000..858bc55be8b --- /dev/null +++ b/planner/plans_item_goals_request_builder.go @@ -0,0 +1,120 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package planner + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// PlansItemGoalsRequestBuilder provides operations to manage the goals property of the microsoft.graph.plannerPlan entity. +type PlansItemGoalsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// PlansItemGoalsRequestBuilderGetQueryParameters retrieve the plannerGoal objects associated with a plannerPlan object. +type PlansItemGoalsRequestBuilderGetQueryParameters 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\"" +} +// PlansItemGoalsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type PlansItemGoalsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *PlansItemGoalsRequestBuilderGetQueryParameters +} +// ByPlannerGoalId provides operations to manage the goals property of the microsoft.graph.plannerPlan entity. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *PlansItemGoalsPlannerGoalItemRequestBuilder when successful +func (m *PlansItemGoalsRequestBuilder) ByPlannerGoalId(plannerGoalId string)(*PlansItemGoalsPlannerGoalItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if plannerGoalId != "" { + urlTplParams["plannerGoal%2Did"] = plannerGoalId + } + return NewPlansItemGoalsPlannerGoalItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewPlansItemGoalsRequestBuilderInternal instantiates a new PlansItemGoalsRequestBuilder and sets the default values. +func NewPlansItemGoalsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PlansItemGoalsRequestBuilder) { + m := &PlansItemGoalsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/planner/plans/{plannerPlan%2Did}/goals{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters), + } + return m +} +// NewPlansItemGoalsRequestBuilder instantiates a new PlansItemGoalsRequestBuilder and sets the default values. +func NewPlansItemGoalsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*PlansItemGoalsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewPlansItemGoalsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +// returns a *PlansItemGoalsCountRequestBuilder when successful +func (m *PlansItemGoalsRequestBuilder) Count()(*PlansItemGoalsCountRequestBuilder) { + return NewPlansItemGoalsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get retrieve the plannerGoal objects associated with a plannerPlan object. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a PlannerGoalCollectionResponseable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/plannerplan-list-goals?view=graph-rest-beta +func (m *PlansItemGoalsRequestBuilder) Get(ctx context.Context, requestConfiguration *PlansItemGoalsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerGoalCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreatePlannerGoalCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerGoalCollectionResponseable), nil +} +// ToGetRequestInformation retrieve the plannerGoal objects associated with a plannerPlan object. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *RequestInformation when successful +func (m *PlansItemGoalsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *PlansItemGoalsRequestBuilderGetRequestConfiguration)(*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. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *PlansItemGoalsRequestBuilder when successful +func (m *PlansItemGoalsRequestBuilder) WithUrl(rawUrl string)(*PlansItemGoalsRequestBuilder) { + return NewPlansItemGoalsRequestBuilder(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 0cbfbf35311..e4c1a9f56b0 100644 --- a/planner/plans_planner_plan_item_request_builder.go +++ b/planner/plans_planner_plan_item_request_builder.go @@ -119,6 +119,11 @@ func (m *PlansPlannerPlanItemRequestBuilder) Get(ctx context.Context, requestCon func (m *PlansPlannerPlanItemRequestBuilder) GetUsageRights()(*PlansItemGetUsageRightsRequestBuilder) { return NewPlansItemGetUsageRightsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// Goals provides operations to manage the goals property of the microsoft.graph.plannerPlan entity. +// returns a *PlansItemGoalsRequestBuilder when successful +func (m *PlansPlannerPlanItemRequestBuilder) Goals()(*PlansItemGoalsRequestBuilder) { + return NewPlansItemGoalsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // HistoryItems provides operations to manage the historyItems property of the microsoft.graph.plannerPlan entity. // returns a *PlansItemHistoryItemsRequestBuilder when successful func (m *PlansPlannerPlanItemRequestBuilder) HistoryItems()(*PlansItemHistoryItemsRequestBuilder) { diff --git a/teams/item_channels_item_planner_plans_item_goals_count_request_builder.go b/teams/item_channels_item_planner_plans_item_goals_count_request_builder.go new file mode 100644 index 00000000000..e821fc9492f --- /dev/null +++ b/teams/item_channels_item_planner_plans_item_goals_count_request_builder.go @@ -0,0 +1,86 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package teams + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemChannelsItemPlannerPlansItemGoalsCountRequestBuilder provides operations to count the resources in the collection. +type ItemChannelsItemPlannerPlansItemGoalsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemChannelsItemPlannerPlansItemGoalsCountRequestBuilderGetQueryParameters get the number of the resource +type ItemChannelsItemPlannerPlansItemGoalsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string "uriparametername:\"%24filter\"" + // Search items by search phrases + Search *string "uriparametername:\"%24search\"" +} +// ItemChannelsItemPlannerPlansItemGoalsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemChannelsItemPlannerPlansItemGoalsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemChannelsItemPlannerPlansItemGoalsCountRequestBuilderGetQueryParameters +} +// NewItemChannelsItemPlannerPlansItemGoalsCountRequestBuilderInternal instantiates a new ItemChannelsItemPlannerPlansItemGoalsCountRequestBuilder and sets the default values. +func NewItemChannelsItemPlannerPlansItemGoalsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemChannelsItemPlannerPlansItemGoalsCountRequestBuilder) { + m := &ItemChannelsItemPlannerPlansItemGoalsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teams/{team%2Did}/channels/{channel%2Did}/planner/plans/{plannerPlan%2Did}/goals/$count{?%24filter,%24search}", pathParameters), + } + return m +} +// NewItemChannelsItemPlannerPlansItemGoalsCountRequestBuilder instantiates a new ItemChannelsItemPlannerPlansItemGoalsCountRequestBuilder and sets the default values. +func NewItemChannelsItemPlannerPlansItemGoalsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemChannelsItemPlannerPlansItemGoalsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemChannelsItemPlannerPlansItemGoalsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *int32 when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *ItemChannelsItemPlannerPlansItemGoalsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemChannelsItemPlannerPlansItemGoalsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *RequestInformation when successful +func (m *ItemChannelsItemPlannerPlansItemGoalsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemChannelsItemPlannerPlansItemGoalsCountRequestBuilderGetRequestConfiguration)(*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. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *ItemChannelsItemPlannerPlansItemGoalsCountRequestBuilder when successful +func (m *ItemChannelsItemPlannerPlansItemGoalsCountRequestBuilder) WithUrl(rawUrl string)(*ItemChannelsItemPlannerPlansItemGoalsCountRequestBuilder) { + return NewItemChannelsItemPlannerPlansItemGoalsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/teams/item_channels_item_planner_plans_item_goals_planner_goal_item_request_builder.go b/teams/item_channels_item_planner_plans_item_goals_planner_goal_item_request_builder.go new file mode 100644 index 00000000000..5b093ae0e60 --- /dev/null +++ b/teams/item_channels_item_planner_plans_item_goals_planner_goal_item_request_builder.go @@ -0,0 +1,87 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package teams + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder provides operations to manage the goals property of the microsoft.graph.plannerPlan entity. +type ItemChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetQueryParameters collection of goals in the plan. Read-only. Nullable. +type ItemChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string "uriparametername:\"%24expand\"" + // Select properties to be returned + Select []string "uriparametername:\"%24select\"" +} +// ItemChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetQueryParameters +} +// NewItemChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderInternal instantiates a new ItemChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder and sets the default values. +func NewItemChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) { + m := &ItemChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teams/{team%2Did}/channels/{channel%2Did}/planner/plans/{plannerPlan%2Did}/goals/{plannerGoal%2Did}{?%24expand,%24select}", pathParameters), + } + return m +} +// NewItemChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder instantiates a new ItemChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder and sets the default values. +func NewItemChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get collection of goals in the plan. Read-only. Nullable. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a PlannerGoalable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *ItemChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerGoalable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreatePlannerGoalFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerGoalable), nil +} +// ToGetRequestInformation collection of goals in the plan. Read-only. Nullable. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *RequestInformation when successful +func (m *ItemChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetRequestConfiguration)(*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. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *ItemChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder when successful +func (m *ItemChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) WithUrl(rawUrl string)(*ItemChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) { + return NewItemChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/teams/item_channels_item_planner_plans_item_goals_request_builder.go b/teams/item_channels_item_planner_plans_item_goals_request_builder.go new file mode 100644 index 00000000000..f788589fa39 --- /dev/null +++ b/teams/item_channels_item_planner_plans_item_goals_request_builder.go @@ -0,0 +1,117 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package teams + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemChannelsItemPlannerPlansItemGoalsRequestBuilder provides operations to manage the goals property of the microsoft.graph.plannerPlan entity. +type ItemChannelsItemPlannerPlansItemGoalsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemChannelsItemPlannerPlansItemGoalsRequestBuilderGetQueryParameters collection of goals in the plan. Read-only. Nullable. +type ItemChannelsItemPlannerPlansItemGoalsRequestBuilderGetQueryParameters 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\"" +} +// ItemChannelsItemPlannerPlansItemGoalsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemChannelsItemPlannerPlansItemGoalsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemChannelsItemPlannerPlansItemGoalsRequestBuilderGetQueryParameters +} +// ByPlannerGoalId provides operations to manage the goals property of the microsoft.graph.plannerPlan entity. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *ItemChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder when successful +func (m *ItemChannelsItemPlannerPlansItemGoalsRequestBuilder) ByPlannerGoalId(plannerGoalId string)(*ItemChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if plannerGoalId != "" { + urlTplParams["plannerGoal%2Did"] = plannerGoalId + } + return NewItemChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemChannelsItemPlannerPlansItemGoalsRequestBuilderInternal instantiates a new ItemChannelsItemPlannerPlansItemGoalsRequestBuilder and sets the default values. +func NewItemChannelsItemPlannerPlansItemGoalsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemChannelsItemPlannerPlansItemGoalsRequestBuilder) { + m := &ItemChannelsItemPlannerPlansItemGoalsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teams/{team%2Did}/channels/{channel%2Did}/planner/plans/{plannerPlan%2Did}/goals{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters), + } + return m +} +// NewItemChannelsItemPlannerPlansItemGoalsRequestBuilder instantiates a new ItemChannelsItemPlannerPlansItemGoalsRequestBuilder and sets the default values. +func NewItemChannelsItemPlannerPlansItemGoalsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemChannelsItemPlannerPlansItemGoalsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemChannelsItemPlannerPlansItemGoalsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +// returns a *ItemChannelsItemPlannerPlansItemGoalsCountRequestBuilder when successful +func (m *ItemChannelsItemPlannerPlansItemGoalsRequestBuilder) Count()(*ItemChannelsItemPlannerPlansItemGoalsCountRequestBuilder) { + return NewItemChannelsItemPlannerPlansItemGoalsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get collection of goals in the plan. Read-only. Nullable. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a PlannerGoalCollectionResponseable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *ItemChannelsItemPlannerPlansItemGoalsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemChannelsItemPlannerPlansItemGoalsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerGoalCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreatePlannerGoalCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerGoalCollectionResponseable), nil +} +// ToGetRequestInformation collection of goals in the plan. Read-only. Nullable. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *RequestInformation when successful +func (m *ItemChannelsItemPlannerPlansItemGoalsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemChannelsItemPlannerPlansItemGoalsRequestBuilderGetRequestConfiguration)(*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. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *ItemChannelsItemPlannerPlansItemGoalsRequestBuilder when successful +func (m *ItemChannelsItemPlannerPlansItemGoalsRequestBuilder) WithUrl(rawUrl string)(*ItemChannelsItemPlannerPlansItemGoalsRequestBuilder) { + return NewItemChannelsItemPlannerPlansItemGoalsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/teams/item_channels_item_planner_plans_planner_plan_item_request_builder.go b/teams/item_channels_item_planner_plans_planner_plan_item_request_builder.go index 693bb74d895..f68fe26b561 100644 --- a/teams/item_channels_item_planner_plans_planner_plan_item_request_builder.go +++ b/teams/item_channels_item_planner_plans_planner_plan_item_request_builder.go @@ -113,6 +113,11 @@ func (m *ItemChannelsItemPlannerPlansPlannerPlanItemRequestBuilder) Get(ctx cont func (m *ItemChannelsItemPlannerPlansPlannerPlanItemRequestBuilder) GetUsageRights()(*ItemChannelsItemPlannerPlansItemGetUsageRightsRequestBuilder) { return NewItemChannelsItemPlannerPlansItemGetUsageRightsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// Goals provides operations to manage the goals property of the microsoft.graph.plannerPlan entity. +// returns a *ItemChannelsItemPlannerPlansItemGoalsRequestBuilder when successful +func (m *ItemChannelsItemPlannerPlansPlannerPlanItemRequestBuilder) Goals()(*ItemChannelsItemPlannerPlansItemGoalsRequestBuilder) { + return NewItemChannelsItemPlannerPlansItemGoalsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // HistoryItems provides operations to manage the historyItems property of the microsoft.graph.plannerPlan entity. // returns a *ItemChannelsItemPlannerPlansItemHistoryItemsRequestBuilder when successful func (m *ItemChannelsItemPlannerPlansPlannerPlanItemRequestBuilder) HistoryItems()(*ItemChannelsItemPlannerPlansItemHistoryItemsRequestBuilder) { diff --git a/teams/item_primary_channel_planner_plans_item_goals_count_request_builder.go b/teams/item_primary_channel_planner_plans_item_goals_count_request_builder.go new file mode 100644 index 00000000000..bd73f500b57 --- /dev/null +++ b/teams/item_primary_channel_planner_plans_item_goals_count_request_builder.go @@ -0,0 +1,86 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package teams + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder provides operations to count the resources in the collection. +type ItemPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemPrimaryChannelPlannerPlansItemGoalsCountRequestBuilderGetQueryParameters get the number of the resource +type ItemPrimaryChannelPlannerPlansItemGoalsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string "uriparametername:\"%24filter\"" + // Search items by search phrases + Search *string "uriparametername:\"%24search\"" +} +// ItemPrimaryChannelPlannerPlansItemGoalsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemPrimaryChannelPlannerPlansItemGoalsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemPrimaryChannelPlannerPlansItemGoalsCountRequestBuilderGetQueryParameters +} +// NewItemPrimaryChannelPlannerPlansItemGoalsCountRequestBuilderInternal instantiates a new ItemPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder and sets the default values. +func NewItemPrimaryChannelPlannerPlansItemGoalsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder) { + m := &ItemPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teams/{team%2Did}/primaryChannel/planner/plans/{plannerPlan%2Did}/goals/$count{?%24filter,%24search}", pathParameters), + } + return m +} +// NewItemPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder instantiates a new ItemPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder and sets the default values. +func NewItemPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemPrimaryChannelPlannerPlansItemGoalsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *int32 when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *ItemPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemPrimaryChannelPlannerPlansItemGoalsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *RequestInformation when successful +func (m *ItemPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemPrimaryChannelPlannerPlansItemGoalsCountRequestBuilderGetRequestConfiguration)(*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. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *ItemPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder when successful +func (m *ItemPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder) WithUrl(rawUrl string)(*ItemPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder) { + return NewItemPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/teams/item_primary_channel_planner_plans_item_goals_planner_goal_item_request_builder.go b/teams/item_primary_channel_planner_plans_item_goals_planner_goal_item_request_builder.go new file mode 100644 index 00000000000..8e38c48af72 --- /dev/null +++ b/teams/item_primary_channel_planner_plans_item_goals_planner_goal_item_request_builder.go @@ -0,0 +1,87 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package teams + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder provides operations to manage the goals property of the microsoft.graph.plannerPlan entity. +type ItemPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetQueryParameters collection of goals in the plan. Read-only. Nullable. +type ItemPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string "uriparametername:\"%24expand\"" + // Select properties to be returned + Select []string "uriparametername:\"%24select\"" +} +// ItemPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetQueryParameters +} +// NewItemPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilderInternal instantiates a new ItemPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder and sets the default values. +func NewItemPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) { + m := &ItemPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teams/{team%2Did}/primaryChannel/planner/plans/{plannerPlan%2Did}/goals/{plannerGoal%2Did}{?%24expand,%24select}", pathParameters), + } + return m +} +// NewItemPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder instantiates a new ItemPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder and sets the default values. +func NewItemPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get collection of goals in the plan. Read-only. Nullable. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a PlannerGoalable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *ItemPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerGoalable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreatePlannerGoalFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerGoalable), nil +} +// ToGetRequestInformation collection of goals in the plan. Read-only. Nullable. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *RequestInformation when successful +func (m *ItemPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetRequestConfiguration)(*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. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *ItemPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder when successful +func (m *ItemPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) WithUrl(rawUrl string)(*ItemPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) { + return NewItemPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/teams/item_primary_channel_planner_plans_item_goals_request_builder.go b/teams/item_primary_channel_planner_plans_item_goals_request_builder.go new file mode 100644 index 00000000000..a760bad0ab0 --- /dev/null +++ b/teams/item_primary_channel_planner_plans_item_goals_request_builder.go @@ -0,0 +1,117 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package teams + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemPrimaryChannelPlannerPlansItemGoalsRequestBuilder provides operations to manage the goals property of the microsoft.graph.plannerPlan entity. +type ItemPrimaryChannelPlannerPlansItemGoalsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemPrimaryChannelPlannerPlansItemGoalsRequestBuilderGetQueryParameters collection of goals in the plan. Read-only. Nullable. +type ItemPrimaryChannelPlannerPlansItemGoalsRequestBuilderGetQueryParameters 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\"" +} +// ItemPrimaryChannelPlannerPlansItemGoalsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemPrimaryChannelPlannerPlansItemGoalsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemPrimaryChannelPlannerPlansItemGoalsRequestBuilderGetQueryParameters +} +// ByPlannerGoalId provides operations to manage the goals property of the microsoft.graph.plannerPlan entity. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *ItemPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder when successful +func (m *ItemPrimaryChannelPlannerPlansItemGoalsRequestBuilder) ByPlannerGoalId(plannerGoalId string)(*ItemPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if plannerGoalId != "" { + urlTplParams["plannerGoal%2Did"] = plannerGoalId + } + return NewItemPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemPrimaryChannelPlannerPlansItemGoalsRequestBuilderInternal instantiates a new ItemPrimaryChannelPlannerPlansItemGoalsRequestBuilder and sets the default values. +func NewItemPrimaryChannelPlannerPlansItemGoalsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPrimaryChannelPlannerPlansItemGoalsRequestBuilder) { + m := &ItemPrimaryChannelPlannerPlansItemGoalsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teams/{team%2Did}/primaryChannel/planner/plans/{plannerPlan%2Did}/goals{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters), + } + return m +} +// NewItemPrimaryChannelPlannerPlansItemGoalsRequestBuilder instantiates a new ItemPrimaryChannelPlannerPlansItemGoalsRequestBuilder and sets the default values. +func NewItemPrimaryChannelPlannerPlansItemGoalsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPrimaryChannelPlannerPlansItemGoalsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemPrimaryChannelPlannerPlansItemGoalsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +// returns a *ItemPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder when successful +func (m *ItemPrimaryChannelPlannerPlansItemGoalsRequestBuilder) Count()(*ItemPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder) { + return NewItemPrimaryChannelPlannerPlansItemGoalsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get collection of goals in the plan. Read-only. Nullable. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a PlannerGoalCollectionResponseable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *ItemPrimaryChannelPlannerPlansItemGoalsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemPrimaryChannelPlannerPlansItemGoalsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerGoalCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreatePlannerGoalCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerGoalCollectionResponseable), nil +} +// ToGetRequestInformation collection of goals in the plan. Read-only. Nullable. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *RequestInformation when successful +func (m *ItemPrimaryChannelPlannerPlansItemGoalsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemPrimaryChannelPlannerPlansItemGoalsRequestBuilderGetRequestConfiguration)(*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. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *ItemPrimaryChannelPlannerPlansItemGoalsRequestBuilder when successful +func (m *ItemPrimaryChannelPlannerPlansItemGoalsRequestBuilder) WithUrl(rawUrl string)(*ItemPrimaryChannelPlannerPlansItemGoalsRequestBuilder) { + return NewItemPrimaryChannelPlannerPlansItemGoalsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/teams/item_primary_channel_planner_plans_planner_plan_item_request_builder.go b/teams/item_primary_channel_planner_plans_planner_plan_item_request_builder.go index 419b7063430..d871104f522 100644 --- a/teams/item_primary_channel_planner_plans_planner_plan_item_request_builder.go +++ b/teams/item_primary_channel_planner_plans_planner_plan_item_request_builder.go @@ -113,6 +113,11 @@ func (m *ItemPrimaryChannelPlannerPlansPlannerPlanItemRequestBuilder) Get(ctx co func (m *ItemPrimaryChannelPlannerPlansPlannerPlanItemRequestBuilder) GetUsageRights()(*ItemPrimaryChannelPlannerPlansItemGetUsageRightsRequestBuilder) { return NewItemPrimaryChannelPlannerPlansItemGetUsageRightsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// Goals provides operations to manage the goals property of the microsoft.graph.plannerPlan entity. +// returns a *ItemPrimaryChannelPlannerPlansItemGoalsRequestBuilder when successful +func (m *ItemPrimaryChannelPlannerPlansPlannerPlanItemRequestBuilder) Goals()(*ItemPrimaryChannelPlannerPlansItemGoalsRequestBuilder) { + return NewItemPrimaryChannelPlannerPlansItemGoalsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // HistoryItems provides operations to manage the historyItems property of the microsoft.graph.plannerPlan entity. // returns a *ItemPrimaryChannelPlannerPlansItemHistoryItemsRequestBuilder when successful func (m *ItemPrimaryChannelPlannerPlansPlannerPlanItemRequestBuilder) HistoryItems()(*ItemPrimaryChannelPlannerPlansItemHistoryItemsRequestBuilder) { diff --git a/teamtemplatedefinition/item_team_definition_channels_item_planner_plans_item_goals_count_request_builder.go b/teamtemplatedefinition/item_team_definition_channels_item_planner_plans_item_goals_count_request_builder.go new file mode 100644 index 00000000000..5ac7d71c9aa --- /dev/null +++ b/teamtemplatedefinition/item_team_definition_channels_item_planner_plans_item_goals_count_request_builder.go @@ -0,0 +1,86 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package teamtemplatedefinition + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsCountRequestBuilder provides operations to count the resources in the collection. +type ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsCountRequestBuilderGetQueryParameters get the number of the resource +type ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string "uriparametername:\"%24filter\"" + // Search items by search phrases + Search *string "uriparametername:\"%24search\"" +} +// ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsCountRequestBuilderGetQueryParameters +} +// NewItemTeamDefinitionChannelsItemPlannerPlansItemGoalsCountRequestBuilderInternal instantiates a new ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsCountRequestBuilder and sets the default values. +func NewItemTeamDefinitionChannelsItemPlannerPlansItemGoalsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsCountRequestBuilder) { + m := &ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teamTemplateDefinition/{teamTemplateDefinition%2Did}/teamDefinition/channels/{channel%2Did}/planner/plans/{plannerPlan%2Did}/goals/$count{?%24filter,%24search}", pathParameters), + } + return m +} +// NewItemTeamDefinitionChannelsItemPlannerPlansItemGoalsCountRequestBuilder instantiates a new ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsCountRequestBuilder and sets the default values. +func NewItemTeamDefinitionChannelsItemPlannerPlansItemGoalsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamDefinitionChannelsItemPlannerPlansItemGoalsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *int32 when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *RequestInformation when successful +func (m *ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsCountRequestBuilderGetRequestConfiguration)(*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. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsCountRequestBuilder when successful +func (m *ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsCountRequestBuilder) WithUrl(rawUrl string)(*ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsCountRequestBuilder) { + return NewItemTeamDefinitionChannelsItemPlannerPlansItemGoalsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/teamtemplatedefinition/item_team_definition_channels_item_planner_plans_item_goals_planner_goal_item_request_builder.go b/teamtemplatedefinition/item_team_definition_channels_item_planner_plans_item_goals_planner_goal_item_request_builder.go new file mode 100644 index 00000000000..31efeaee6ca --- /dev/null +++ b/teamtemplatedefinition/item_team_definition_channels_item_planner_plans_item_goals_planner_goal_item_request_builder.go @@ -0,0 +1,87 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package teamtemplatedefinition + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder provides operations to manage the goals property of the microsoft.graph.plannerPlan entity. +type ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetQueryParameters collection of goals in the plan. Read-only. Nullable. +type ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string "uriparametername:\"%24expand\"" + // Select properties to be returned + Select []string "uriparametername:\"%24select\"" +} +// ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetQueryParameters +} +// NewItemTeamDefinitionChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderInternal instantiates a new ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder and sets the default values. +func NewItemTeamDefinitionChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) { + m := &ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teamTemplateDefinition/{teamTemplateDefinition%2Did}/teamDefinition/channels/{channel%2Did}/planner/plans/{plannerPlan%2Did}/goals/{plannerGoal%2Did}{?%24expand,%24select}", pathParameters), + } + return m +} +// NewItemTeamDefinitionChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder instantiates a new ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder and sets the default values. +func NewItemTeamDefinitionChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamDefinitionChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get collection of goals in the plan. Read-only. Nullable. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a PlannerGoalable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerGoalable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreatePlannerGoalFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerGoalable), nil +} +// ToGetRequestInformation collection of goals in the plan. Read-only. Nullable. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *RequestInformation when successful +func (m *ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetRequestConfiguration)(*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. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder when successful +func (m *ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) WithUrl(rawUrl string)(*ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) { + return NewItemTeamDefinitionChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/teamtemplatedefinition/item_team_definition_channels_item_planner_plans_item_goals_request_builder.go b/teamtemplatedefinition/item_team_definition_channels_item_planner_plans_item_goals_request_builder.go new file mode 100644 index 00000000000..d119e3bd424 --- /dev/null +++ b/teamtemplatedefinition/item_team_definition_channels_item_planner_plans_item_goals_request_builder.go @@ -0,0 +1,117 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package teamtemplatedefinition + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsRequestBuilder provides operations to manage the goals property of the microsoft.graph.plannerPlan entity. +type ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsRequestBuilderGetQueryParameters collection of goals in the plan. Read-only. Nullable. +type ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsRequestBuilderGetQueryParameters 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\"" +} +// ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsRequestBuilderGetQueryParameters +} +// ByPlannerGoalId provides operations to manage the goals property of the microsoft.graph.plannerPlan entity. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder when successful +func (m *ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsRequestBuilder) ByPlannerGoalId(plannerGoalId string)(*ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if plannerGoalId != "" { + urlTplParams["plannerGoal%2Did"] = plannerGoalId + } + return NewItemTeamDefinitionChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemTeamDefinitionChannelsItemPlannerPlansItemGoalsRequestBuilderInternal instantiates a new ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsRequestBuilder and sets the default values. +func NewItemTeamDefinitionChannelsItemPlannerPlansItemGoalsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsRequestBuilder) { + m := &ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teamTemplateDefinition/{teamTemplateDefinition%2Did}/teamDefinition/channels/{channel%2Did}/planner/plans/{plannerPlan%2Did}/goals{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters), + } + return m +} +// NewItemTeamDefinitionChannelsItemPlannerPlansItemGoalsRequestBuilder instantiates a new ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsRequestBuilder and sets the default values. +func NewItemTeamDefinitionChannelsItemPlannerPlansItemGoalsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamDefinitionChannelsItemPlannerPlansItemGoalsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +// returns a *ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsCountRequestBuilder when successful +func (m *ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsRequestBuilder) Count()(*ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsCountRequestBuilder) { + return NewItemTeamDefinitionChannelsItemPlannerPlansItemGoalsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get collection of goals in the plan. Read-only. Nullable. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a PlannerGoalCollectionResponseable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerGoalCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreatePlannerGoalCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerGoalCollectionResponseable), nil +} +// ToGetRequestInformation collection of goals in the plan. Read-only. Nullable. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *RequestInformation when successful +func (m *ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsRequestBuilderGetRequestConfiguration)(*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. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsRequestBuilder when successful +func (m *ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsRequestBuilder) WithUrl(rawUrl string)(*ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsRequestBuilder) { + return NewItemTeamDefinitionChannelsItemPlannerPlansItemGoalsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/teamtemplatedefinition/item_team_definition_channels_item_planner_plans_planner_plan_item_request_builder.go b/teamtemplatedefinition/item_team_definition_channels_item_planner_plans_planner_plan_item_request_builder.go index cc340d348e2..583e2cb3deb 100644 --- a/teamtemplatedefinition/item_team_definition_channels_item_planner_plans_planner_plan_item_request_builder.go +++ b/teamtemplatedefinition/item_team_definition_channels_item_planner_plans_planner_plan_item_request_builder.go @@ -113,6 +113,11 @@ func (m *ItemTeamDefinitionChannelsItemPlannerPlansPlannerPlanItemRequestBuilder func (m *ItemTeamDefinitionChannelsItemPlannerPlansPlannerPlanItemRequestBuilder) GetUsageRights()(*ItemTeamDefinitionChannelsItemPlannerPlansItemGetUsageRightsRequestBuilder) { return NewItemTeamDefinitionChannelsItemPlannerPlansItemGetUsageRightsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// Goals provides operations to manage the goals property of the microsoft.graph.plannerPlan entity. +// returns a *ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsRequestBuilder when successful +func (m *ItemTeamDefinitionChannelsItemPlannerPlansPlannerPlanItemRequestBuilder) Goals()(*ItemTeamDefinitionChannelsItemPlannerPlansItemGoalsRequestBuilder) { + return NewItemTeamDefinitionChannelsItemPlannerPlansItemGoalsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // HistoryItems provides operations to manage the historyItems property of the microsoft.graph.plannerPlan entity. // returns a *ItemTeamDefinitionChannelsItemPlannerPlansItemHistoryItemsRequestBuilder when successful func (m *ItemTeamDefinitionChannelsItemPlannerPlansPlannerPlanItemRequestBuilder) HistoryItems()(*ItemTeamDefinitionChannelsItemPlannerPlansItemHistoryItemsRequestBuilder) { diff --git a/teamtemplatedefinition/item_team_definition_primary_channel_planner_plans_item_goals_count_request_builder.go b/teamtemplatedefinition/item_team_definition_primary_channel_planner_plans_item_goals_count_request_builder.go new file mode 100644 index 00000000000..2f62b203a02 --- /dev/null +++ b/teamtemplatedefinition/item_team_definition_primary_channel_planner_plans_item_goals_count_request_builder.go @@ -0,0 +1,86 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package teamtemplatedefinition + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder provides operations to count the resources in the collection. +type ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsCountRequestBuilderGetQueryParameters get the number of the resource +type ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string "uriparametername:\"%24filter\"" + // Search items by search phrases + Search *string "uriparametername:\"%24search\"" +} +// ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsCountRequestBuilderGetQueryParameters +} +// NewItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsCountRequestBuilderInternal instantiates a new ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder and sets the default values. +func NewItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder) { + m := &ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teamTemplateDefinition/{teamTemplateDefinition%2Did}/teamDefinition/primaryChannel/planner/plans/{plannerPlan%2Did}/goals/$count{?%24filter,%24search}", pathParameters), + } + return m +} +// NewItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder instantiates a new ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder and sets the default values. +func NewItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *int32 when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *RequestInformation when successful +func (m *ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsCountRequestBuilderGetRequestConfiguration)(*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. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder when successful +func (m *ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder) WithUrl(rawUrl string)(*ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder) { + return NewItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/teamtemplatedefinition/item_team_definition_primary_channel_planner_plans_item_goals_planner_goal_item_request_builder.go b/teamtemplatedefinition/item_team_definition_primary_channel_planner_plans_item_goals_planner_goal_item_request_builder.go new file mode 100644 index 00000000000..b784a055d9a --- /dev/null +++ b/teamtemplatedefinition/item_team_definition_primary_channel_planner_plans_item_goals_planner_goal_item_request_builder.go @@ -0,0 +1,87 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package teamtemplatedefinition + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder provides operations to manage the goals property of the microsoft.graph.plannerPlan entity. +type ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetQueryParameters collection of goals in the plan. Read-only. Nullable. +type ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string "uriparametername:\"%24expand\"" + // Select properties to be returned + Select []string "uriparametername:\"%24select\"" +} +// ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetQueryParameters +} +// NewItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilderInternal instantiates a new ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder and sets the default values. +func NewItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) { + m := &ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teamTemplateDefinition/{teamTemplateDefinition%2Did}/teamDefinition/primaryChannel/planner/plans/{plannerPlan%2Did}/goals/{plannerGoal%2Did}{?%24expand,%24select}", pathParameters), + } + return m +} +// NewItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder instantiates a new ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder and sets the default values. +func NewItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get collection of goals in the plan. Read-only. Nullable. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a PlannerGoalable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerGoalable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreatePlannerGoalFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerGoalable), nil +} +// ToGetRequestInformation collection of goals in the plan. Read-only. Nullable. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *RequestInformation when successful +func (m *ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetRequestConfiguration)(*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. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder when successful +func (m *ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) WithUrl(rawUrl string)(*ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) { + return NewItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/teamtemplatedefinition/item_team_definition_primary_channel_planner_plans_item_goals_request_builder.go b/teamtemplatedefinition/item_team_definition_primary_channel_planner_plans_item_goals_request_builder.go new file mode 100644 index 00000000000..894dde3a739 --- /dev/null +++ b/teamtemplatedefinition/item_team_definition_primary_channel_planner_plans_item_goals_request_builder.go @@ -0,0 +1,117 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package teamtemplatedefinition + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsRequestBuilder provides operations to manage the goals property of the microsoft.graph.plannerPlan entity. +type ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsRequestBuilderGetQueryParameters collection of goals in the plan. Read-only. Nullable. +type ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsRequestBuilderGetQueryParameters 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\"" +} +// ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsRequestBuilderGetQueryParameters +} +// ByPlannerGoalId provides operations to manage the goals property of the microsoft.graph.plannerPlan entity. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder when successful +func (m *ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsRequestBuilder) ByPlannerGoalId(plannerGoalId string)(*ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if plannerGoalId != "" { + urlTplParams["plannerGoal%2Did"] = plannerGoalId + } + return NewItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsRequestBuilderInternal instantiates a new ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsRequestBuilder and sets the default values. +func NewItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsRequestBuilder) { + m := &ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teamTemplateDefinition/{teamTemplateDefinition%2Did}/teamDefinition/primaryChannel/planner/plans/{plannerPlan%2Did}/goals{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters), + } + return m +} +// NewItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsRequestBuilder instantiates a new ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsRequestBuilder and sets the default values. +func NewItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +// returns a *ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder when successful +func (m *ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsRequestBuilder) Count()(*ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder) { + return NewItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get collection of goals in the plan. Read-only. Nullable. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a PlannerGoalCollectionResponseable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerGoalCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreatePlannerGoalCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerGoalCollectionResponseable), nil +} +// ToGetRequestInformation collection of goals in the plan. Read-only. Nullable. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *RequestInformation when successful +func (m *ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsRequestBuilderGetRequestConfiguration)(*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. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsRequestBuilder when successful +func (m *ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsRequestBuilder) WithUrl(rawUrl string)(*ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsRequestBuilder) { + return NewItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/teamtemplatedefinition/item_team_definition_primary_channel_planner_plans_planner_plan_item_request_builder.go b/teamtemplatedefinition/item_team_definition_primary_channel_planner_plans_planner_plan_item_request_builder.go index 7df58f61bb0..22b28444efc 100644 --- a/teamtemplatedefinition/item_team_definition_primary_channel_planner_plans_planner_plan_item_request_builder.go +++ b/teamtemplatedefinition/item_team_definition_primary_channel_planner_plans_planner_plan_item_request_builder.go @@ -113,6 +113,11 @@ func (m *ItemTeamDefinitionPrimaryChannelPlannerPlansPlannerPlanItemRequestBuild func (m *ItemTeamDefinitionPrimaryChannelPlannerPlansPlannerPlanItemRequestBuilder) GetUsageRights()(*ItemTeamDefinitionPrimaryChannelPlannerPlansItemGetUsageRightsRequestBuilder) { return NewItemTeamDefinitionPrimaryChannelPlannerPlansItemGetUsageRightsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// Goals provides operations to manage the goals property of the microsoft.graph.plannerPlan entity. +// returns a *ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsRequestBuilder when successful +func (m *ItemTeamDefinitionPrimaryChannelPlannerPlansPlannerPlanItemRequestBuilder) Goals()(*ItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsRequestBuilder) { + return NewItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // HistoryItems provides operations to manage the historyItems property of the microsoft.graph.plannerPlan entity. // returns a *ItemTeamDefinitionPrimaryChannelPlannerPlansItemHistoryItemsRequestBuilder when successful func (m *ItemTeamDefinitionPrimaryChannelPlannerPlansPlannerPlanItemRequestBuilder) HistoryItems()(*ItemTeamDefinitionPrimaryChannelPlannerPlansItemHistoryItemsRequestBuilder) { diff --git a/teamwork/0dad9dba49d1eebb5fc4e28cc0d05f18aa93eb3dff35bc8e45b2f0c200b80afb.go b/teamwork/0dad9dba49d1eebb5fc4e28cc0d05f18aa93eb3dff35bc8e45b2f0c200b80afb.go index e61cef6766e..1411d3c3e4d 100644 --- a/teamwork/0dad9dba49d1eebb5fc4e28cc0d05f18aa93eb3dff35bc8e45b2f0c200b80afb.go +++ b/teamwork/0dad9dba49d1eebb5fc4e28cc0d05f18aa93eb3dff35bc8e45b2f0c200b80afb.go @@ -113,6 +113,11 @@ func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlan func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansPlannerPlanItemRequestBuilder) GetUsageRights()(*TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGetUsageRightsRequestBuilder) { return NewTeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGetUsageRightsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// Goals provides operations to manage the goals property of the microsoft.graph.plannerPlan entity. +// returns a *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsRequestBuilder when successful +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansPlannerPlanItemRequestBuilder) Goals()(*TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsRequestBuilder) { + return NewTeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // HistoryItems provides operations to manage the historyItems property of the microsoft.graph.plannerPlan entity. // returns a *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemHistoryItemsRequestBuilder when successful func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansPlannerPlanItemRequestBuilder) HistoryItems()(*TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemHistoryItemsRequestBuilder) { diff --git a/teamwork/22725bad4b01d9e9883fdbbdb61c97b98f3808eaa223110d6c25db9ecb1efcdf.go b/teamwork/22725bad4b01d9e9883fdbbdb61c97b98f3808eaa223110d6c25db9ecb1efcdf.go new file mode 100644 index 00000000000..71004c27a78 --- /dev/null +++ b/teamwork/22725bad4b01d9e9883fdbbdb61c97b98f3808eaa223110d6c25db9ecb1efcdf.go @@ -0,0 +1,86 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package teamwork + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder provides operations to count the resources in the collection. +type TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsCountRequestBuilderGetQueryParameters get the number of the resource +type TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string "uriparametername:\"%24filter\"" + // Search items by search phrases + Search *string "uriparametername:\"%24search\"" +} +// TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsCountRequestBuilderGetQueryParameters +} +// NewTeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsCountRequestBuilderInternal instantiates a new TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder and sets the default values. +func NewTeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder) { + m := &TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teamwork/teamTemplates/{teamTemplate%2Did}/definitions/{teamTemplateDefinition%2Did}/teamDefinition/primaryChannel/planner/plans/{plannerPlan%2Did}/goals/$count{?%24filter,%24search}", pathParameters), + } + return m +} +// NewTeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder instantiates a new TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder and sets the default values. +func NewTeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewTeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *int32 when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *RequestInformation when successful +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsCountRequestBuilderGetRequestConfiguration)(*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. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder when successful +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder) WithUrl(rawUrl string)(*TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder) { + return NewTeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/teamwork/2cfe5e0ff73693ca65aa4be8a1e135aea023721254fe2b635b86463f313826eb.go b/teamwork/2cfe5e0ff73693ca65aa4be8a1e135aea023721254fe2b635b86463f313826eb.go new file mode 100644 index 00000000000..cf316a7105c --- /dev/null +++ b/teamwork/2cfe5e0ff73693ca65aa4be8a1e135aea023721254fe2b635b86463f313826eb.go @@ -0,0 +1,87 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package teamwork + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder provides operations to manage the goals property of the microsoft.graph.plannerPlan entity. +type TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetQueryParameters collection of goals in the plan. Read-only. Nullable. +type TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string "uriparametername:\"%24expand\"" + // Select properties to be returned + Select []string "uriparametername:\"%24select\"" +} +// TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetQueryParameters +} +// NewTeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilderInternal instantiates a new TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder and sets the default values. +func NewTeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) { + m := &TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teamwork/teamTemplates/{teamTemplate%2Did}/definitions/{teamTemplateDefinition%2Did}/teamDefinition/primaryChannel/planner/plans/{plannerPlan%2Did}/goals/{plannerGoal%2Did}{?%24expand,%24select}", pathParameters), + } + return m +} +// NewTeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder instantiates a new TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder and sets the default values. +func NewTeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewTeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get collection of goals in the plan. Read-only. Nullable. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a PlannerGoalable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) Get(ctx context.Context, requestConfiguration *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerGoalable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreatePlannerGoalFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerGoalable), nil +} +// ToGetRequestInformation collection of goals in the plan. Read-only. Nullable. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *RequestInformation when successful +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetRequestConfiguration)(*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. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder when successful +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) WithUrl(rawUrl string)(*TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) { + return NewTeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/teamwork/34502859534077769b1db9454ed57cbde88ddd2235786ff9323ccc2acbd1b02f.go b/teamwork/34502859534077769b1db9454ed57cbde88ddd2235786ff9323ccc2acbd1b02f.go new file mode 100644 index 00000000000..17f86f8d219 --- /dev/null +++ b/teamwork/34502859534077769b1db9454ed57cbde88ddd2235786ff9323ccc2acbd1b02f.go @@ -0,0 +1,117 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package teamwork + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsRequestBuilder provides operations to manage the goals property of the microsoft.graph.plannerPlan entity. +type TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsRequestBuilderGetQueryParameters collection of goals in the plan. Read-only. Nullable. +type TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsRequestBuilderGetQueryParameters 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\"" +} +// TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsRequestBuilderGetQueryParameters +} +// ByPlannerGoalId provides operations to manage the goals property of the microsoft.graph.plannerPlan entity. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder when successful +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsRequestBuilder) ByPlannerGoalId(plannerGoalId string)(*TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if plannerGoalId != "" { + urlTplParams["plannerGoal%2Did"] = plannerGoalId + } + return NewTeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsPlannerGoalItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewTeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsRequestBuilderInternal instantiates a new TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsRequestBuilder and sets the default values. +func NewTeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsRequestBuilder) { + m := &TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teamwork/teamTemplates/{teamTemplate%2Did}/definitions/{teamTemplateDefinition%2Did}/teamDefinition/primaryChannel/planner/plans/{plannerPlan%2Did}/goals{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters), + } + return m +} +// NewTeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsRequestBuilder instantiates a new TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsRequestBuilder and sets the default values. +func NewTeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewTeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +// returns a *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder when successful +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsRequestBuilder) Count()(*TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsCountRequestBuilder) { + return NewTeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get collection of goals in the plan. Read-only. Nullable. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a PlannerGoalCollectionResponseable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsRequestBuilder) Get(ctx context.Context, requestConfiguration *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerGoalCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreatePlannerGoalCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerGoalCollectionResponseable), nil +} +// ToGetRequestInformation collection of goals in the plan. Read-only. Nullable. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *RequestInformation when successful +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsRequestBuilderGetRequestConfiguration)(*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. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsRequestBuilder when successful +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsRequestBuilder) WithUrl(rawUrl string)(*TeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsRequestBuilder) { + return NewTeamTemplatesItemDefinitionsItemTeamDefinitionPrimaryChannelPlannerPlansItemGoalsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/teamwork/5155db2faec1c1c730702b1631c67c39a56971e5d1b05814790530cb6b0b50a4.go b/teamwork/5155db2faec1c1c730702b1631c67c39a56971e5d1b05814790530cb6b0b50a4.go index 027b7effe79..21b4216bfcc 100644 --- a/teamwork/5155db2faec1c1c730702b1631c67c39a56971e5d1b05814790530cb6b0b50a4.go +++ b/teamwork/5155db2faec1c1c730702b1631c67c39a56971e5d1b05814790530cb6b0b50a4.go @@ -113,6 +113,11 @@ func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansP func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansPlannerPlanItemRequestBuilder) GetUsageRights()(*TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGetUsageRightsRequestBuilder) { return NewTeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGetUsageRightsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// Goals provides operations to manage the goals property of the microsoft.graph.plannerPlan entity. +// returns a *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsRequestBuilder when successful +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansPlannerPlanItemRequestBuilder) Goals()(*TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsRequestBuilder) { + return NewTeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // HistoryItems provides operations to manage the historyItems property of the microsoft.graph.plannerPlan entity. // returns a *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemHistoryItemsRequestBuilder when successful func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansPlannerPlanItemRequestBuilder) HistoryItems()(*TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemHistoryItemsRequestBuilder) { diff --git a/teamwork/5b2969b6a55e6777c7b9282c7ba850108a5325314c5f5e0d7bc409c94cfe1e41.go b/teamwork/5b2969b6a55e6777c7b9282c7ba850108a5325314c5f5e0d7bc409c94cfe1e41.go new file mode 100644 index 00000000000..07dac60d7d3 --- /dev/null +++ b/teamwork/5b2969b6a55e6777c7b9282c7ba850108a5325314c5f5e0d7bc409c94cfe1e41.go @@ -0,0 +1,86 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package teamwork + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsCountRequestBuilder provides operations to count the resources in the collection. +type TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsCountRequestBuilderGetQueryParameters get the number of the resource +type TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string "uriparametername:\"%24filter\"" + // Search items by search phrases + Search *string "uriparametername:\"%24search\"" +} +// TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsCountRequestBuilderGetQueryParameters +} +// NewTeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsCountRequestBuilderInternal instantiates a new TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsCountRequestBuilder and sets the default values. +func NewTeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsCountRequestBuilder) { + m := &TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teamwork/teamTemplates/{teamTemplate%2Did}/definitions/{teamTemplateDefinition%2Did}/teamDefinition/channels/{channel%2Did}/planner/plans/{plannerPlan%2Did}/goals/$count{?%24filter,%24search}", pathParameters), + } + return m +} +// NewTeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsCountRequestBuilder instantiates a new TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsCountRequestBuilder and sets the default values. +func NewTeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewTeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *int32 when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *RequestInformation when successful +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsCountRequestBuilderGetRequestConfiguration)(*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. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsCountRequestBuilder when successful +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsCountRequestBuilder) WithUrl(rawUrl string)(*TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsCountRequestBuilder) { + return NewTeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/teamwork/ae8cdfaa7870e8f572614c9bd728057f32787914d7132c5da4bf72487152d2f1.go b/teamwork/ae8cdfaa7870e8f572614c9bd728057f32787914d7132c5da4bf72487152d2f1.go new file mode 100644 index 00000000000..2bf11e47600 --- /dev/null +++ b/teamwork/ae8cdfaa7870e8f572614c9bd728057f32787914d7132c5da4bf72487152d2f1.go @@ -0,0 +1,117 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package teamwork + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsRequestBuilder provides operations to manage the goals property of the microsoft.graph.plannerPlan entity. +type TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsRequestBuilderGetQueryParameters collection of goals in the plan. Read-only. Nullable. +type TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsRequestBuilderGetQueryParameters 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\"" +} +// TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsRequestBuilderGetQueryParameters +} +// ByPlannerGoalId provides operations to manage the goals property of the microsoft.graph.plannerPlan entity. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder when successful +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsRequestBuilder) ByPlannerGoalId(plannerGoalId string)(*TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if plannerGoalId != "" { + urlTplParams["plannerGoal%2Did"] = plannerGoalId + } + return NewTeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewTeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsRequestBuilderInternal instantiates a new TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsRequestBuilder and sets the default values. +func NewTeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsRequestBuilder) { + m := &TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teamwork/teamTemplates/{teamTemplate%2Did}/definitions/{teamTemplateDefinition%2Did}/teamDefinition/channels/{channel%2Did}/planner/plans/{plannerPlan%2Did}/goals{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters), + } + return m +} +// NewTeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsRequestBuilder instantiates a new TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsRequestBuilder and sets the default values. +func NewTeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewTeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +// returns a *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsCountRequestBuilder when successful +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsRequestBuilder) Count()(*TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsCountRequestBuilder) { + return NewTeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get collection of goals in the plan. Read-only. Nullable. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a PlannerGoalCollectionResponseable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsRequestBuilder) Get(ctx context.Context, requestConfiguration *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerGoalCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreatePlannerGoalCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerGoalCollectionResponseable), nil +} +// ToGetRequestInformation collection of goals in the plan. Read-only. Nullable. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *RequestInformation when successful +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsRequestBuilderGetRequestConfiguration)(*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. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsRequestBuilder when successful +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsRequestBuilder) WithUrl(rawUrl string)(*TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsRequestBuilder) { + return NewTeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/teamwork/deleted_teams_item_channels_item_planner_plans_item_goals_count_request_builder.go b/teamwork/deleted_teams_item_channels_item_planner_plans_item_goals_count_request_builder.go new file mode 100644 index 00000000000..b282a0daaac --- /dev/null +++ b/teamwork/deleted_teams_item_channels_item_planner_plans_item_goals_count_request_builder.go @@ -0,0 +1,86 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package teamwork + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// DeletedTeamsItemChannelsItemPlannerPlansItemGoalsCountRequestBuilder provides operations to count the resources in the collection. +type DeletedTeamsItemChannelsItemPlannerPlansItemGoalsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// DeletedTeamsItemChannelsItemPlannerPlansItemGoalsCountRequestBuilderGetQueryParameters get the number of the resource +type DeletedTeamsItemChannelsItemPlannerPlansItemGoalsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string "uriparametername:\"%24filter\"" + // Search items by search phrases + Search *string "uriparametername:\"%24search\"" +} +// DeletedTeamsItemChannelsItemPlannerPlansItemGoalsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type DeletedTeamsItemChannelsItemPlannerPlansItemGoalsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *DeletedTeamsItemChannelsItemPlannerPlansItemGoalsCountRequestBuilderGetQueryParameters +} +// NewDeletedTeamsItemChannelsItemPlannerPlansItemGoalsCountRequestBuilderInternal instantiates a new DeletedTeamsItemChannelsItemPlannerPlansItemGoalsCountRequestBuilder and sets the default values. +func NewDeletedTeamsItemChannelsItemPlannerPlansItemGoalsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*DeletedTeamsItemChannelsItemPlannerPlansItemGoalsCountRequestBuilder) { + m := &DeletedTeamsItemChannelsItemPlannerPlansItemGoalsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teamwork/deletedTeams/{deletedTeam%2Did}/channels/{channel%2Did}/planner/plans/{plannerPlan%2Did}/goals/$count{?%24filter,%24search}", pathParameters), + } + return m +} +// NewDeletedTeamsItemChannelsItemPlannerPlansItemGoalsCountRequestBuilder instantiates a new DeletedTeamsItemChannelsItemPlannerPlansItemGoalsCountRequestBuilder and sets the default values. +func NewDeletedTeamsItemChannelsItemPlannerPlansItemGoalsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*DeletedTeamsItemChannelsItemPlannerPlansItemGoalsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewDeletedTeamsItemChannelsItemPlannerPlansItemGoalsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *int32 when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *DeletedTeamsItemChannelsItemPlannerPlansItemGoalsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *DeletedTeamsItemChannelsItemPlannerPlansItemGoalsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *RequestInformation when successful +func (m *DeletedTeamsItemChannelsItemPlannerPlansItemGoalsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *DeletedTeamsItemChannelsItemPlannerPlansItemGoalsCountRequestBuilderGetRequestConfiguration)(*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. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *DeletedTeamsItemChannelsItemPlannerPlansItemGoalsCountRequestBuilder when successful +func (m *DeletedTeamsItemChannelsItemPlannerPlansItemGoalsCountRequestBuilder) WithUrl(rawUrl string)(*DeletedTeamsItemChannelsItemPlannerPlansItemGoalsCountRequestBuilder) { + return NewDeletedTeamsItemChannelsItemPlannerPlansItemGoalsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/teamwork/deleted_teams_item_channels_item_planner_plans_item_goals_planner_goal_item_request_builder.go b/teamwork/deleted_teams_item_channels_item_planner_plans_item_goals_planner_goal_item_request_builder.go new file mode 100644 index 00000000000..616b348d247 --- /dev/null +++ b/teamwork/deleted_teams_item_channels_item_planner_plans_item_goals_planner_goal_item_request_builder.go @@ -0,0 +1,87 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package teamwork + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// DeletedTeamsItemChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder provides operations to manage the goals property of the microsoft.graph.plannerPlan entity. +type DeletedTeamsItemChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// DeletedTeamsItemChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetQueryParameters collection of goals in the plan. Read-only. Nullable. +type DeletedTeamsItemChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string "uriparametername:\"%24expand\"" + // Select properties to be returned + Select []string "uriparametername:\"%24select\"" +} +// DeletedTeamsItemChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type DeletedTeamsItemChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *DeletedTeamsItemChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetQueryParameters +} +// NewDeletedTeamsItemChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderInternal instantiates a new DeletedTeamsItemChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder and sets the default values. +func NewDeletedTeamsItemChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*DeletedTeamsItemChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) { + m := &DeletedTeamsItemChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teamwork/deletedTeams/{deletedTeam%2Did}/channels/{channel%2Did}/planner/plans/{plannerPlan%2Did}/goals/{plannerGoal%2Did}{?%24expand,%24select}", pathParameters), + } + return m +} +// NewDeletedTeamsItemChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder instantiates a new DeletedTeamsItemChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder and sets the default values. +func NewDeletedTeamsItemChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*DeletedTeamsItemChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewDeletedTeamsItemChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get collection of goals in the plan. Read-only. Nullable. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a PlannerGoalable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *DeletedTeamsItemChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) Get(ctx context.Context, requestConfiguration *DeletedTeamsItemChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerGoalable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreatePlannerGoalFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerGoalable), nil +} +// ToGetRequestInformation collection of goals in the plan. Read-only. Nullable. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *RequestInformation when successful +func (m *DeletedTeamsItemChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *DeletedTeamsItemChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetRequestConfiguration)(*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. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *DeletedTeamsItemChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder when successful +func (m *DeletedTeamsItemChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) WithUrl(rawUrl string)(*DeletedTeamsItemChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) { + return NewDeletedTeamsItemChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/teamwork/deleted_teams_item_channels_item_planner_plans_item_goals_request_builder.go b/teamwork/deleted_teams_item_channels_item_planner_plans_item_goals_request_builder.go new file mode 100644 index 00000000000..622493c8a91 --- /dev/null +++ b/teamwork/deleted_teams_item_channels_item_planner_plans_item_goals_request_builder.go @@ -0,0 +1,117 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package teamwork + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// DeletedTeamsItemChannelsItemPlannerPlansItemGoalsRequestBuilder provides operations to manage the goals property of the microsoft.graph.plannerPlan entity. +type DeletedTeamsItemChannelsItemPlannerPlansItemGoalsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// DeletedTeamsItemChannelsItemPlannerPlansItemGoalsRequestBuilderGetQueryParameters collection of goals in the plan. Read-only. Nullable. +type DeletedTeamsItemChannelsItemPlannerPlansItemGoalsRequestBuilderGetQueryParameters 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\"" +} +// DeletedTeamsItemChannelsItemPlannerPlansItemGoalsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type DeletedTeamsItemChannelsItemPlannerPlansItemGoalsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *DeletedTeamsItemChannelsItemPlannerPlansItemGoalsRequestBuilderGetQueryParameters +} +// ByPlannerGoalId provides operations to manage the goals property of the microsoft.graph.plannerPlan entity. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *DeletedTeamsItemChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder when successful +func (m *DeletedTeamsItemChannelsItemPlannerPlansItemGoalsRequestBuilder) ByPlannerGoalId(plannerGoalId string)(*DeletedTeamsItemChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if plannerGoalId != "" { + urlTplParams["plannerGoal%2Did"] = plannerGoalId + } + return NewDeletedTeamsItemChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewDeletedTeamsItemChannelsItemPlannerPlansItemGoalsRequestBuilderInternal instantiates a new DeletedTeamsItemChannelsItemPlannerPlansItemGoalsRequestBuilder and sets the default values. +func NewDeletedTeamsItemChannelsItemPlannerPlansItemGoalsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*DeletedTeamsItemChannelsItemPlannerPlansItemGoalsRequestBuilder) { + m := &DeletedTeamsItemChannelsItemPlannerPlansItemGoalsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teamwork/deletedTeams/{deletedTeam%2Did}/channels/{channel%2Did}/planner/plans/{plannerPlan%2Did}/goals{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters), + } + return m +} +// NewDeletedTeamsItemChannelsItemPlannerPlansItemGoalsRequestBuilder instantiates a new DeletedTeamsItemChannelsItemPlannerPlansItemGoalsRequestBuilder and sets the default values. +func NewDeletedTeamsItemChannelsItemPlannerPlansItemGoalsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*DeletedTeamsItemChannelsItemPlannerPlansItemGoalsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewDeletedTeamsItemChannelsItemPlannerPlansItemGoalsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +// returns a *DeletedTeamsItemChannelsItemPlannerPlansItemGoalsCountRequestBuilder when successful +func (m *DeletedTeamsItemChannelsItemPlannerPlansItemGoalsRequestBuilder) Count()(*DeletedTeamsItemChannelsItemPlannerPlansItemGoalsCountRequestBuilder) { + return NewDeletedTeamsItemChannelsItemPlannerPlansItemGoalsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get collection of goals in the plan. Read-only. Nullable. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a PlannerGoalCollectionResponseable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *DeletedTeamsItemChannelsItemPlannerPlansItemGoalsRequestBuilder) Get(ctx context.Context, requestConfiguration *DeletedTeamsItemChannelsItemPlannerPlansItemGoalsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerGoalCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreatePlannerGoalCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerGoalCollectionResponseable), nil +} +// ToGetRequestInformation collection of goals in the plan. Read-only. Nullable. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *RequestInformation when successful +func (m *DeletedTeamsItemChannelsItemPlannerPlansItemGoalsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *DeletedTeamsItemChannelsItemPlannerPlansItemGoalsRequestBuilderGetRequestConfiguration)(*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. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *DeletedTeamsItemChannelsItemPlannerPlansItemGoalsRequestBuilder when successful +func (m *DeletedTeamsItemChannelsItemPlannerPlansItemGoalsRequestBuilder) WithUrl(rawUrl string)(*DeletedTeamsItemChannelsItemPlannerPlansItemGoalsRequestBuilder) { + return NewDeletedTeamsItemChannelsItemPlannerPlansItemGoalsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/teamwork/deleted_teams_item_channels_item_planner_plans_planner_plan_item_request_builder.go b/teamwork/deleted_teams_item_channels_item_planner_plans_planner_plan_item_request_builder.go index aba3404f9f7..f56ea97c6ad 100644 --- a/teamwork/deleted_teams_item_channels_item_planner_plans_planner_plan_item_request_builder.go +++ b/teamwork/deleted_teams_item_channels_item_planner_plans_planner_plan_item_request_builder.go @@ -113,6 +113,11 @@ func (m *DeletedTeamsItemChannelsItemPlannerPlansPlannerPlanItemRequestBuilder) func (m *DeletedTeamsItemChannelsItemPlannerPlansPlannerPlanItemRequestBuilder) GetUsageRights()(*DeletedTeamsItemChannelsItemPlannerPlansItemGetUsageRightsRequestBuilder) { return NewDeletedTeamsItemChannelsItemPlannerPlansItemGetUsageRightsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// Goals provides operations to manage the goals property of the microsoft.graph.plannerPlan entity. +// returns a *DeletedTeamsItemChannelsItemPlannerPlansItemGoalsRequestBuilder when successful +func (m *DeletedTeamsItemChannelsItemPlannerPlansPlannerPlanItemRequestBuilder) Goals()(*DeletedTeamsItemChannelsItemPlannerPlansItemGoalsRequestBuilder) { + return NewDeletedTeamsItemChannelsItemPlannerPlansItemGoalsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // HistoryItems provides operations to manage the historyItems property of the microsoft.graph.plannerPlan entity. // returns a *DeletedTeamsItemChannelsItemPlannerPlansItemHistoryItemsRequestBuilder when successful func (m *DeletedTeamsItemChannelsItemPlannerPlansPlannerPlanItemRequestBuilder) HistoryItems()(*DeletedTeamsItemChannelsItemPlannerPlansItemHistoryItemsRequestBuilder) { diff --git a/teamwork/df4371dd455d298044b2ffec0e430b81c50a9c85a01d5f887f69b02d50a476e5.go b/teamwork/df4371dd455d298044b2ffec0e430b81c50a9c85a01d5f887f69b02d50a476e5.go new file mode 100644 index 00000000000..93e966d17ca --- /dev/null +++ b/teamwork/df4371dd455d298044b2ffec0e430b81c50a9c85a01d5f887f69b02d50a476e5.go @@ -0,0 +1,87 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package teamwork + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder provides operations to manage the goals property of the microsoft.graph.plannerPlan entity. +type TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetQueryParameters collection of goals in the plan. Read-only. Nullable. +type TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string "uriparametername:\"%24expand\"" + // Select properties to be returned + Select []string "uriparametername:\"%24select\"" +} +// TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetQueryParameters +} +// NewTeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderInternal instantiates a new TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder and sets the default values. +func NewTeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) { + m := &TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/teamwork/teamTemplates/{teamTemplate%2Did}/definitions/{teamTemplateDefinition%2Did}/teamDefinition/channels/{channel%2Did}/planner/plans/{plannerPlan%2Did}/goals/{plannerGoal%2Did}{?%24expand,%24select}", pathParameters), + } + return m +} +// NewTeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder instantiates a new TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder and sets the default values. +func NewTeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewTeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get collection of goals in the plan. Read-only. Nullable. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a PlannerGoalable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) Get(ctx context.Context, requestConfiguration *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerGoalable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreatePlannerGoalFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerGoalable), nil +} +// ToGetRequestInformation collection of goals in the plan. Read-only. Nullable. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *RequestInformation when successful +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetRequestConfiguration)(*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. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder when successful +func (m *TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) WithUrl(rawUrl string)(*TeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) { + return NewTeamTemplatesItemDefinitionsItemTeamDefinitionChannelsItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/users/639a8e5177a11d17f6fae509f574cb5fcc5157caa484ca0217bc01a5ded9e51d.go b/users/639a8e5177a11d17f6fae509f574cb5fcc5157caa484ca0217bc01a5ded9e51d.go new file mode 100644 index 00000000000..c99c8eaf23e --- /dev/null +++ b/users/639a8e5177a11d17f6fae509f574cb5fcc5157caa484ca0217bc01a5ded9e51d.go @@ -0,0 +1,129 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package users + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemAuthenticationResourceAccountKeyAuthenticationMethodsResourceAccountKeyAuthenticationMethodItemRequestBuilder provides operations to manage the resourceAccountKeyAuthenticationMethods property of the microsoft.graph.authentication entity. +type ItemAuthenticationResourceAccountKeyAuthenticationMethodsResourceAccountKeyAuthenticationMethodItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemAuthenticationResourceAccountKeyAuthenticationMethodsResourceAccountKeyAuthenticationMethodItemRequestBuilderDeleteRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemAuthenticationResourceAccountKeyAuthenticationMethodsResourceAccountKeyAuthenticationMethodItemRequestBuilderDeleteRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} +// ItemAuthenticationResourceAccountKeyAuthenticationMethodsResourceAccountKeyAuthenticationMethodItemRequestBuilderGetQueryParameters read the properties and relationships of a resourceAccountKeyAuthenticationMethod object. +type ItemAuthenticationResourceAccountKeyAuthenticationMethodsResourceAccountKeyAuthenticationMethodItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string "uriparametername:\"%24expand\"" + // Select properties to be returned + Select []string "uriparametername:\"%24select\"" +} +// ItemAuthenticationResourceAccountKeyAuthenticationMethodsResourceAccountKeyAuthenticationMethodItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemAuthenticationResourceAccountKeyAuthenticationMethodsResourceAccountKeyAuthenticationMethodItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemAuthenticationResourceAccountKeyAuthenticationMethodsResourceAccountKeyAuthenticationMethodItemRequestBuilderGetQueryParameters +} +// NewItemAuthenticationResourceAccountKeyAuthenticationMethodsResourceAccountKeyAuthenticationMethodItemRequestBuilderInternal instantiates a new ItemAuthenticationResourceAccountKeyAuthenticationMethodsResourceAccountKeyAuthenticationMethodItemRequestBuilder and sets the default values. +func NewItemAuthenticationResourceAccountKeyAuthenticationMethodsResourceAccountKeyAuthenticationMethodItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemAuthenticationResourceAccountKeyAuthenticationMethodsResourceAccountKeyAuthenticationMethodItemRequestBuilder) { + m := &ItemAuthenticationResourceAccountKeyAuthenticationMethodsResourceAccountKeyAuthenticationMethodItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/users/{user%2Did}/authentication/resourceAccountKeyAuthenticationMethods/{resourceAccountKeyAuthenticationMethod%2Did}{?%24expand,%24select}", pathParameters), + } + return m +} +// NewItemAuthenticationResourceAccountKeyAuthenticationMethodsResourceAccountKeyAuthenticationMethodItemRequestBuilder instantiates a new ItemAuthenticationResourceAccountKeyAuthenticationMethodsResourceAccountKeyAuthenticationMethodItemRequestBuilder and sets the default values. +func NewItemAuthenticationResourceAccountKeyAuthenticationMethodsResourceAccountKeyAuthenticationMethodItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemAuthenticationResourceAccountKeyAuthenticationMethodsResourceAccountKeyAuthenticationMethodItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemAuthenticationResourceAccountKeyAuthenticationMethodsResourceAccountKeyAuthenticationMethodItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete delete a resourceAccountKeyAuthenticationMethod object. +// returns a ODataError error when the service returns a 4XX or 5XX status code +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/resourceaccountkeyauthenticationmethod-delete?view=graph-rest-beta +func (m *ItemAuthenticationResourceAccountKeyAuthenticationMethodsResourceAccountKeyAuthenticationMethodItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *ItemAuthenticationResourceAccountKeyAuthenticationMethodsResourceAccountKeyAuthenticationMethodItemRequestBuilderDeleteRequestConfiguration)(error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); + if err != nil { + return err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, errorMapping) + if err != nil { + return err + } + return nil +} +// Device provides operations to manage the device property of the microsoft.graph.resourceAccountKeyAuthenticationMethod entity. +// returns a *ItemAuthenticationResourceAccountKeyAuthenticationMethodsItemDeviceRequestBuilder when successful +func (m *ItemAuthenticationResourceAccountKeyAuthenticationMethodsResourceAccountKeyAuthenticationMethodItemRequestBuilder) Device()(*ItemAuthenticationResourceAccountKeyAuthenticationMethodsItemDeviceRequestBuilder) { + return NewItemAuthenticationResourceAccountKeyAuthenticationMethodsItemDeviceRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get read the properties and relationships of a resourceAccountKeyAuthenticationMethod object. +// returns a ResourceAccountKeyAuthenticationMethodable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/resourceaccountkeyauthenticationmethod-get?view=graph-rest-beta +func (m *ItemAuthenticationResourceAccountKeyAuthenticationMethodsResourceAccountKeyAuthenticationMethodItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemAuthenticationResourceAccountKeyAuthenticationMethodsResourceAccountKeyAuthenticationMethodItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ResourceAccountKeyAuthenticationMethodable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateResourceAccountKeyAuthenticationMethodFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ResourceAccountKeyAuthenticationMethodable), nil +} +// ToDeleteRequestInformation delete a resourceAccountKeyAuthenticationMethod object. +// returns a *RequestInformation when successful +func (m *ItemAuthenticationResourceAccountKeyAuthenticationMethodsResourceAccountKeyAuthenticationMethodItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *ItemAuthenticationResourceAccountKeyAuthenticationMethodsResourceAccountKeyAuthenticationMethodItemRequestBuilderDeleteRequestConfiguration)(*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 resourceAccountKeyAuthenticationMethod object. +// returns a *RequestInformation when successful +func (m *ItemAuthenticationResourceAccountKeyAuthenticationMethodsResourceAccountKeyAuthenticationMethodItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemAuthenticationResourceAccountKeyAuthenticationMethodsResourceAccountKeyAuthenticationMethodItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemAuthenticationResourceAccountKeyAuthenticationMethodsResourceAccountKeyAuthenticationMethodItemRequestBuilder when successful +func (m *ItemAuthenticationResourceAccountKeyAuthenticationMethodsResourceAccountKeyAuthenticationMethodItemRequestBuilder) WithUrl(rawUrl string)(*ItemAuthenticationResourceAccountKeyAuthenticationMethodsResourceAccountKeyAuthenticationMethodItemRequestBuilder) { + return NewItemAuthenticationResourceAccountKeyAuthenticationMethodsResourceAccountKeyAuthenticationMethodItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/users/item_authentication_request_builder.go b/users/item_authentication_request_builder.go index 3bc9c37ef52..a7b22e2fa8b 100644 --- a/users/item_authentication_request_builder.go +++ b/users/item_authentication_request_builder.go @@ -178,6 +178,11 @@ func (m *ItemAuthenticationRequestBuilder) QrCodePinMethod()(*ItemAuthentication func (m *ItemAuthenticationRequestBuilder) Requirements()(*ItemAuthenticationRequirementsRequestBuilder) { return NewItemAuthenticationRequirementsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ResourceAccountKeyAuthenticationMethods provides operations to manage the resourceAccountKeyAuthenticationMethods property of the microsoft.graph.authentication entity. +// returns a *ItemAuthenticationResourceAccountKeyAuthenticationMethodsRequestBuilder when successful +func (m *ItemAuthenticationRequestBuilder) ResourceAccountKeyAuthenticationMethods()(*ItemAuthenticationResourceAccountKeyAuthenticationMethodsRequestBuilder) { + return NewItemAuthenticationResourceAccountKeyAuthenticationMethodsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // SignInPreferences the signInPreferences property // returns a *ItemAuthenticationSignInPreferencesRequestBuilder when successful func (m *ItemAuthenticationRequestBuilder) SignInPreferences()(*ItemAuthenticationSignInPreferencesRequestBuilder) { diff --git a/users/item_authentication_resource_account_key_authentication_methods_count_request_builder.go b/users/item_authentication_resource_account_key_authentication_methods_count_request_builder.go new file mode 100644 index 00000000000..0db77d10089 --- /dev/null +++ b/users/item_authentication_resource_account_key_authentication_methods_count_request_builder.go @@ -0,0 +1,83 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package users + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemAuthenticationResourceAccountKeyAuthenticationMethodsCountRequestBuilder provides operations to count the resources in the collection. +type ItemAuthenticationResourceAccountKeyAuthenticationMethodsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemAuthenticationResourceAccountKeyAuthenticationMethodsCountRequestBuilderGetQueryParameters get the number of the resource +type ItemAuthenticationResourceAccountKeyAuthenticationMethodsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string "uriparametername:\"%24filter\"" + // Search items by search phrases + Search *string "uriparametername:\"%24search\"" +} +// ItemAuthenticationResourceAccountKeyAuthenticationMethodsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemAuthenticationResourceAccountKeyAuthenticationMethodsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemAuthenticationResourceAccountKeyAuthenticationMethodsCountRequestBuilderGetQueryParameters +} +// NewItemAuthenticationResourceAccountKeyAuthenticationMethodsCountRequestBuilderInternal instantiates a new ItemAuthenticationResourceAccountKeyAuthenticationMethodsCountRequestBuilder and sets the default values. +func NewItemAuthenticationResourceAccountKeyAuthenticationMethodsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemAuthenticationResourceAccountKeyAuthenticationMethodsCountRequestBuilder) { + m := &ItemAuthenticationResourceAccountKeyAuthenticationMethodsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/users/{user%2Did}/authentication/resourceAccountKeyAuthenticationMethods/$count{?%24filter,%24search}", pathParameters), + } + return m +} +// NewItemAuthenticationResourceAccountKeyAuthenticationMethodsCountRequestBuilder instantiates a new ItemAuthenticationResourceAccountKeyAuthenticationMethodsCountRequestBuilder and sets the default values. +func NewItemAuthenticationResourceAccountKeyAuthenticationMethodsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemAuthenticationResourceAccountKeyAuthenticationMethodsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemAuthenticationResourceAccountKeyAuthenticationMethodsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +// returns a *int32 when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *ItemAuthenticationResourceAccountKeyAuthenticationMethodsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemAuthenticationResourceAccountKeyAuthenticationMethodsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +// returns a *RequestInformation when successful +func (m *ItemAuthenticationResourceAccountKeyAuthenticationMethodsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemAuthenticationResourceAccountKeyAuthenticationMethodsCountRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemAuthenticationResourceAccountKeyAuthenticationMethodsCountRequestBuilder when successful +func (m *ItemAuthenticationResourceAccountKeyAuthenticationMethodsCountRequestBuilder) WithUrl(rawUrl string)(*ItemAuthenticationResourceAccountKeyAuthenticationMethodsCountRequestBuilder) { + return NewItemAuthenticationResourceAccountKeyAuthenticationMethodsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/users/item_authentication_resource_account_key_authentication_methods_item_device_request_builder.go b/users/item_authentication_resource_account_key_authentication_methods_item_device_request_builder.go new file mode 100644 index 00000000000..ddc0b35ed5f --- /dev/null +++ b/users/item_authentication_resource_account_key_authentication_methods_item_device_request_builder.go @@ -0,0 +1,84 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package users + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemAuthenticationResourceAccountKeyAuthenticationMethodsItemDeviceRequestBuilder provides operations to manage the device property of the microsoft.graph.resourceAccountKeyAuthenticationMethod entity. +type ItemAuthenticationResourceAccountKeyAuthenticationMethodsItemDeviceRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemAuthenticationResourceAccountKeyAuthenticationMethodsItemDeviceRequestBuilderGetQueryParameters the registered device on which this resource account key resides. Supports $expand. +type ItemAuthenticationResourceAccountKeyAuthenticationMethodsItemDeviceRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string "uriparametername:\"%24expand\"" + // Select properties to be returned + Select []string "uriparametername:\"%24select\"" +} +// ItemAuthenticationResourceAccountKeyAuthenticationMethodsItemDeviceRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemAuthenticationResourceAccountKeyAuthenticationMethodsItemDeviceRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemAuthenticationResourceAccountKeyAuthenticationMethodsItemDeviceRequestBuilderGetQueryParameters +} +// NewItemAuthenticationResourceAccountKeyAuthenticationMethodsItemDeviceRequestBuilderInternal instantiates a new ItemAuthenticationResourceAccountKeyAuthenticationMethodsItemDeviceRequestBuilder and sets the default values. +func NewItemAuthenticationResourceAccountKeyAuthenticationMethodsItemDeviceRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemAuthenticationResourceAccountKeyAuthenticationMethodsItemDeviceRequestBuilder) { + m := &ItemAuthenticationResourceAccountKeyAuthenticationMethodsItemDeviceRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/users/{user%2Did}/authentication/resourceAccountKeyAuthenticationMethods/{resourceAccountKeyAuthenticationMethod%2Did}/device{?%24expand,%24select}", pathParameters), + } + return m +} +// NewItemAuthenticationResourceAccountKeyAuthenticationMethodsItemDeviceRequestBuilder instantiates a new ItemAuthenticationResourceAccountKeyAuthenticationMethodsItemDeviceRequestBuilder and sets the default values. +func NewItemAuthenticationResourceAccountKeyAuthenticationMethodsItemDeviceRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemAuthenticationResourceAccountKeyAuthenticationMethodsItemDeviceRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemAuthenticationResourceAccountKeyAuthenticationMethodsItemDeviceRequestBuilderInternal(urlParams, requestAdapter) +} +// Get the registered device on which this resource account key resides. Supports $expand. +// returns a Deviceable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *ItemAuthenticationResourceAccountKeyAuthenticationMethodsItemDeviceRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemAuthenticationResourceAccountKeyAuthenticationMethodsItemDeviceRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Deviceable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateDeviceFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.Deviceable), nil +} +// ToGetRequestInformation the registered device on which this resource account key resides. Supports $expand. +// returns a *RequestInformation when successful +func (m *ItemAuthenticationResourceAccountKeyAuthenticationMethodsItemDeviceRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemAuthenticationResourceAccountKeyAuthenticationMethodsItemDeviceRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemAuthenticationResourceAccountKeyAuthenticationMethodsItemDeviceRequestBuilder when successful +func (m *ItemAuthenticationResourceAccountKeyAuthenticationMethodsItemDeviceRequestBuilder) WithUrl(rawUrl string)(*ItemAuthenticationResourceAccountKeyAuthenticationMethodsItemDeviceRequestBuilder) { + return NewItemAuthenticationResourceAccountKeyAuthenticationMethodsItemDeviceRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/users/item_authentication_resource_account_key_authentication_methods_request_builder.go b/users/item_authentication_resource_account_key_authentication_methods_request_builder.go new file mode 100644 index 00000000000..f72b3df3f86 --- /dev/null +++ b/users/item_authentication_resource_account_key_authentication_methods_request_builder.go @@ -0,0 +1,116 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package users + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemAuthenticationResourceAccountKeyAuthenticationMethodsRequestBuilder provides operations to manage the resourceAccountKeyAuthenticationMethods property of the microsoft.graph.authentication entity. +type ItemAuthenticationResourceAccountKeyAuthenticationMethodsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemAuthenticationResourceAccountKeyAuthenticationMethodsRequestBuilderGetQueryParameters retrieve a list of the resourceAccountKeyAuthenticationMethod objects and their properties for a resource account. +type ItemAuthenticationResourceAccountKeyAuthenticationMethodsRequestBuilderGetQueryParameters 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\"" +} +// ItemAuthenticationResourceAccountKeyAuthenticationMethodsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemAuthenticationResourceAccountKeyAuthenticationMethodsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemAuthenticationResourceAccountKeyAuthenticationMethodsRequestBuilderGetQueryParameters +} +// ByResourceAccountKeyAuthenticationMethodId provides operations to manage the resourceAccountKeyAuthenticationMethods property of the microsoft.graph.authentication entity. +// returns a *ItemAuthenticationResourceAccountKeyAuthenticationMethodsResourceAccountKeyAuthenticationMethodItemRequestBuilder when successful +func (m *ItemAuthenticationResourceAccountKeyAuthenticationMethodsRequestBuilder) ByResourceAccountKeyAuthenticationMethodId(resourceAccountKeyAuthenticationMethodId string)(*ItemAuthenticationResourceAccountKeyAuthenticationMethodsResourceAccountKeyAuthenticationMethodItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if resourceAccountKeyAuthenticationMethodId != "" { + urlTplParams["resourceAccountKeyAuthenticationMethod%2Did"] = resourceAccountKeyAuthenticationMethodId + } + return NewItemAuthenticationResourceAccountKeyAuthenticationMethodsResourceAccountKeyAuthenticationMethodItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemAuthenticationResourceAccountKeyAuthenticationMethodsRequestBuilderInternal instantiates a new ItemAuthenticationResourceAccountKeyAuthenticationMethodsRequestBuilder and sets the default values. +func NewItemAuthenticationResourceAccountKeyAuthenticationMethodsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemAuthenticationResourceAccountKeyAuthenticationMethodsRequestBuilder) { + m := &ItemAuthenticationResourceAccountKeyAuthenticationMethodsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/users/{user%2Did}/authentication/resourceAccountKeyAuthenticationMethods{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters), + } + return m +} +// NewItemAuthenticationResourceAccountKeyAuthenticationMethodsRequestBuilder instantiates a new ItemAuthenticationResourceAccountKeyAuthenticationMethodsRequestBuilder and sets the default values. +func NewItemAuthenticationResourceAccountKeyAuthenticationMethodsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemAuthenticationResourceAccountKeyAuthenticationMethodsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemAuthenticationResourceAccountKeyAuthenticationMethodsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +// returns a *ItemAuthenticationResourceAccountKeyAuthenticationMethodsCountRequestBuilder when successful +func (m *ItemAuthenticationResourceAccountKeyAuthenticationMethodsRequestBuilder) Count()(*ItemAuthenticationResourceAccountKeyAuthenticationMethodsCountRequestBuilder) { + return NewItemAuthenticationResourceAccountKeyAuthenticationMethodsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get retrieve a list of the resourceAccountKeyAuthenticationMethod objects and their properties for a resource account. +// returns a ResourceAccountKeyAuthenticationMethodCollectionResponseable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +// [Find more info here] +// +// [Find more info here]: https://learn.microsoft.com/graph/api/authentication-list-resourceaccountkeyauthenticationmethods?view=graph-rest-beta +func (m *ItemAuthenticationResourceAccountKeyAuthenticationMethodsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemAuthenticationResourceAccountKeyAuthenticationMethodsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ResourceAccountKeyAuthenticationMethodCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreateResourceAccountKeyAuthenticationMethodCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.ResourceAccountKeyAuthenticationMethodCollectionResponseable), nil +} +// ToGetRequestInformation retrieve a list of the resourceAccountKeyAuthenticationMethod objects and their properties for a resource account. +// returns a *RequestInformation when successful +func (m *ItemAuthenticationResourceAccountKeyAuthenticationMethodsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemAuthenticationResourceAccountKeyAuthenticationMethodsRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + if requestConfiguration.QueryParameters != nil { + requestInfo.AddQueryParameters(*(requestConfiguration.QueryParameters)) + } + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemAuthenticationResourceAccountKeyAuthenticationMethodsRequestBuilder when successful +func (m *ItemAuthenticationResourceAccountKeyAuthenticationMethodsRequestBuilder) WithUrl(rawUrl string)(*ItemAuthenticationResourceAccountKeyAuthenticationMethodsRequestBuilder) { + return NewItemAuthenticationResourceAccountKeyAuthenticationMethodsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/users/item_chats_item_targeted_messages_request_builder.go b/users/item_chats_item_targeted_messages_request_builder.go index e2f2a05bde1..f35b9fdbea3 100644 --- a/users/item_chats_item_targeted_messages_request_builder.go +++ b/users/item_chats_item_targeted_messages_request_builder.go @@ -14,7 +14,7 @@ import ( type ItemChatsItemTargetedMessagesRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ItemChatsItemTargetedMessagesRequestBuilderGetQueryParameters a collection of targeted messages in the chat that are visible only to specific users. Nullable. +// ItemChatsItemTargetedMessagesRequestBuilderGetQueryParameters a collection of targeted messages in the chat that are visible only to specific users. Nullable. You can't expand this relationship using $expand. Targeted messages can also be retrieved via the userTeamwork: getAllTargetedMessages API. type ItemChatsItemTargetedMessagesRequestBuilderGetQueryParameters struct { // Include count of items Count *bool "uriparametername:\"%24count\"" @@ -79,7 +79,7 @@ func NewItemChatsItemTargetedMessagesRequestBuilder(rawUrl string, requestAdapte func (m *ItemChatsItemTargetedMessagesRequestBuilder) Count()(*ItemChatsItemTargetedMessagesCountRequestBuilder) { return NewItemChatsItemTargetedMessagesCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Get a collection of targeted messages in the chat that are visible only to specific users. Nullable. +// Get a collection of targeted messages in the chat that are visible only to specific users. Nullable. You can't expand this relationship using $expand. Targeted messages can also be retrieved via the userTeamwork: getAllTargetedMessages API. // returns a TargetedChatMessageCollectionResponseable when successful // returns a ODataError error when the service returns a 4XX or 5XX status code func (m *ItemChatsItemTargetedMessagesRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemChatsItemTargetedMessagesRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.TargetedChatMessageCollectionResponseable, error) { @@ -119,7 +119,7 @@ func (m *ItemChatsItemTargetedMessagesRequestBuilder) Post(ctx context.Context, } return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.TargetedChatMessageable), nil } -// ToGetRequestInformation a collection of targeted messages in the chat that are visible only to specific users. Nullable. +// ToGetRequestInformation a collection of targeted messages in the chat that are visible only to specific users. Nullable. You can't expand this relationship using $expand. Targeted messages can also be retrieved via the userTeamwork: getAllTargetedMessages API. // returns a *RequestInformation when successful func (m *ItemChatsItemTargetedMessagesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemChatsItemTargetedMessagesRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/users/item_chats_item_targeted_messages_targeted_chat_message_item_request_builder.go b/users/item_chats_item_targeted_messages_targeted_chat_message_item_request_builder.go index 017a90c110a..087e45de7cd 100644 --- a/users/item_chats_item_targeted_messages_targeted_chat_message_item_request_builder.go +++ b/users/item_chats_item_targeted_messages_targeted_chat_message_item_request_builder.go @@ -21,7 +21,7 @@ type ItemChatsItemTargetedMessagesTargetedChatMessageItemRequestBuilderDeleteReq // Request options Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption } -// ItemChatsItemTargetedMessagesTargetedChatMessageItemRequestBuilderGetQueryParameters a collection of targeted messages in the chat that are visible only to specific users. Nullable. +// ItemChatsItemTargetedMessagesTargetedChatMessageItemRequestBuilderGetQueryParameters a collection of targeted messages in the chat that are visible only to specific users. Nullable. You can't expand this relationship using $expand. Targeted messages can also be retrieved via the userTeamwork: getAllTargetedMessages API. type ItemChatsItemTargetedMessagesTargetedChatMessageItemRequestBuilderGetQueryParameters struct { // Expand related entities Expand []string "uriparametername:\"%24expand\"" @@ -76,7 +76,7 @@ func (m *ItemChatsItemTargetedMessagesTargetedChatMessageItemRequestBuilder) Del } return nil } -// Get a collection of targeted messages in the chat that are visible only to specific users. Nullable. +// Get a collection of targeted messages in the chat that are visible only to specific users. Nullable. You can't expand this relationship using $expand. Targeted messages can also be retrieved via the userTeamwork: getAllTargetedMessages API. // returns a TargetedChatMessageable when successful // returns a ODataError error when the service returns a 4XX or 5XX status code func (m *ItemChatsItemTargetedMessagesTargetedChatMessageItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemChatsItemTargetedMessagesTargetedChatMessageItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.TargetedChatMessageable, error) { @@ -137,7 +137,7 @@ func (m *ItemChatsItemTargetedMessagesTargetedChatMessageItemRequestBuilder) ToD requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToGetRequestInformation a collection of targeted messages in the chat that are visible only to specific users. Nullable. +// ToGetRequestInformation a collection of targeted messages in the chat that are visible only to specific users. Nullable. You can't expand this relationship using $expand. Targeted messages can also be retrieved via the userTeamwork: getAllTargetedMessages API. // returns a *RequestInformation when successful func (m *ItemChatsItemTargetedMessagesTargetedChatMessageItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemChatsItemTargetedMessagesTargetedChatMessageItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/users/item_planner_plans_item_goals_count_request_builder.go b/users/item_planner_plans_item_goals_count_request_builder.go new file mode 100644 index 00000000000..79f9db89410 --- /dev/null +++ b/users/item_planner_plans_item_goals_count_request_builder.go @@ -0,0 +1,86 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package users + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemPlannerPlansItemGoalsCountRequestBuilder provides operations to count the resources in the collection. +type ItemPlannerPlansItemGoalsCountRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemPlannerPlansItemGoalsCountRequestBuilderGetQueryParameters get the number of the resource +type ItemPlannerPlansItemGoalsCountRequestBuilderGetQueryParameters struct { + // Filter items by property values + Filter *string "uriparametername:\"%24filter\"" + // Search items by search phrases + Search *string "uriparametername:\"%24search\"" +} +// ItemPlannerPlansItemGoalsCountRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemPlannerPlansItemGoalsCountRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemPlannerPlansItemGoalsCountRequestBuilderGetQueryParameters +} +// NewItemPlannerPlansItemGoalsCountRequestBuilderInternal instantiates a new ItemPlannerPlansItemGoalsCountRequestBuilder and sets the default values. +func NewItemPlannerPlansItemGoalsCountRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPlannerPlansItemGoalsCountRequestBuilder) { + m := &ItemPlannerPlansItemGoalsCountRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/users/{user%2Did}/planner/plans/{plannerPlan%2Did}/goals/$count{?%24filter,%24search}", pathParameters), + } + return m +} +// NewItemPlannerPlansItemGoalsCountRequestBuilder instantiates a new ItemPlannerPlansItemGoalsCountRequestBuilder and sets the default values. +func NewItemPlannerPlansItemGoalsCountRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPlannerPlansItemGoalsCountRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemPlannerPlansItemGoalsCountRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of the resource +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *int32 when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *ItemPlannerPlansItemGoalsCountRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemPlannerPlansItemGoalsCountRequestBuilderGetRequestConfiguration)(*int32, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "int32", errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(*int32), nil +} +// ToGetRequestInformation get the number of the resource +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *RequestInformation when successful +func (m *ItemPlannerPlansItemGoalsCountRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemPlannerPlansItemGoalsCountRequestBuilderGetRequestConfiguration)(*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. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *ItemPlannerPlansItemGoalsCountRequestBuilder when successful +func (m *ItemPlannerPlansItemGoalsCountRequestBuilder) WithUrl(rawUrl string)(*ItemPlannerPlansItemGoalsCountRequestBuilder) { + return NewItemPlannerPlansItemGoalsCountRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/users/item_planner_plans_item_goals_planner_goal_item_request_builder.go b/users/item_planner_plans_item_goals_planner_goal_item_request_builder.go new file mode 100644 index 00000000000..973cbc4f49f --- /dev/null +++ b/users/item_planner_plans_item_goals_planner_goal_item_request_builder.go @@ -0,0 +1,87 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package users + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder provides operations to manage the goals property of the microsoft.graph.plannerPlan entity. +type ItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetQueryParameters collection of goals in the plan. Read-only. Nullable. +type ItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetQueryParameters struct { + // Expand related entities + Expand []string "uriparametername:\"%24expand\"" + // Select properties to be returned + Select []string "uriparametername:\"%24select\"" +} +// ItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetQueryParameters +} +// NewItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderInternal instantiates a new ItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder and sets the default values. +func NewItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) { + m := &ItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/users/{user%2Did}/planner/plans/{plannerPlan%2Did}/goals/{plannerGoal%2Did}{?%24expand,%24select}", pathParameters), + } + return m +} +// NewItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder instantiates a new ItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder and sets the default values. +func NewItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get collection of goals in the plan. Read-only. Nullable. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a PlannerGoalable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *ItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerGoalable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreatePlannerGoalFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerGoalable), nil +} +// ToGetRequestInformation collection of goals in the plan. Read-only. Nullable. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *RequestInformation when successful +func (m *ItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderGetRequestConfiguration)(*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. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *ItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder when successful +func (m *ItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) WithUrl(rawUrl string)(*ItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) { + return NewItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/users/item_planner_plans_item_goals_request_builder.go b/users/item_planner_plans_item_goals_request_builder.go new file mode 100644 index 00000000000..562a267dc9e --- /dev/null +++ b/users/item_planner_plans_item_goals_request_builder.go @@ -0,0 +1,117 @@ +// Code generated by Microsoft Kiota - DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package users + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be "github.com/microsoftgraph/msgraph-beta-sdk-go/models" + i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459 "github.com/microsoftgraph/msgraph-beta-sdk-go/models/odataerrors" +) + +// ItemPlannerPlansItemGoalsRequestBuilder provides operations to manage the goals property of the microsoft.graph.plannerPlan entity. +type ItemPlannerPlansItemGoalsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemPlannerPlansItemGoalsRequestBuilderGetQueryParameters collection of goals in the plan. Read-only. Nullable. +type ItemPlannerPlansItemGoalsRequestBuilderGetQueryParameters 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\"" +} +// ItemPlannerPlansItemGoalsRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type ItemPlannerPlansItemGoalsRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption + // Request query parameters + QueryParameters *ItemPlannerPlansItemGoalsRequestBuilderGetQueryParameters +} +// ByPlannerGoalId provides operations to manage the goals property of the microsoft.graph.plannerPlan entity. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *ItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder when successful +func (m *ItemPlannerPlansItemGoalsRequestBuilder) ByPlannerGoalId(plannerGoalId string)(*ItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if plannerGoalId != "" { + urlTplParams["plannerGoal%2Did"] = plannerGoalId + } + return NewItemPlannerPlansItemGoalsPlannerGoalItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemPlannerPlansItemGoalsRequestBuilderInternal instantiates a new ItemPlannerPlansItemGoalsRequestBuilder and sets the default values. +func NewItemPlannerPlansItemGoalsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPlannerPlansItemGoalsRequestBuilder) { + m := &ItemPlannerPlansItemGoalsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/users/{user%2Did}/planner/plans/{plannerPlan%2Did}/goals{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters), + } + return m +} +// NewItemPlannerPlansItemGoalsRequestBuilder instantiates a new ItemPlannerPlansItemGoalsRequestBuilder and sets the default values. +func NewItemPlannerPlansItemGoalsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemPlannerPlansItemGoalsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemPlannerPlansItemGoalsRequestBuilderInternal(urlParams, requestAdapter) +} +// Count provides operations to count the resources in the collection. +// returns a *ItemPlannerPlansItemGoalsCountRequestBuilder when successful +func (m *ItemPlannerPlansItemGoalsRequestBuilder) Count()(*ItemPlannerPlansItemGoalsCountRequestBuilder) { + return NewItemPlannerPlansItemGoalsCountRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Get collection of goals in the plan. Read-only. Nullable. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a PlannerGoalCollectionResponseable when successful +// returns a ODataError error when the service returns a 4XX or 5XX status code +func (m *ItemPlannerPlansItemGoalsRequestBuilder) Get(ctx context.Context, requestConfiguration *ItemPlannerPlansItemGoalsRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerGoalCollectionResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "XXX": i20a3050780ee0b0cde0a884a4f35429a20d60067e3bcda382ec5400079147459.CreateODataErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.CreatePlannerGoalCollectionResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.PlannerGoalCollectionResponseable), nil +} +// ToGetRequestInformation collection of goals in the plan. Read-only. Nullable. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *RequestInformation when successful +func (m *ItemPlannerPlansItemGoalsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *ItemPlannerPlansItemGoalsRequestBuilderGetRequestConfiguration)(*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. +// Deprecated: private preview elements are required to be marked as deprecated as of 2025-03/Tasks_And_Plans on 2025-03-26 and will be removed 2026-03-26 +// returns a *ItemPlannerPlansItemGoalsRequestBuilder when successful +func (m *ItemPlannerPlansItemGoalsRequestBuilder) WithUrl(rawUrl string)(*ItemPlannerPlansItemGoalsRequestBuilder) { + return NewItemPlannerPlansItemGoalsRequestBuilder(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 643628a01bf..023f2cb9fc7 100644 --- a/users/item_planner_plans_planner_plan_item_request_builder.go +++ b/users/item_planner_plans_planner_plan_item_request_builder.go @@ -113,6 +113,11 @@ func (m *ItemPlannerPlansPlannerPlanItemRequestBuilder) Get(ctx context.Context, func (m *ItemPlannerPlansPlannerPlanItemRequestBuilder) GetUsageRights()(*ItemPlannerPlansItemGetUsageRightsRequestBuilder) { return NewItemPlannerPlansItemGetUsageRightsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// Goals provides operations to manage the goals property of the microsoft.graph.plannerPlan entity. +// returns a *ItemPlannerPlansItemGoalsRequestBuilder when successful +func (m *ItemPlannerPlansPlannerPlanItemRequestBuilder) Goals()(*ItemPlannerPlansItemGoalsRequestBuilder) { + return NewItemPlannerPlansItemGoalsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // HistoryItems provides operations to manage the historyItems property of the microsoft.graph.plannerPlan entity. // returns a *ItemPlannerPlansItemHistoryItemsRequestBuilder when successful func (m *ItemPlannerPlansPlannerPlanItemRequestBuilder) HistoryItems()(*ItemPlannerPlansItemHistoryItemsRequestBuilder) {